diff options
author | Michael Ellerman <michael@ellerman.id.au> | 2005-12-05 11:24:33 -0500 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2006-01-08 22:51:54 -0500 |
commit | b5666f70395016a55cc9d57826508b8a346398d0 (patch) | |
tree | 39d74718c2bc3f2fcba6456fdc39a6a0de3d78bd /arch/powerpc/mm/slb_low.S | |
parent | 51fae6de24da57bc6cdaa1b253595c3513ecbf2d (diff) |
[PATCH] powerpc: Separate usage of KERNELBASE and PAGE_OFFSET
This patch separates usage of KERNELBASE and PAGE_OFFSET. I haven't
looked at any of the PPC32 code, if we ever want to support Kdump on
PPC we'll have to do another audit, ditto for iSeries.
This patch makes PAGE_OFFSET the constant, it'll always be 0xC * 1
gazillion for 64-bit.
To get a physical address from a virtual one you subtract PAGE_OFFSET,
_not_ KERNELBASE.
KERNELBASE is the virtual address of the start of the kernel, it's
often the same as PAGE_OFFSET, but _might not be_.
If you want to know something's offset from the start of the kernel
you should subtract KERNELBASE.
Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc/mm/slb_low.S')
-rw-r--r-- | arch/powerpc/mm/slb_low.S | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/arch/powerpc/mm/slb_low.S b/arch/powerpc/mm/slb_low.S index 950ffc5848c7..d1acee38f163 100644 --- a/arch/powerpc/mm/slb_low.S +++ b/arch/powerpc/mm/slb_low.S | |||
@@ -37,9 +37,9 @@ _GLOBAL(slb_allocate_realmode) | |||
37 | 37 | ||
38 | srdi r9,r3,60 /* get region */ | 38 | srdi r9,r3,60 /* get region */ |
39 | srdi r10,r3,28 /* get esid */ | 39 | srdi r10,r3,28 /* get esid */ |
40 | cmpldi cr7,r9,0xc /* cmp KERNELBASE for later use */ | 40 | cmpldi cr7,r9,0xc /* cmp PAGE_OFFSET for later use */ |
41 | 41 | ||
42 | /* r3 = address, r10 = esid, cr7 = <>KERNELBASE */ | 42 | /* r3 = address, r10 = esid, cr7 = <> PAGE_OFFSET */ |
43 | blt cr7,0f /* user or kernel? */ | 43 | blt cr7,0f /* user or kernel? */ |
44 | 44 | ||
45 | /* kernel address: proto-VSID = ESID */ | 45 | /* kernel address: proto-VSID = ESID */ |
@@ -166,7 +166,7 @@ _GLOBAL(slb_allocate_user) | |||
166 | /* | 166 | /* |
167 | * Finish loading of an SLB entry and return | 167 | * Finish loading of an SLB entry and return |
168 | * | 168 | * |
169 | * r3 = EA, r10 = proto-VSID, r11 = flags, clobbers r9, cr7 = <>KERNELBASE | 169 | * r3 = EA, r10 = proto-VSID, r11 = flags, clobbers r9, cr7 = <> PAGE_OFFSET |
170 | */ | 170 | */ |
171 | slb_finish_load: | 171 | slb_finish_load: |
172 | ASM_VSID_SCRAMBLE(r10,r9) | 172 | ASM_VSID_SCRAMBLE(r10,r9) |