aboutsummaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorAnton Blanchard <anton@samba.org>2010-08-24 20:22:58 -0400
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2011-04-01 01:14:30 -0400
commitc0bb9e45f3a7f67fc358946727bc3d5f23d0f55d (patch)
tree55b320cd26722eb6e201110b4aceddfa15983722 /kernel
parent76d479a7caff58b1e5f31d80805f7f65f9177696 (diff)
kdump: Allow shrinking of kdump region to be overridden
On ppc64 the crashkernel region almost always overlaps an area of firmware. This works fine except when using the sysfs interface to reduce the kdump region. If we free the firmware area we are guaranteed to crash. Rename free_reserved_phys_range to crash_free_reserved_phys_range and make it a weak function so we can override it. Signed-off-by: Anton Blanchard <anton@samba.org> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'kernel')
-rw-r--r--kernel/kexec.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/kernel/kexec.c b/kernel/kexec.c
index ec19b92c7ebd..4e240a378df6 100644
--- a/kernel/kexec.c
+++ b/kernel/kexec.c
@@ -1099,7 +1099,8 @@ size_t crash_get_memory_size(void)
1099 return size; 1099 return size;
1100} 1100}
1101 1101
1102static void free_reserved_phys_range(unsigned long begin, unsigned long end) 1102void __weak crash_free_reserved_phys_range(unsigned long begin,
1103 unsigned long end)
1103{ 1104{
1104 unsigned long addr; 1105 unsigned long addr;
1105 1106
@@ -1135,7 +1136,7 @@ int crash_shrink_memory(unsigned long new_size)
1135 start = roundup(start, PAGE_SIZE); 1136 start = roundup(start, PAGE_SIZE);
1136 end = roundup(start + new_size, PAGE_SIZE); 1137 end = roundup(start + new_size, PAGE_SIZE);
1137 1138
1138 free_reserved_phys_range(end, crashk_res.end); 1139 crash_free_reserved_phys_range(end, crashk_res.end);
1139 1140
1140 if ((start == end) && (crashk_res.parent != NULL)) 1141 if ((start == end) && (crashk_res.parent != NULL))
1141 release_resource(&crashk_res); 1142 release_resource(&crashk_res);