From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: tabbott@ksplice.com
Cc: sam@ravnborg.org, linuxppc-dev@lists.ozlabs.org,
Linus Torvalds <torvalds@linux-foundation.org>,
Andrew Morton <akpm@linux-foundation.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: powerpc problem with .data.page_aligned -> __page_aligned_data conversion
Date: Thu, 15 Oct 2009 16:32:52 +1100 [thread overview]
Message-ID: <1255584772.2347.86.camel@pasglop> (raw)
Hi folks !
So I have a problem ... :-)
For some weird reason, our gcc until 4.3 (fixed in 4.3) had the weird
idea that the alignment attribute should not be allowed to force an
alignment greater than 32k. If attempted, it would warn -and- crop the
alignment to 32k.
As you can imagine, this doesn't play terribly well with 64K page size,
which is (sadly) our default on ppc64 on distros nowadays. I know it's
insane but that's what I have to live with...
And of course, our current distros (well, at least RHEL5 which is pretty
common) don't have a fixed gcc.
Until recently, we got away with it because very few people used
__page_aligned and those who did always did it on something that is
naturally a PAGE_SIZE multiple in size. So we just stick the thing into
the appropriate section and that's it.
The new generic macros __page_aligned_data/bss now always add the
alignment directive generically.
This has a few issues for us:
- The patch that converted bits of powerpc to the new macro break since
it now hits that bug
- We can't trivially change the macros to not to the align directive on
powerpc, but that's taking the risk that drivers or other pieces of
generic code now assume that they can use __page_aligned_* on a data
structure whose size isn't a multiple of _PAGE_SIZE, since that would
work on all architectures ... except powerpc where it would silently
break by shifting everybody else alignment in that section.
As of today, nothing seems to do that (unless I mis-grepped) though.
What do you recommend I do ? I can ban gcc < 4.3 but that's a bit
harsh :-) I know a few people that won't be happy to be unable to build
newer kernels with current distro gccs.
Or can do the above making the macro definition drop the alignment part
on powerpc. Will work for now, but will require great care to avoid
subtle and nasty breakage (basically same as before)
Or maybe I can do the above but only when using gcc < 4.3 so at least if
the breakage happen, that will only be with older gccs ...
Unless somebody has a better idea ?
Cheers,
Ben.
next reply other threads:[~2009-10-15 5:33 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-10-15 5:32 Benjamin Herrenschmidt [this message]
2009-10-15 16:37 ` powerpc problem with .data.page_aligned -> __page_aligned_data conversion Tim Abbott
2009-10-15 20:00 ` Benjamin Herrenschmidt
2009-10-15 16:46 ` Tim Abbott
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=1255584772.2347.86.camel@pasglop \
--to=benh@kernel.crashing.org \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=sam@ravnborg.org \
--cc=tabbott@ksplice.com \
--cc=torvalds@linux-foundation.org \
/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