diff options
author | Bernhard Walle <bwalle@suse.de> | 2008-02-07 03:15:19 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2008-02-07 11:42:25 -0500 |
commit | 18a01a3beb9f25a70a51e12e3c1c3d273da10eca (patch) | |
tree | cfd4c3ea5147c7706d60054a8761077cdabd7e3a /arch/sh/kernel/setup.c | |
parent | 72a7fe3967dbf86cb34e24fbf1d957fe24d2f246 (diff) |
Use BOOTMEM_EXCLUSIVE for kdump
Use the BOOTMEM_EXCLUSIVE, introduced in the previous patch, to avoid
conflicts while reserving the memory for the kdump capture kernel
(crashkernel=).
Signed-off-by: Bernhard Walle <bwalle@suse.de>
Cc: <linux-arch@vger.kernel.org>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: Vivek Goyal <vgoyal@in.ibm.com>
Acked-by: Paul Mundt <lethal@linux-sh.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/sh/kernel/setup.c')
-rw-r--r-- | arch/sh/kernel/setup.c | 29 |
1 files changed, 18 insertions, 11 deletions
diff --git a/arch/sh/kernel/setup.c b/arch/sh/kernel/setup.c index af10db90a554..18a5baf2cbad 100644 --- a/arch/sh/kernel/setup.c +++ b/arch/sh/kernel/setup.c | |||
@@ -140,19 +140,26 @@ static void __init reserve_crashkernel(void) | |||
140 | ret = parse_crashkernel(boot_command_line, free_mem, | 140 | ret = parse_crashkernel(boot_command_line, free_mem, |
141 | &crash_size, &crash_base); | 141 | &crash_size, &crash_base); |
142 | if (ret == 0 && crash_size) { | 142 | if (ret == 0 && crash_size) { |
143 | if (crash_base > 0) { | 143 | if (crash_base <= 0) { |
144 | printk(KERN_INFO "Reserving %ldMB of memory at %ldMB " | ||
145 | "for crashkernel (System RAM: %ldMB)\n", | ||
146 | (unsigned long)(crash_size >> 20), | ||
147 | (unsigned long)(crash_base >> 20), | ||
148 | (unsigned long)(free_mem >> 20)); | ||
149 | crashk_res.start = crash_base; | ||
150 | crashk_res.end = crash_base + crash_size - 1; | ||
151 | reserve_bootmem(crash_base, crash_size, | ||
152 | BOOTMEM_DEFAULT); | ||
153 | } else | ||
154 | printk(KERN_INFO "crashkernel reservation failed - " | 144 | printk(KERN_INFO "crashkernel reservation failed - " |
155 | "you have to specify a base address\n"); | 145 | "you have to specify a base address\n"); |
146 | return; | ||
147 | } | ||
148 | |||
149 | if (reserve_bootmem(crash_base, crash_size, | ||
150 | BOOTMEM_EXCLUSIVE) < 0) { | ||
151 | printk(KERN_INFO "crashkernel reservation failed - " | ||
152 | "memory is in use\n"); | ||
153 | return; | ||
154 | } | ||
155 | |||
156 | printk(KERN_INFO "Reserving %ldMB of memory at %ldMB " | ||
157 | "for crashkernel (System RAM: %ldMB)\n", | ||
158 | (unsigned long)(crash_size >> 20), | ||
159 | (unsigned long)(crash_base >> 20), | ||
160 | (unsigned long)(free_mem >> 20)); | ||
161 | crashk_res.start = crash_base; | ||
162 | crashk_res.end = crash_base + crash_size - 1; | ||
156 | } | 163 | } |
157 | } | 164 | } |
158 | #else | 165 | #else |