diff options
author | Rusty Russell <rusty@rustcorp.com.au> | 2009-03-13 00:19:53 -0400 |
---|---|---|
committer | Rusty Russell <rusty@rustcorp.com.au> | 2009-03-13 00:19:53 -0400 |
commit | c032ef60d1aa9af33730b7a35bbea751b131adc1 (patch) | |
tree | 3c3a274c92d29383f1d6b07ab098666d3525a251 /arch/x86/mm/numa_64.c | |
parent | 71ee73e72228775a076a502b3c92028fa59e2889 (diff) |
cpumask: convert node_to_cpumask_map[] to cpumask_var_t
Impact: reduce kernel memory usage when CONFIG_CPUMASK_OFFSTACK=y
Straightforward conversion: done for 32 and 64 bit kernels.
node_to_cpumask_map is now a cpumask_var_t array.
64-bit used to be a dynamic cpumask_t array, and 32-bit used to be a
static cpumask_t array.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Diffstat (limited to 'arch/x86/mm/numa_64.c')
-rw-r--r-- | arch/x86/mm/numa_64.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/arch/x86/mm/numa_64.c b/arch/x86/mm/numa_64.c index eee149078862..9d2b3d2625cd 100644 --- a/arch/x86/mm/numa_64.c +++ b/arch/x86/mm/numa_64.c | |||
@@ -681,12 +681,12 @@ void __cpuinit numa_clear_node(int cpu) | |||
681 | 681 | ||
682 | void __cpuinit numa_add_cpu(int cpu) | 682 | void __cpuinit numa_add_cpu(int cpu) |
683 | { | 683 | { |
684 | cpu_set(cpu, node_to_cpumask_map[early_cpu_to_node(cpu)]); | 684 | cpumask_set_cpu(cpu, node_to_cpumask_map[early_cpu_to_node(cpu)]); |
685 | } | 685 | } |
686 | 686 | ||
687 | void __cpuinit numa_remove_cpu(int cpu) | 687 | void __cpuinit numa_remove_cpu(int cpu) |
688 | { | 688 | { |
689 | cpu_clear(cpu, node_to_cpumask_map[early_cpu_to_node(cpu)]); | 689 | cpumask_clear_cpu(cpu, node_to_cpumask_map[early_cpu_to_node(cpu)]); |
690 | } | 690 | } |
691 | 691 | ||
692 | #else /* CONFIG_DEBUG_PER_CPU_MAPS */ | 692 | #else /* CONFIG_DEBUG_PER_CPU_MAPS */ |
@@ -700,17 +700,17 @@ static void __cpuinit numa_set_cpumask(int cpu, int enable) | |||
700 | cpumask_t *mask; | 700 | cpumask_t *mask; |
701 | char buf[64]; | 701 | char buf[64]; |
702 | 702 | ||
703 | if (node_to_cpumask_map == NULL) { | 703 | mask = node_to_cpumask_map[node]; |
704 | printk(KERN_ERR "node_to_cpumask_map NULL\n"); | 704 | if (mask == NULL) { |
705 | printk(KERN_ERR "node_to_cpumask_map[%i] NULL\n", node); | ||
705 | dump_stack(); | 706 | dump_stack(); |
706 | return; | 707 | return; |
707 | } | 708 | } |
708 | 709 | ||
709 | mask = &node_to_cpumask_map[node]; | ||
710 | if (enable) | 710 | if (enable) |
711 | cpu_set(cpu, *mask); | 711 | cpumask_set_cpu(cpu, mask); |
712 | else | 712 | else |
713 | cpu_clear(cpu, *mask); | 713 | cpumask_clear_cpu(cpu, mask); |
714 | 714 | ||
715 | cpulist_scnprintf(buf, sizeof(buf), mask); | 715 | cpulist_scnprintf(buf, sizeof(buf), mask); |
716 | printk(KERN_DEBUG "%s cpu %d node %d: mask now %s\n", | 716 | printk(KERN_DEBUG "%s cpu %d node %d: mask now %s\n", |