From: David Gibson <david@gibson.dropbear.id.au>
To: Andrew Morton <akpm@osdl.org>
Cc: Anton Blanchard <anton@samba.org>,
linuxppc64-dev@lists.linuxppc.org, linux-kernel@vger.kernel.org
Subject: Re: page align emergency stack
Date: Mon, 19 Jul 2004 15:55:42 +1000 [thread overview]
Message-ID: <20040719055542.GC11586@zax> (raw)
In-Reply-To: <20040716013901.GC24753@zax>
On Fri, Jul 16, 2004 at 11:39:01AM +1000, David Gibson wrote:
>
> On Fri, Jul 16, 2004 at 11:11:41AM +1000, Anton Blanchard wrote:
> >
> >
> > > Do we actually need to do this? I noted that the old guard pages were
> > > page aligned, but couldn't see any particular reason for it, so I
> > > didn't transfer the alignment to the new version.
> >
> > The ABI requires us to have 128 bit alignment doesnt it? Im thinking
> > about what would happen if we saved altivec registers to the stack.
>
> Ok, that's not quite the same thing as page alignment...
Ok, here's a patch that just applies the weaker 128-byte alignment
constraint.
Andrew, please apply
The PPC64 ABI requires the stack to be 128 byte aligned (and that can
become important if AltiVec registers are saved there). In the
kernel, that's usually dealt with by the fact that the stack has a
page more-or-less to itself. However, the emergency stacks (used in
SMP bringup and when we detect a bad stack pointer) aren't necessarily
page aligned, or anything aligned for that matter. This patch applies
the necessary alignement constraint to them.
Signed-off-by: David Gibson <dwg@au.ibm.com>
Index: working-2.6/arch/ppc64/kernel/pacaData.c
===================================================================
--- working-2.6.orig/arch/ppc64/kernel/pacaData.c
+++ working-2.6/arch/ppc64/kernel/pacaData.c
@@ -29,8 +29,10 @@
/* Stack space used when we detect a bad kernel stack pointer, and
* early in SMP boots before relocation is enabled.
+ *
+ * ABI requires stack to be 128-byte aligned
*/
-char emergency_stack[PAGE_SIZE * NR_CPUS];
+char emergency_stack[PAGE_SIZE * NR_CPUS] __attribute__((aligned(128)));
/* The Paca is an array with one entry per processor. Each contains an
* ItLpPaca, which contains the information shared between the
--
David Gibson | For every complex problem there is a
david AT gibson.dropbear.id.au | solution which is simple, neat and
| wrong.
http://www.ozlabs.org/people/dgibson
parent reply other threads:[~2004-07-19 6:02 UTC|newest]
Thread overview: expand[flat|nested] mbox.gz Atom feed
[parent not found: <20040716013901.GC24753@zax>]
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=20040719055542.GC11586@zax \
--to=david@gibson.dropbear.id.au \
--cc=akpm@osdl.org \
--cc=anton@samba.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc64-dev@lists.linuxppc.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