diff options
author | Yinghai Lu <yinghai@kernel.org> | 2009-05-28 21:14:40 -0400 |
---|---|---|
committer | Pekka Enberg <penberg@cs.helsinki.fi> | 2009-06-11 12:27:08 -0400 |
commit | dad213aeb59718623fc59defeff95fe8c3feb8a0 (patch) | |
tree | 3b43b199f0c8a03f010f03087428b0d6c67cd75c /arch/x86/kernel/apic | |
parent | 38c7fed2f5ffee17e1fa3e0f78b0e1bf43d52d13 (diff) |
irq/cpumask: make memoryless node zero happy
Don't hardcode to node zero for early boot IRQ setup memory allocations.
[ penberg@cs.helsinki.fi: minor cleanups ]
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Yinghai Lu <yinghai@kernel.org>
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Diffstat (limited to 'arch/x86/kernel/apic')
-rw-r--r-- | arch/x86/kernel/apic/io_apic.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/arch/x86/kernel/apic/io_apic.c b/arch/x86/kernel/apic/io_apic.c index 139201a562ba..94605e7f6a54 100644 --- a/arch/x86/kernel/apic/io_apic.c +++ b/arch/x86/kernel/apic/io_apic.c | |||
@@ -177,16 +177,18 @@ int __init arch_early_irq_init(void) | |||
177 | struct irq_cfg *cfg; | 177 | struct irq_cfg *cfg; |
178 | struct irq_desc *desc; | 178 | struct irq_desc *desc; |
179 | int count; | 179 | int count; |
180 | int node; | ||
180 | int i; | 181 | int i; |
181 | 182 | ||
182 | cfg = irq_cfgx; | 183 | cfg = irq_cfgx; |
183 | count = ARRAY_SIZE(irq_cfgx); | 184 | count = ARRAY_SIZE(irq_cfgx); |
185 | node= cpu_to_node(boot_cpu_id); | ||
184 | 186 | ||
185 | for (i = 0; i < count; i++) { | 187 | for (i = 0; i < count; i++) { |
186 | desc = irq_to_desc(i); | 188 | desc = irq_to_desc(i); |
187 | desc->chip_data = &cfg[i]; | 189 | desc->chip_data = &cfg[i]; |
188 | alloc_cpumask_var(&cfg[i].domain, GFP_NOWAIT); | 190 | alloc_cpumask_var_node(&cfg[i].domain, GFP_NOWAIT, node); |
189 | alloc_cpumask_var(&cfg[i].old_domain, GFP_NOWAIT); | 191 | alloc_cpumask_var_node(&cfg[i].old_domain, GFP_NOWAIT, node); |
190 | if (i < NR_IRQS_LEGACY) | 192 | if (i < NR_IRQS_LEGACY) |
191 | cpumask_setall(cfg[i].domain); | 193 | cpumask_setall(cfg[i].domain); |
192 | } | 194 | } |