diff options
Diffstat (limited to 'arch/sh/kernel/setup.c')
-rw-r--r-- | arch/sh/kernel/setup.c | 43 |
1 files changed, 0 insertions, 43 deletions
diff --git a/arch/sh/kernel/setup.c b/arch/sh/kernel/setup.c index 9c7f7811af70..d67a8a386907 100644 --- a/arch/sh/kernel/setup.c +++ b/arch/sh/kernel/setup.c | |||
@@ -145,49 +145,6 @@ static void __init register_bootmem_low_pages(void) | |||
145 | free_bootmem(PFN_PHYS(curr_pfn), PFN_PHYS(pages)); | 145 | free_bootmem(PFN_PHYS(curr_pfn), PFN_PHYS(pages)); |
146 | } | 146 | } |
147 | 147 | ||
148 | #ifdef CONFIG_KEXEC | ||
149 | static void __init reserve_crashkernel(void) | ||
150 | { | ||
151 | unsigned long long free_mem; | ||
152 | unsigned long long crash_size, crash_base; | ||
153 | void *vp; | ||
154 | int ret; | ||
155 | |||
156 | free_mem = ((unsigned long long)max_low_pfn - min_low_pfn) << PAGE_SHIFT; | ||
157 | |||
158 | ret = parse_crashkernel(boot_command_line, free_mem, | ||
159 | &crash_size, &crash_base); | ||
160 | if (ret == 0 && crash_size) { | ||
161 | if (crash_base <= 0) { | ||
162 | vp = alloc_bootmem_nopanic(crash_size); | ||
163 | if (!vp) { | ||
164 | printk(KERN_INFO "crashkernel allocation " | ||
165 | "failed\n"); | ||
166 | return; | ||
167 | } | ||
168 | crash_base = __pa(vp); | ||
169 | } else if (reserve_bootmem(crash_base, crash_size, | ||
170 | BOOTMEM_EXCLUSIVE) < 0) { | ||
171 | printk(KERN_INFO "crashkernel reservation failed - " | ||
172 | "memory is in use\n"); | ||
173 | return; | ||
174 | } | ||
175 | |||
176 | printk(KERN_INFO "Reserving %ldMB of memory at %ldMB " | ||
177 | "for crashkernel (System RAM: %ldMB)\n", | ||
178 | (unsigned long)(crash_size >> 20), | ||
179 | (unsigned long)(crash_base >> 20), | ||
180 | (unsigned long)(free_mem >> 20)); | ||
181 | crashk_res.start = crash_base; | ||
182 | crashk_res.end = crash_base + crash_size - 1; | ||
183 | insert_resource(&iomem_resource, &crashk_res); | ||
184 | } | ||
185 | } | ||
186 | #else | ||
187 | static inline void __init reserve_crashkernel(void) | ||
188 | {} | ||
189 | #endif | ||
190 | |||
191 | static void __init check_for_initrd(void) | 148 | static void __init check_for_initrd(void) |
192 | { | 149 | { |
193 | #ifdef CONFIG_BLK_DEV_INITRD | 150 | #ifdef CONFIG_BLK_DEV_INITRD |