diff options
author | Daniel Yeisley <dan.yeisley@unisys.com> | 2006-05-30 16:47:57 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-05-30 23:31:06 -0400 |
commit | 0d01532451710110a93891ae152d1dd1ee006ccf (patch) | |
tree | 565b85776957df727847ffd752018022e83c63f9 /arch/x86_64/kernel/pci-dma.c | |
parent | b2468e525f29882f866cb0b832956e69328f9647 (diff) |
[PATCH] x86_64: Handle empty node zero
From: Daniel Yeisley <dan.yeisley@unisys.com>
It is possible to boot a Unisys ES7000 with CPUs from multiple cells, and not
also include the memory from those cells. This can create a scenario where
node 0 has cpus, but no associated memory. The system will boot fine in a
configuration where node 0 has memory, but nodes 2 and 3 do not.
[AK: I rechecked the code and generic code seems to indeed handle that already.
Dan's original patch had a change for mm/slab.c that seems to be already in now.]
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch/x86_64/kernel/pci-dma.c')
-rw-r--r-- | arch/x86_64/kernel/pci-dma.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/x86_64/kernel/pci-dma.c b/arch/x86_64/kernel/pci-dma.c index af035ede70cd..a9275c9557cf 100644 --- a/arch/x86_64/kernel/pci-dma.c +++ b/arch/x86_64/kernel/pci-dma.c | |||
@@ -54,6 +54,10 @@ dma_alloc_pages(struct device *dev, gfp_t gfp, unsigned order) | |||
54 | else | 54 | else |
55 | #endif | 55 | #endif |
56 | node = numa_node_id(); | 56 | node = numa_node_id(); |
57 | |||
58 | if (node < first_node(node_online_map)) | ||
59 | node = first_node(node_online_map); | ||
60 | |||
57 | page = alloc_pages_node(node, gfp, order); | 61 | page = alloc_pages_node(node, gfp, order); |
58 | return page ? page_address(page) : NULL; | 62 | return page ? page_address(page) : NULL; |
59 | } | 63 | } |