mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: James Bottomley <James.Bottomley@HansenPartnership.com>
To: Andi Kleen <andi@firstfloor.org>
Cc: Stephen Rothwell <sfr@canb.auug.org.au>,
	linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org
Subject: Re: Please include const-sections into linux-next
Date: Wed, 19 Oct 2011 15:04:53 -0500	[thread overview]
Message-ID: <1319054693.3034.49.camel@dabdike.int.hansenpartnership.com> (raw)
In-Reply-To: <20111019190517.GK15908@one.firstfloor.org>

On Wed, 2011-10-19 at 21:05 +0200, Andi Kleen wrote:
> On Wed, Oct 19, 2011 at 01:55:57PM -0500, James Bottomley wrote:
> > On Wed, 2011-10-19 at 18:33 +0200, Andi Kleen wrote:
> > > > OK, look at it another way: why do we need the type annotations?  I
> > > > think it's only for section conflict checking, right?  If the compiler
> > > > gets it wrong anyway, why not just dump all the type annotations, then
> > > > it should have no type conflicts (spurious or otherwise) to complain
> > > > about.  We already have link time section checking scripts (they're the
> > > > useless ones that complain about section mismatches in dev annoations)
> > > > so why not put them to work to make up for compiler deficiencies?
> > > 
> > > You mean removing all the init sections stuff?  I think it has been proposed
> > > in the past, but it's a couple of hundred KB of memory usually.
> > > Would you accept that for PA-RISC? 
> > > 
> > > If you have init sections you need to annotate them correctly because
> > > a section is defined by its rwx attributes plus name and both need
> > > to match. We didn't always check this, so there was some bitrot,
> > > but it ultimatively has to be correct.
> > 
> > We're talking at cross purposes. But it doesn't matter, the error
> > doesn't seem to be anything to do with type.  This simple patch is
> > what's causing it (I can apply it alone to the working tree) and get the
> > error.
> > 
> > What I can't see is why.
> 
> For some reason your compiler sets the const section read/write:
> 
> .section        .devinit.data,"aw",@progbits     <---- writable
>         .align 8
>         .type   skel_netdrv_tbl, @object
>         .size   skel_netdrv_tbl, 48
> skel_netdrv_tbl:
> ; chip_name:
>         .dword  .LC56
> 
> while my x86 toolchain sets it to read only
> 
>         .string "1000/100/10M Ethernet PCI Adapter"
>         .section        .devinit.data,"a",@progbits   <---- not writable
>         .align 16
>         .type   skel_netdrv_tbl, @object
>         .size   skel_netdrv_tbl, 48

So most of our const stuff is "a" not "aw".  However, this particular
list is a list of strings ... this is probably something to do with
writeable strings?

James



  reply	other threads:[~2011-10-19 20:04 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-13 23:38 Andi Kleen
2011-10-14  0:04 ` Stephen Rothwell
2011-10-14 22:26 ` James Bottomley
2011-10-15 22:38   ` [patch] parisc, iommu: add missing include for prefetchw() David Rientjes
2011-10-15 23:48     ` James Bottomley
2011-10-16  0:41       ` David Rientjes
2011-10-16  0:56         ` James Bottomley
2011-10-16  1:15           ` David Rientjes
2011-10-15 23:03   ` Please include const-sections into linux-next David Rientjes
2011-10-15 23:49     ` James Bottomley
2011-10-16  0:53       ` David Rientjes
2011-10-16  0:58         ` James Bottomley
2011-10-16  3:35   ` Andi Kleen
2011-10-16 21:03     ` James Bottomley
2011-10-16 21:57       ` Andi Kleen
2011-10-19 15:54         ` James Bottomley
2011-10-19 16:15           ` Andi Kleen
2011-10-19 16:21             ` James Bottomley
2011-10-19 16:33               ` Andi Kleen
2011-10-19 18:55                 ` James Bottomley
2011-10-19 19:05                   ` Andi Kleen
2011-10-19 20:04                     ` James Bottomley [this message]
2011-10-19 20:06                       ` James Bottomley
2011-10-19 20:11                         ` Andi Kleen
2011-10-19 20:14                           ` James Bottomley
2011-10-19 21:24                             ` Andi Kleen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1319054693.3034.49.camel@dabdike.int.hansenpartnership.com \
    --to=james.bottomley@hansenpartnership.com \
    --cc=andi@firstfloor.org \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sfr@canb.auug.org.au \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®