diff options
author | David Gibson <david@gibson.dropbear.id.au> | 2005-07-27 14:44:21 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-07-27 19:25:58 -0400 |
commit | 488f84994c55927eef587a0827dc957c908a0bad (patch) | |
tree | 34bdc42927e2eb559bd64039ed87508a440dffc6 /include/asm-ppc64/mmu.h | |
parent | 533f08172e21521a74e15cdef8a13c929596d506 (diff) |
[PATCH] ppc64: remove another fixed address constraint
Presently the LparMap, one of the structures the kernel shares with the
legacy iSeries hypervisor has a fixed offset address in head.S. This patch
changes this so the LparMap is a normally initialized structure, without
fixed address. This allows us to use macros to compute some of the values
in the structure, which wasn't previously possible because the assembler
always uses signed-% which gets the wrong answers for the computations in
question.
Unfortunately, a gcc bug means that doing this requires another structure
(hvReleaseData) to be initialized in asm instead of C, but on the whole the
result is cleaner than before.
Signed-off-by: David Gibson <dwg@au1.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include/asm-ppc64/mmu.h')
-rw-r--r-- | include/asm-ppc64/mmu.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/asm-ppc64/mmu.h b/include/asm-ppc64/mmu.h index 889118036803..70348a851313 100644 --- a/include/asm-ppc64/mmu.h +++ b/include/asm-ppc64/mmu.h | |||
@@ -338,6 +338,9 @@ static inline unsigned long get_vsid(unsigned long context, unsigned long ea) | |||
338 | | (ea >> SID_SHIFT)); | 338 | | (ea >> SID_SHIFT)); |
339 | } | 339 | } |
340 | 340 | ||
341 | #define VSID_SCRAMBLE(pvsid) (((pvsid) * VSID_MULTIPLIER) % VSID_MODULUS) | ||
342 | #define KERNEL_VSID(ea) VSID_SCRAMBLE(GET_ESID(ea)) | ||
343 | |||
341 | #endif /* __ASSEMBLY */ | 344 | #endif /* __ASSEMBLY */ |
342 | 345 | ||
343 | #endif /* _PPC64_MMU_H_ */ | 346 | #endif /* _PPC64_MMU_H_ */ |