diff options
author | David S. Miller <davem@davemloft.net> | 2008-04-03 17:33:42 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-04-03 17:33:42 -0400 |
commit | 3bb5da3837cc1aa17736b05139c9a22c3794851a (patch) | |
tree | c92d5684a866542b1cb20641607ac1643ce03a47 /arch/x86/kernel/setup64.c | |
parent | 7feb49c82a74bc7c091b8ab2a3f96baa33d08ece (diff) | |
parent | 9597362d354f8655ece324b01d0c640a0e99c077 (diff) |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
Diffstat (limited to 'arch/x86/kernel/setup64.c')
-rw-r--r-- | arch/x86/kernel/setup64.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/arch/x86/kernel/setup64.c b/arch/x86/kernel/setup64.c index 309366f8f603..e24c45677094 100644 --- a/arch/x86/kernel/setup64.c +++ b/arch/x86/kernel/setup64.c | |||
@@ -142,14 +142,16 @@ void __init setup_per_cpu_areas(void) | |||
142 | printk(KERN_INFO "PERCPU: Allocating %lu bytes of per cpu data\n", size); | 142 | printk(KERN_INFO "PERCPU: Allocating %lu bytes of per cpu data\n", size); |
143 | for_each_cpu_mask (i, cpu_possible_map) { | 143 | for_each_cpu_mask (i, cpu_possible_map) { |
144 | char *ptr; | 144 | char *ptr; |
145 | #ifndef CONFIG_NEED_MULTIPLE_NODES | ||
146 | ptr = alloc_bootmem_pages(size); | ||
147 | #else | ||
148 | int node = early_cpu_to_node(i); | ||
145 | 149 | ||
146 | if (!NODE_DATA(early_cpu_to_node(i))) { | 150 | if (!node_online(node) || !NODE_DATA(node)) |
147 | printk("cpu with no node %d, num_online_nodes %d\n", | ||
148 | i, num_online_nodes()); | ||
149 | ptr = alloc_bootmem_pages(size); | 151 | ptr = alloc_bootmem_pages(size); |
150 | } else { | 152 | else |
151 | ptr = alloc_bootmem_pages_node(NODE_DATA(early_cpu_to_node(i)), size); | 153 | ptr = alloc_bootmem_pages_node(NODE_DATA(node), size); |
152 | } | 154 | #endif |
153 | if (!ptr) | 155 | if (!ptr) |
154 | panic("Cannot allocate cpu data for CPU %d\n", i); | 156 | panic("Cannot allocate cpu data for CPU %d\n", i); |
155 | cpu_pda(i)->data_offset = ptr - __per_cpu_start; | 157 | cpu_pda(i)->data_offset = ptr - __per_cpu_start; |