Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 99877
b: refs/heads/master
c: 225c37d
h: refs/heads/master
i:
  99875: 95a15ba
v: v3
  • Loading branch information
Yinghai Lu authored and Ingo Molnar committed Jul 8, 2008
1 parent 4d493ff commit 69fad17
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 11 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: b2ac82a0909aea0d2620ba4c189f37c567c21fe5
refs/heads/master: 225c37d71bc8b97eb2063e8eda153b383328b20b
16 changes: 10 additions & 6 deletions trunk/arch/x86/kernel/setup_32.c
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,7 @@ void __init reserve_initrd(void)
* in i386_start_kernel
*/
initrd_start = ramdisk_image + PAGE_OFFSET;
initrd_end = initrd_start+ramdisk_size;
initrd_end = initrd_start + ramdisk_size;
return;
}

Expand All @@ -363,7 +363,7 @@ void __init reserve_initrd(void)

#define MAX_MAP_CHUNK (NR_FIX_BTMAPS << PAGE_SHIFT)

static void __init relocate_initrd(void)
static void __init post_reserve_initrd(void)
{
u64 ramdisk_image = boot_params.hdr.ramdisk_image;
u64 ramdisk_size = boot_params.hdr.ramdisk_size;
Expand Down Expand Up @@ -417,7 +417,13 @@ static void __init relocate_initrd(void)
/* need to free that, otherwise init highmem will reserve it again */
free_early(ramdisk_image, ramdisk_image+ramdisk_size);
}

#else
void __init reserve_initrd(void)
{
}
static void __init post_reserve_initrd(void)
{
}
#endif /* CONFIG_BLK_DEV_INITRD */

/*
Expand Down Expand Up @@ -632,9 +638,7 @@ void __init setup_arch(char **cmdline_p)
* NOTE: at this point the bootmem allocator is fully available.
*/

#ifdef CONFIG_BLK_DEV_INITRD
relocate_initrd();
#endif
post_reserve_initrd();

remapped_pgdat_init();
sparse_init();
Expand Down
6 changes: 2 additions & 4 deletions trunk/arch/x86/mm/init_32.c
Original file line number Diff line number Diff line change
Expand Up @@ -597,8 +597,6 @@ void __init zone_sizes_init(void)
}
#endif /* !CONFIG_NEED_MULTIPLE_NODES */

extern void reserve_initrd(void);

void __init setup_bootmem_allocator(void)
{
int i;
Expand All @@ -613,9 +611,9 @@ void __init setup_bootmem_allocator(void)
if (bootmap == -1L)
panic("Cannot find bootmem map of size %ld\n", bootmap_size);
reserve_early(bootmap, bootmap + bootmap_size, "BOOTMAP");
#ifdef CONFIG_BLK_DEV_INITRD

reserve_initrd();
#endif

bootmap_size = init_bootmem(bootmap >> PAGE_SHIFT, max_low_pfn);
printk(KERN_INFO " mapped low ram: 0 - %08lx\n",
max_pfn_mapped<<PAGE_SHIFT);
Expand Down
2 changes: 2 additions & 0 deletions trunk/include/asm-x86/setup.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ void reserve_crashkernel(void);
#include <asm/bootparam.h>

void reserve_standard_io_resources(void);
void reserve_initrd(void);


#ifndef _SETUP

Expand Down

0 comments on commit 69fad17

Please sign in to comment.