Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 99886
b: refs/heads/master
c: 11cd0bc
h: refs/heads/master
v: v3
  • Loading branch information
Yinghai Lu authored and Ingo Molnar committed Jul 8, 2008
1 parent 91784c1 commit 753a140
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 33 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: c09434571d4b1d8abf530ba4ce28cb868b45f2e5
refs/heads/master: 11cd0bc140b5d66566c9eb49c1058737888cd75c
34 changes: 2 additions & 32 deletions trunk/arch/x86/kernel/setup_32.c
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ static void __init reserve_initrd(void)

#define MAX_MAP_CHUNK (NR_FIX_BTMAPS << PAGE_SHIFT)

static void __init post_reserve_initrd(void)
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 @@ -307,29 +307,11 @@ static void __init post_reserve_initrd(void)
void __init reserve_initrd(void)
{
}
static void __init post_reserve_initrd(void)
void __init post_reserve_initrd(void)
{
}
#endif /* CONFIG_BLK_DEV_INITRD */

/*
* The node 0 pgdat is initialized before all of these because
* it's needed for bootmem. node>0 pgdats have their virtual
* space allocated before the pagetables are in place to access
* them, so they can't be cleared then.
*
* This should all compile down to nothing when NUMA is off.
*/
static void __init remapped_pgdat_init(void)
{
int nid;

for_each_online_node(nid) {
if (nid != 0)
memset(NODE_DATA(nid), 0, sizeof(struct pglist_data));
}
}

#ifdef CONFIG_MCA
static void set_mca_bus(int x)
{
Expand Down Expand Up @@ -524,18 +506,6 @@ void __init setup_arch(char **cmdline_p)
init_ohci1394_dma_on_all_controllers();
#endif

/*
* NOTE: at this point the bootmem allocator is fully available.
*/

post_reserve_initrd();

remapped_pgdat_init();
sparse_init();
zone_sizes_init();

paravirt_post_allocator_init();

#ifdef CONFIG_X86_GENERICARCH
generic_apic_probe();
#endif
Expand Down
29 changes: 29 additions & 0 deletions trunk/arch/x86/mm/init_32.c
Original file line number Diff line number Diff line change
Expand Up @@ -705,6 +705,23 @@ void __init setup_bootmem_allocator(void)

}

/*
* The node 0 pgdat is initialized before all of these because
* it's needed for bootmem. node>0 pgdats have their virtual
* space allocated before the pagetables are in place to access
* them, so they can't be cleared then.
*
* This should all compile down to nothing when NUMA is off.
*/
static void __init remapped_pgdat_init(void)
{
int nid;

for_each_online_node(nid) {
if (nid != 0)
memset(NODE_DATA(nid), 0, sizeof(struct pglist_data));
}
}

/*
* paging_init() sets up the page tables - note that the first 8MB are
Expand All @@ -727,6 +744,18 @@ void __init paging_init(void)
__flush_tlb_all();

kmap_init();

/*
* NOTE: at this point the bootmem allocator is fully available.
*/

post_reserve_initrd();

remapped_pgdat_init();
sparse_init();
zone_sizes_init();

paravirt_post_allocator_init();
}

/*
Expand Down
1 change: 1 addition & 0 deletions trunk/include/asm-x86/setup.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ void reserve_crashkernel(void);
#include <asm/bootparam.h>

void reserve_standard_io_resources(void);
extern void post_reserve_initrd(void);

#ifndef _SETUP

Expand Down

0 comments on commit 753a140

Please sign in to comment.