diff options
Diffstat (limited to 'arch/mips/kernel/setup.c')
| -rw-r--r-- | arch/mips/kernel/setup.c | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/arch/mips/kernel/setup.c b/arch/mips/kernel/setup.c index bcf1b10e518f..397a70e651b5 100644 --- a/arch/mips/kernel/setup.c +++ b/arch/mips/kernel/setup.c | |||
| @@ -246,7 +246,7 @@ static inline int parse_rd_cmdline(unsigned long* rd_start, unsigned long* rd_en | |||
| 246 | #ifdef CONFIG_64BIT | 246 | #ifdef CONFIG_64BIT |
| 247 | /* HACK: Guess if the sign extension was forgotten */ | 247 | /* HACK: Guess if the sign extension was forgotten */ |
| 248 | if (start > 0x0000000080000000 && start < 0x00000000ffffffff) | 248 | if (start > 0x0000000080000000 && start < 0x00000000ffffffff) |
| 249 | start |= 0xffffffff00000000; | 249 | start |= 0xffffffff00000000UL; |
| 250 | #endif | 250 | #endif |
| 251 | 251 | ||
| 252 | end = start + size; | 252 | end = start + size; |
| @@ -355,8 +355,6 @@ static inline void bootmem_init(void) | |||
| 355 | } | 355 | } |
| 356 | #endif | 356 | #endif |
| 357 | 357 | ||
| 358 | memory_present(0, first_usable_pfn, max_low_pfn); | ||
| 359 | |||
| 360 | /* Initialize the boot-time allocator with low memory only. */ | 358 | /* Initialize the boot-time allocator with low memory only. */ |
| 361 | bootmap_size = init_bootmem(first_usable_pfn, max_low_pfn); | 359 | bootmap_size = init_bootmem(first_usable_pfn, max_low_pfn); |
| 362 | 360 | ||
| @@ -410,6 +408,7 @@ static inline void bootmem_init(void) | |||
| 410 | 408 | ||
| 411 | /* Register lowmem ranges */ | 409 | /* Register lowmem ranges */ |
| 412 | free_bootmem(PFN_PHYS(curr_pfn), PFN_PHYS(size)); | 410 | free_bootmem(PFN_PHYS(curr_pfn), PFN_PHYS(size)); |
| 411 | memory_present(0, curr_pfn, curr_pfn + size - 1); | ||
| 413 | } | 412 | } |
| 414 | 413 | ||
| 415 | /* Reserve the bootmap memory. */ | 414 | /* Reserve the bootmap memory. */ |
| @@ -419,17 +418,20 @@ static inline void bootmem_init(void) | |||
| 419 | #ifdef CONFIG_BLK_DEV_INITRD | 418 | #ifdef CONFIG_BLK_DEV_INITRD |
| 420 | initrd_below_start_ok = 1; | 419 | initrd_below_start_ok = 1; |
| 421 | if (initrd_start) { | 420 | if (initrd_start) { |
| 422 | unsigned long initrd_size = ((unsigned char *)initrd_end) - ((unsigned char *)initrd_start); | 421 | unsigned long initrd_size = ((unsigned char *)initrd_end) - |
| 422 | ((unsigned char *)initrd_start); | ||
| 423 | const int width = sizeof(long) * 2; | ||
| 424 | |||
| 423 | printk("Initial ramdisk at: 0x%p (%lu bytes)\n", | 425 | printk("Initial ramdisk at: 0x%p (%lu bytes)\n", |
| 424 | (void *)initrd_start, initrd_size); | 426 | (void *)initrd_start, initrd_size); |
| 425 | 427 | ||
| 426 | if (CPHYSADDR(initrd_end) > PFN_PHYS(max_low_pfn)) { | 428 | if (CPHYSADDR(initrd_end) > PFN_PHYS(max_low_pfn)) { |
| 427 | printk("initrd extends beyond end of memory " | 429 | printk("initrd extends beyond end of memory " |
| 428 | "(0x%0*Lx > 0x%0*Lx)\ndisabling initrd\n", | 430 | "(0x%0*Lx > 0x%0*Lx)\ndisabling initrd\n", |
| 429 | sizeof(long) * 2, | 431 | width, |
| 430 | (unsigned long long)CPHYSADDR(initrd_end), | 432 | (unsigned long long) CPHYSADDR(initrd_end), |
| 431 | sizeof(long) * 2, | 433 | width, |
| 432 | (unsigned long long)PFN_PHYS(max_low_pfn)); | 434 | (unsigned long long) PFN_PHYS(max_low_pfn)); |
| 433 | initrd_start = initrd_end = 0; | 435 | initrd_start = initrd_end = 0; |
| 434 | initrd_reserve_bootmem = 0; | 436 | initrd_reserve_bootmem = 0; |
| 435 | } | 437 | } |
