From 74fbd3694fa98ef09dff83d172ba2b184b125893 Mon Sep 17 00:00:00 2001 From: Andi Kleen Date: Mon, 12 Sep 2005 18:49:24 +0200 Subject: [PATCH] --- yaml --- r: 8585 b: refs/heads/master c: 5d3d0f7704ed0bc7eaca0501eeae3e5da1ea6c87 h: refs/heads/master i: 8583: aa913f82f0d994e807c7414612fbbb7496d976fb v: v3 --- [refs] | 2 +- trunk/mm/bootmem.c | 14 +++++++++++--- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/[refs] b/[refs] index 68a02d6d27f3..902aaed3625e 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 6142891a0c0209c91aa4a98f725de0d6e2ed4918 +refs/heads/master: 5d3d0f7704ed0bc7eaca0501eeae3e5da1ea6c87 diff --git a/trunk/mm/bootmem.c b/trunk/mm/bootmem.c index c1330cc19783..8ec4e4c2a179 100644 --- a/trunk/mm/bootmem.c +++ b/trunk/mm/bootmem.c @@ -61,9 +61,17 @@ static unsigned long __init init_bootmem_core (pg_data_t *pgdat, { bootmem_data_t *bdata = pgdat->bdata; unsigned long mapsize = ((end - start)+7)/8; - - pgdat->pgdat_next = pgdat_list; - pgdat_list = pgdat; + static struct pglist_data *pgdat_last; + + pgdat->pgdat_next = NULL; + /* Add new nodes last so that bootmem always starts + searching in the first nodes, not the last ones */ + if (pgdat_last) + pgdat_last->pgdat_next = pgdat; + else { + pgdat_list = pgdat; + pgdat_last = pgdat; + } mapsize = ALIGN(mapsize, sizeof(long)); bdata->node_bootmem_map = phys_to_virt(mapstart << PAGE_SHIFT);