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/kernel/machine_kexec_64.c | |
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/kernel/machine_kexec_64.c')
-rw-r--r-- | arch/powerpc/kernel/machine_kexec_64.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/arch/powerpc/kernel/machine_kexec_64.c b/arch/powerpc/kernel/machine_kexec_64.c index ec0f06bfc24a..0b0fa4768995 100644 --- a/arch/powerpc/kernel/machine_kexec_64.c +++ b/arch/powerpc/kernel/machine_kexec_64.c | |||
@@ -153,9 +153,8 @@ void kexec_copy_flush(struct kimage *image) | |||
153 | * including ones that were in place on the original copy | 153 | * including ones that were in place on the original copy |
154 | */ | 154 | */ |
155 | for (i = 0; i < nr_segments; i++) | 155 | for (i = 0; i < nr_segments; i++) |
156 | flush_icache_range(ranges[i].mem + KERNELBASE, | 156 | flush_icache_range((unsigned long)__va(ranges[i].mem), |
157 | ranges[i].mem + KERNELBASE + | 157 | (unsigned long)__va(ranges[i].mem + ranges[i].memsz)); |
158 | ranges[i].memsz); | ||
159 | } | 158 | } |
160 | 159 | ||
161 | #ifdef CONFIG_SMP | 160 | #ifdef CONFIG_SMP |