summaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel/crash_dump.c
diff options
context:
space:
mode:
authorMatthew McClintock <msm@freescale.com>2010-07-21 11:14:54 +0000
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2010-07-31 14:56:30 +1000
commitbbc8e30f17077f83fdeeeca0cf70e0f179279282 (patch)
treeeb98a7a41b2e2b690ba8bf235f268b3db08df5b0 /arch/powerpc/kernel/crash_dump.c
parentfc53b4202e61c7e9008c241933ae282aab8a6082 (diff)
downloadtalos-obmc-linux-bbc8e30f17077f83fdeeeca0cf70e0f179279282.tar.gz
talos-obmc-linux-bbc8e30f17077f83fdeeeca0cf70e0f179279282.zip
powerpc/crashdump: Fix issues with kexec and 36bit physical addr
Fix sizes of variables so correct values are exported via /proc. Cast variable in comparison to avoid compiler error. Signed-off-by: Matthew McClintock <msm@freescale.com> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc/kernel/crash_dump.c')
-rw-r--r--arch/powerpc/kernel/crash_dump.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/powerpc/kernel/crash_dump.c b/arch/powerpc/kernel/crash_dump.c
index 5fb667a60894..d254132f08f6 100644
--- a/arch/powerpc/kernel/crash_dump.c
+++ b/arch/powerpc/kernel/crash_dump.c
@@ -128,9 +128,9 @@ ssize_t copy_oldmem_page(unsigned long pfn, char *buf,
if (!csize)
return 0;
- csize = min(csize, PAGE_SIZE);
+ csize = min_t(size_t, csize, PAGE_SIZE);
- if (pfn < max_pfn) {
+ if ((min_low_pfn < pfn) && (pfn < max_pfn)) {
vaddr = __va(pfn << PAGE_SHIFT);
csize = copy_oldmem_vaddr(vaddr, buf, csize, offset, userbuf);
} else {
OpenPOWER on IntegriCloud