diff options
| author | Paul Mackerras <paulus@samba.org> | 2004-12-12 06:26:09 -0800 |
|---|---|---|
| committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2004-12-12 06:26:09 -0800 |
| commit | 70785f43f68574d6d6b7baaec827d4787f0e030e (patch) | |
| tree | 8e749f308c54d6ac3b7e903b0feac2781878c1ab /include | |
| parent | 5e9a930329e2702c158e0af2eb3c5e2148ed5f63 (diff) | |
[PATCH] ppc64: make sure lppaca doesn't cross page boundary
This patch is from Will Schmidt <willschm@us.ibm.com>, with some extra
comments from me.
On iSeries and on POWER5 machines, there is a data structure which is
used for communication between the hypervisor and the kernel, called
the `lppaca'. The kernel tells the hypervisor where it is, and the
hypervisor requires that it doesn't cross a page boundary. With other
changes in the last few months we have ended up with a situation where
it could cross a page boundary. This patch increases the alignment
requirement for the struct to make sure that it can't cross a page
boundary.
This is a bug fix and should go into 2.6.10.
Signed-off-by: Will Schmidt <willschm@us.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include')
| -rw-r--r-- | include/asm-ppc64/paca.h | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/include/asm-ppc64/paca.h b/include/asm-ppc64/paca.h index 71de51ac951f..53ee1a758baa 100644 --- a/include/asm-ppc64/paca.h +++ b/include/asm-ppc64/paca.h @@ -99,11 +99,17 @@ struct paca_struct { u64 exdsi[8]; /* used for linear mapping hash table misses */ /* - * iSeries structues which the hypervisor knows about - Not - * sure if these particularly need to be cacheline aligned. + * iSeries structure which the hypervisor knows about - + * this structure should not cross a page boundary. + * The vpa_init/register_vpa call is now known to fail if the + * lppaca structure crosses a page boundary. * The lppaca is also used on POWER5 pSeries boxes. + * The lppaca is 640 bytes long, and cannot readily change + * since the hypervisor knows its layout, so a 1kB + * alignment will suffice to ensure that it doesn't + * cross a page boundary. */ - struct ItLpPaca lppaca __attribute__((aligned(0x80))); + struct ItLpPaca lppaca __attribute__((__aligned__(0x400))); #ifdef CONFIG_PPC_ISERIES struct ItLpRegSave reg_save; #endif |
