[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20110618170620.GA10479@rere.qmqm.pl>
Date: Sat, 18 Jun 2011 19:06:20 +0200
From: Michał Mirosław <mirq-linux@...e.qmqm.pl>
To: James Bottomley <James.Bottomley@...senPartnership.com>
Cc: David Miller <davem@...emloft.net>, netdev@...r.kernel.org
Subject: Re: Section conflict compile failures in net
On Wed, Jun 01, 2011 at 10:42:50AM +0900, James Bottomley wrote:
> On Tue, 2011-05-31 at 15:45 -0700, David Miller wrote:
> > From: James Bottomley <James.Bottomley@...senPartnership.com>
> > Date: Thu, 26 May 2011 16:39:53 -0500
> >
> > BTW, linux-netdev doesn't exist, it's just plain netdev.
>
> Um, yes ... I thought it was netdev, then I checked MARC and it had
> linux-netdev. I'll remember for next time (well, at least for the next
> six months).
>
> > > Simply reverting
> > >
> > > commit e5cb966c0838e4da43a3b0751bdcac7fe719f7b4
> > > Author: Micha<C5><82> Miros<C5><82>aw <mirq-linux@...e.qmqm.pl>
> > > Date: Mon Apr 18 13:31:20 2011 +0000
> > >
> > > net: fix section mismatches
> > >
> > > Fixes the problem.
> > >
> > > If I look at the first problem in hp100.c, the addition of
> > > __devinitconst to the device tables is fine, but there's no
> > > corresponding sectional tag on their use, so when compiled as a module,
> > > things like hp100_eisa_driver is now in the main data section but refers
> > > to something in the init data section ... I assume all the others are
> > > the same type of problem.
> >
> > Yeah I think the device ID table __devinitconst bits have to be
> > reverted.
> >
> > I'll apply something like the following:
> >
> > net: Revert adding __devinitconst to driver ID tables.
> >
> > If the table is hooked up to foo_driver->id_table we can't
> > mark it __devinitconst otherwise we end up with section
> > mismatches.
> >
> > Reported-by: James Bottomley <James.Bottomley@...senPartnership.com>
> > Signed-off-by: David S. Miller <davem@...emloft.net>
>
> That fixes some but not all; the pci tables still cause a section
> conflict:
>
> drivers/net/hp100.c:211: error: hp100_pci_tbl causes a section type conflict
> make[2]: *** [drivers/net/hp100.o] Error 1
>
>
> It's really, as has been said, a compiler problem: the compiler is
> confused about the read only sections. However, 4.2 is a pretty common
> compiler (especially for non-x86), so if the compiler can't do the read
> only section tracking, just not using the __devinitconst designation
> globally seems to be the best thing, just change it to __devinitdata
> instead.
So maybe just #define __devinitconst __devinitdata for those broken gcc
versions?
Best Regards,
Michał Mirosław
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists