diff options
author | Mike Travis <travis@sgi.com> | 2007-10-16 04:24:05 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-10-16 12:42:50 -0400 |
commit | d5a7430ddcdb598261d70f7eb1bf450b5be52085 (patch) | |
tree | 3b94672e0dbc2bff125de3266908f1a47a17b795 /arch/x86/kernel/io_apic_32.c | |
parent | 083576112940fda783d716fd5ccc744f81667b2f (diff) |
Convert cpu_sibling_map to be a per cpu variable
Convert cpu_sibling_map from a static array sized by NR_CPUS to a per_cpu
variable. This saves sizeof(cpumask_t) * NR unused cpus. Access is mostly
from startup and CPU HOTPLUG functions.
Signed-off-by: Mike Travis <travis@sgi.com>
Cc: Andi Kleen <ak@suse.de>
Cc: Christoph Lameter <clameter@sgi.com>
Cc: "Siddha, Suresh B" <suresh.b.siddha@intel.com>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: "Luck, Tony" <tony.luck@intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/x86/kernel/io_apic_32.c')
-rw-r--r-- | arch/x86/kernel/io_apic_32.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/x86/kernel/io_apic_32.c b/arch/x86/kernel/io_apic_32.c index e2f4a1c68547..4ee1e5ee9b57 100644 --- a/arch/x86/kernel/io_apic_32.c +++ b/arch/x86/kernel/io_apic_32.c | |||
@@ -378,7 +378,7 @@ static struct irq_cpu_info { | |||
378 | 378 | ||
379 | #define IRQ_ALLOWED(cpu, allowed_mask) cpu_isset(cpu, allowed_mask) | 379 | #define IRQ_ALLOWED(cpu, allowed_mask) cpu_isset(cpu, allowed_mask) |
380 | 380 | ||
381 | #define CPU_TO_PACKAGEINDEX(i) (first_cpu(cpu_sibling_map[i])) | 381 | #define CPU_TO_PACKAGEINDEX(i) (first_cpu(per_cpu(cpu_sibling_map, i))) |
382 | 382 | ||
383 | static cpumask_t balance_irq_affinity[NR_IRQS] = { | 383 | static cpumask_t balance_irq_affinity[NR_IRQS] = { |
384 | [0 ... NR_IRQS-1] = CPU_MASK_ALL | 384 | [0 ... NR_IRQS-1] = CPU_MASK_ALL |
@@ -598,7 +598,7 @@ tryanotherirq: | |||
598 | * (A+B)/2 vs B | 598 | * (A+B)/2 vs B |
599 | */ | 599 | */ |
600 | load = CPU_IRQ(min_loaded) >> 1; | 600 | load = CPU_IRQ(min_loaded) >> 1; |
601 | for_each_cpu_mask(j, cpu_sibling_map[min_loaded]) { | 601 | for_each_cpu_mask(j, per_cpu(cpu_sibling_map, min_loaded)) { |
602 | if (load > CPU_IRQ(j)) { | 602 | if (load > CPU_IRQ(j)) { |
603 | /* This won't change cpu_sibling_map[min_loaded] */ | 603 | /* This won't change cpu_sibling_map[min_loaded] */ |
604 | load = CPU_IRQ(j); | 604 | load = CPU_IRQ(j); |