aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew McClintock <msm@freescale.com>2010-07-21 07:14:54 -0400
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2010-07-31 00:56:30 -0400
commitbbc8e30f17077f83fdeeeca0cf70e0f179279282 (patch)
treeeb98a7a41b2e2b690ba8bf235f268b3db08df5b0
parentfc53b4202e61c7e9008c241933ae282aab8a6082 (diff)
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>
-rw-r--r--arch/powerpc/kernel/crash_dump.c4
-rw-r--r--arch/powerpc/kernel/machine_kexec.c10
2 files changed, 7 insertions, 7 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,
128 if (!csize) 128 if (!csize)
129 return 0; 129 return 0;
130 130
131 csize = min(csize, PAGE_SIZE); 131 csize = min_t(size_t, csize, PAGE_SIZE);
132 132
133 if (pfn < max_pfn) { 133 if ((min_low_pfn < pfn) && (pfn < max_pfn)) {
134 vaddr = __va(pfn << PAGE_SHIFT); 134 vaddr = __va(pfn << PAGE_SHIFT);
135 csize = copy_oldmem_vaddr(vaddr, buf, csize, offset, userbuf); 135 csize = copy_oldmem_vaddr(vaddr, buf, csize, offset, userbuf);
136 } else { 136 } else {
diff --git a/arch/powerpc/kernel/machine_kexec.c b/arch/powerpc/kernel/machine_kexec.c
index bb3d893a8353..6ff15f03dcc4 100644
--- a/arch/powerpc/kernel/machine_kexec.c
+++ b/arch/powerpc/kernel/machine_kexec.c
@@ -144,24 +144,24 @@ int overlaps_crashkernel(unsigned long start, unsigned long size)
144} 144}
145 145
146/* Values we need to export to the second kernel via the device tree. */ 146/* Values we need to export to the second kernel via the device tree. */
147static unsigned long kernel_end; 147static phys_addr_t kernel_end;
148static unsigned long crashk_size; 148static phys_addr_t crashk_size;
149 149
150static struct property kernel_end_prop = { 150static struct property kernel_end_prop = {
151 .name = "linux,kernel-end", 151 .name = "linux,kernel-end",
152 .length = sizeof(unsigned long), 152 .length = sizeof(phys_addr_t),
153 .value = &kernel_end, 153 .value = &kernel_end,
154}; 154};
155 155
156static struct property crashk_base_prop = { 156static struct property crashk_base_prop = {
157 .name = "linux,crashkernel-base", 157 .name = "linux,crashkernel-base",
158 .length = sizeof(unsigned long), 158 .length = sizeof(phys_addr_t),
159 .value = &crashk_res.start, 159 .value = &crashk_res.start,
160}; 160};
161 161
162static struct property crashk_size_prop = { 162static struct property crashk_size_prop = {
163 .name = "linux,crashkernel-size", 163 .name = "linux,crashkernel-size",
164 .length = sizeof(unsigned long), 164 .length = sizeof(phys_addr_t),
165 .value = &crashk_size, 165 .value = &crashk_size,
166}; 166};
167 167