diff options
| author | Matthew McClintock <msm@freescale.com> | 2010-07-21 07:14:54 -0400 |
|---|---|---|
| committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2010-07-31 00:56:30 -0400 |
| commit | bbc8e30f17077f83fdeeeca0cf70e0f179279282 (patch) | |
| tree | eb98a7a41b2e2b690ba8bf235f268b3db08df5b0 | |
| parent | fc53b4202e61c7e9008c241933ae282aab8a6082 (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.c | 4 | ||||
| -rw-r--r-- | arch/powerpc/kernel/machine_kexec.c | 10 |
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. */ |
| 147 | static unsigned long kernel_end; | 147 | static phys_addr_t kernel_end; |
| 148 | static unsigned long crashk_size; | 148 | static phys_addr_t crashk_size; |
| 149 | 149 | ||
| 150 | static struct property kernel_end_prop = { | 150 | static 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 | ||
| 156 | static struct property crashk_base_prop = { | 156 | static 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 | ||
| 162 | static struct property crashk_size_prop = { | 162 | static 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 | ||
