diff options
author | Andy Whitcroft <apw@shadowen.org> | 2008-05-20 06:01:19 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-05-20 08:10:50 -0400 |
commit | 84d6bd0e272e6eace1e7e4c501f32bddfb665bb2 (patch) | |
tree | 9b86cf80ba7a02290fa01552dc24947fa1763096 /arch/x86/mm | |
parent | b9ada4281c48076bdb252813be24ddb57e17cade (diff) |
x86: cope with no remap space being allocated for a numa node
When allocating the pgdat's for numa nodes on x86_32 we attempt to place
them in the numa remap space for that node. However should the node not
have any remap space allocated (such as due to having non-ram pages in
the remap location in the node) then we will incorrectly place the pgdat
at zero. Check we have remap available, falling back to node 0 memory
where we do not.
Signed-off-by: Andy Whitcroft <apw@shadowen.org>
Acked-by: Mel Gorman <mel@csn.ul.ie>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/mm')
-rw-r--r-- | arch/x86/mm/discontig_32.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/x86/mm/discontig_32.c b/arch/x86/mm/discontig_32.c index 026201f143a8..435c343c14bc 100644 --- a/arch/x86/mm/discontig_32.c +++ b/arch/x86/mm/discontig_32.c | |||
@@ -156,7 +156,7 @@ static void __init propagate_e820_map_node(int nid) | |||
156 | */ | 156 | */ |
157 | static void __init allocate_pgdat(int nid) | 157 | static void __init allocate_pgdat(int nid) |
158 | { | 158 | { |
159 | if (nid && node_has_online_mem(nid)) | 159 | if (nid && node_has_online_mem(nid) && node_remap_start_vaddr[nid]) |
160 | NODE_DATA(nid) = (pg_data_t *)node_remap_start_vaddr[nid]; | 160 | NODE_DATA(nid) = (pg_data_t *)node_remap_start_vaddr[nid]; |
161 | else { | 161 | else { |
162 | NODE_DATA(nid) = (pg_data_t *)(pfn_to_kaddr(min_low_pfn)); | 162 | NODE_DATA(nid) = (pg_data_t *)(pfn_to_kaddr(min_low_pfn)); |