diff options
Diffstat (limited to 'arch/sh')
-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 |