aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sh/kernel/setup.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/sh/kernel/setup.c')
-rw-r--r--arch/sh/kernel/setup.c35
1 files changed, 22 insertions, 13 deletions
diff --git a/arch/sh/kernel/setup.c b/arch/sh/kernel/setup.c
index 855cdf9d85b1..18a5baf2cbad 100644
--- a/arch/sh/kernel/setup.c
+++ b/arch/sh/kernel/setup.c
@@ -140,18 +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 } else
153 printk(KERN_INFO "crashkernel reservation failed - " 144 printk(KERN_INFO "crashkernel reservation failed - "
154 "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;
155 } 163 }
156} 164}
157#else 165#else
@@ -184,13 +192,14 @@ void __init setup_bootmem_allocator(unsigned long free_pfn)
184 * an invalid RAM area. 192 * an invalid RAM area.
185 */ 193 */
186 reserve_bootmem(__MEMORY_START+PAGE_SIZE, 194 reserve_bootmem(__MEMORY_START+PAGE_SIZE,
187 (PFN_PHYS(free_pfn)+bootmap_size+PAGE_SIZE-1)-__MEMORY_START); 195 (PFN_PHYS(free_pfn)+bootmap_size+PAGE_SIZE-1)-__MEMORY_START,
196 BOOTMEM_DEFAULT);
188 197
189 /* 198 /*
190 * reserve physical page 0 - it's a special BIOS page on many boxes, 199 * reserve physical page 0 - it's a special BIOS page on many boxes,
191 * enabling clean reboots, SMP operation, laptop functions. 200 * enabling clean reboots, SMP operation, laptop functions.
192 */ 201 */
193 reserve_bootmem(__MEMORY_START, PAGE_SIZE); 202 reserve_bootmem(__MEMORY_START, PAGE_SIZE, BOOTMEM_DEFAULT);
194 203
195 sparse_memory_present_with_active_regions(0); 204 sparse_memory_present_with_active_regions(0);
196 205
@@ -200,7 +209,7 @@ void __init setup_bootmem_allocator(unsigned long free_pfn)
200 if (LOADER_TYPE && INITRD_START) { 209 if (LOADER_TYPE && INITRD_START) {
201 if (INITRD_START + INITRD_SIZE <= (max_low_pfn << PAGE_SHIFT)) { 210 if (INITRD_START + INITRD_SIZE <= (max_low_pfn << PAGE_SHIFT)) {
202 reserve_bootmem(INITRD_START + __MEMORY_START, 211 reserve_bootmem(INITRD_START + __MEMORY_START,
203 INITRD_SIZE); 212 INITRD_SIZE, BOOTMEM_DEFAULT);
204 initrd_start = INITRD_START + PAGE_OFFSET + 213 initrd_start = INITRD_START + PAGE_OFFSET +
205 __MEMORY_START; 214 __MEMORY_START;
206 initrd_end = initrd_start + INITRD_SIZE; 215 initrd_end = initrd_start + INITRD_SIZE;