aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/cpu/common.c
diff options
context:
space:
mode:
authorBrian Gerst <brgerst@gmail.com>2009-01-18 10:38:59 -0500
committerTejun Heo <tj@kernel.org>2009-01-18 10:38:59 -0500
commite7a22c1ebcc1caa8178df1819d05128bb5b45ab9 (patch)
tree7769b1263850c97fa244a48ad9187ce0d74e1965 /arch/x86/kernel/cpu/common.c
parent5689553076c4a67b83426b076082c63085b7567a (diff)
x86-64: Move nodenumber from PDA to per-cpu.
tj: * s/nodenumber/node_number/ * removed now unused pda variable from pda_init() Signed-off-by: Brian Gerst <brgerst@gmail.com> Signed-off-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'arch/x86/kernel/cpu/common.c')
-rw-r--r--arch/x86/kernel/cpu/common.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/arch/x86/kernel/cpu/common.c b/arch/x86/kernel/cpu/common.c
index e2323ecce1d..7976a6a0f65 100644
--- a/arch/x86/kernel/cpu/common.c
+++ b/arch/x86/kernel/cpu/common.c
@@ -897,18 +897,11 @@ DEFINE_PER_CPU(unsigned int, irq_count) = -1;
897 897
898void __cpuinit pda_init(int cpu) 898void __cpuinit pda_init(int cpu)
899{ 899{
900 struct x8664_pda *pda = cpu_pda(cpu);
901
902 /* Setup up data that may be needed in __get_free_pages early */ 900 /* Setup up data that may be needed in __get_free_pages early */
903 loadsegment(fs, 0); 901 loadsegment(fs, 0);
904 loadsegment(gs, 0); 902 loadsegment(gs, 0);
905 903
906 load_pda_offset(cpu); 904 load_pda_offset(cpu);
907
908 if (cpu != 0) {
909 if (pda->nodenumber == 0 && cpu_to_node(cpu) != NUMA_NO_NODE)
910 pda->nodenumber = cpu_to_node(cpu);
911 }
912} 905}
913 906
914static DEFINE_PER_CPU_PAGE_ALIGNED(char, exception_stacks 907static DEFINE_PER_CPU_PAGE_ALIGNED(char, exception_stacks
@@ -978,6 +971,12 @@ void __cpuinit cpu_init(void)
978 if (cpu != 0) 971 if (cpu != 0)
979 pda_init(cpu); 972 pda_init(cpu);
980 973
974#ifdef CONFIG_NUMA
975 if (cpu != 0 && percpu_read(node_number) == 0 &&
976 cpu_to_node(cpu) != NUMA_NO_NODE)
977 percpu_write(node_number, cpu_to_node(cpu));
978#endif
979
981 me = current; 980 me = current;
982 981
983 if (cpumask_test_and_set_cpu(cpu, cpu_initialized_mask)) 982 if (cpumask_test_and_set_cpu(cpu, cpu_initialized_mask))