aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/smpboot.c
diff options
context:
space:
mode:
authorRusty Russell <rusty@rustcorp.com.au>2009-03-13 00:19:53 -0400
committerRusty Russell <rusty@rustcorp.com.au>2009-03-13 00:19:53 -0400
commitc032ef60d1aa9af33730b7a35bbea751b131adc1 (patch)
tree3c3a274c92d29383f1d6b07ab098666d3525a251 /arch/x86/kernel/smpboot.c
parent71ee73e72228775a076a502b3c92028fa59e2889 (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/kernel/smpboot.c')
-rw-r--r--arch/x86/kernel/smpboot.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/x86/kernel/smpboot.c b/arch/x86/kernel/smpboot.c
index c55639b1ab8a..5a58a45ac1e3 100644
--- a/arch/x86/kernel/smpboot.c
+++ b/arch/x86/kernel/smpboot.c
@@ -123,7 +123,7 @@ EXPORT_SYMBOL(cpu_to_node_map);
123static void map_cpu_to_node(int cpu, int node) 123static void map_cpu_to_node(int cpu, int node)
124{ 124{
125 printk(KERN_INFO "Mapping cpu %d to node %d\n", cpu, node); 125 printk(KERN_INFO "Mapping cpu %d to node %d\n", cpu, node);
126 cpumask_set_cpu(cpu, &node_to_cpumask_map[node]); 126 cpumask_set_cpu(cpu, node_to_cpumask_map[node]);
127 cpu_to_node_map[cpu] = node; 127 cpu_to_node_map[cpu] = node;
128} 128}
129 129
@@ -134,7 +134,7 @@ static void unmap_cpu_to_node(int cpu)
134 134
135 printk(KERN_INFO "Unmapping cpu %d from all nodes\n", cpu); 135 printk(KERN_INFO "Unmapping cpu %d from all nodes\n", cpu);
136 for (node = 0; node < MAX_NUMNODES; node++) 136 for (node = 0; node < MAX_NUMNODES; node++)
137 cpumask_clear_cpu(cpu, &node_to_cpumask_map[node]); 137 cpumask_clear_cpu(cpu, node_to_cpumask_map[node]);
138 cpu_to_node_map[cpu] = 0; 138 cpu_to_node_map[cpu] = 0;
139} 139}
140#else /* !(CONFIG_NUMA && CONFIG_X86_32) */ 140#else /* !(CONFIG_NUMA && CONFIG_X86_32) */