diff options
Diffstat (limited to 'arch/x86/kernel/smpboot.c')
-rw-r--r-- | arch/x86/kernel/smpboot.c | 29 |
1 files changed, 21 insertions, 8 deletions
diff --git a/arch/x86/kernel/smpboot.c b/arch/x86/kernel/smpboot.c index ec7b64c2df82..213a7a3e4562 100644 --- a/arch/x86/kernel/smpboot.c +++ b/arch/x86/kernel/smpboot.c | |||
@@ -47,6 +47,7 @@ | |||
47 | #include <linux/bootmem.h> | 47 | #include <linux/bootmem.h> |
48 | #include <linux/err.h> | 48 | #include <linux/err.h> |
49 | #include <linux/nmi.h> | 49 | #include <linux/nmi.h> |
50 | #include <linux/tboot.h> | ||
50 | 51 | ||
51 | #include <asm/acpi.h> | 52 | #include <asm/acpi.h> |
52 | #include <asm/desc.h> | 53 | #include <asm/desc.h> |
@@ -324,7 +325,7 @@ notrace static void __cpuinit start_secondary(void *unused) | |||
324 | /* enable local interrupts */ | 325 | /* enable local interrupts */ |
325 | local_irq_enable(); | 326 | local_irq_enable(); |
326 | 327 | ||
327 | setup_secondary_clock(); | 328 | x86_cpuinit.setup_percpu_clockev(); |
328 | 329 | ||
329 | wmb(); | 330 | wmb(); |
330 | load_debug_registers(); | 331 | load_debug_registers(); |
@@ -1060,12 +1061,9 @@ void __init native_smp_prepare_cpus(unsigned int max_cpus) | |||
1060 | #endif | 1061 | #endif |
1061 | current_thread_info()->cpu = 0; /* needed? */ | 1062 | current_thread_info()->cpu = 0; /* needed? */ |
1062 | for_each_possible_cpu(i) { | 1063 | for_each_possible_cpu(i) { |
1063 | alloc_cpumask_var(&per_cpu(cpu_sibling_map, i), GFP_KERNEL); | 1064 | zalloc_cpumask_var(&per_cpu(cpu_sibling_map, i), GFP_KERNEL); |
1064 | alloc_cpumask_var(&per_cpu(cpu_core_map, i), GFP_KERNEL); | 1065 | zalloc_cpumask_var(&per_cpu(cpu_core_map, i), GFP_KERNEL); |
1065 | alloc_cpumask_var(&cpu_data(i).llc_shared_map, GFP_KERNEL); | 1066 | zalloc_cpumask_var(&cpu_data(i).llc_shared_map, GFP_KERNEL); |
1066 | cpumask_clear(per_cpu(cpu_core_map, i)); | ||
1067 | cpumask_clear(per_cpu(cpu_sibling_map, i)); | ||
1068 | cpumask_clear(cpu_data(i).llc_shared_map); | ||
1069 | } | 1067 | } |
1070 | set_cpu_sibling_map(0); | 1068 | set_cpu_sibling_map(0); |
1071 | 1069 | ||
@@ -1115,13 +1113,26 @@ void __init native_smp_prepare_cpus(unsigned int max_cpus) | |||
1115 | 1113 | ||
1116 | printk(KERN_INFO "CPU%d: ", 0); | 1114 | printk(KERN_INFO "CPU%d: ", 0); |
1117 | print_cpu_info(&cpu_data(0)); | 1115 | print_cpu_info(&cpu_data(0)); |
1118 | setup_boot_clock(); | 1116 | x86_init.timers.setup_percpu_clockev(); |
1119 | 1117 | ||
1120 | if (is_uv_system()) | 1118 | if (is_uv_system()) |
1121 | uv_system_init(); | 1119 | uv_system_init(); |
1120 | |||
1121 | set_mtrr_aps_delayed_init(); | ||
1122 | out: | 1122 | out: |
1123 | preempt_enable(); | 1123 | preempt_enable(); |
1124 | } | 1124 | } |
1125 | |||
1126 | void arch_enable_nonboot_cpus_begin(void) | ||
1127 | { | ||
1128 | set_mtrr_aps_delayed_init(); | ||
1129 | } | ||
1130 | |||
1131 | void arch_enable_nonboot_cpus_end(void) | ||
1132 | { | ||
1133 | mtrr_aps_init(); | ||
1134 | } | ||
1135 | |||
1125 | /* | 1136 | /* |
1126 | * Early setup to make printk work. | 1137 | * Early setup to make printk work. |
1127 | */ | 1138 | */ |
@@ -1143,6 +1154,7 @@ void __init native_smp_cpus_done(unsigned int max_cpus) | |||
1143 | setup_ioapic_dest(); | 1154 | setup_ioapic_dest(); |
1144 | #endif | 1155 | #endif |
1145 | check_nmi_watchdog(); | 1156 | check_nmi_watchdog(); |
1157 | mtrr_aps_init(); | ||
1146 | } | 1158 | } |
1147 | 1159 | ||
1148 | static int __initdata setup_possible_cpus = -1; | 1160 | static int __initdata setup_possible_cpus = -1; |
@@ -1321,6 +1333,7 @@ void play_dead_common(void) | |||
1321 | void native_play_dead(void) | 1333 | void native_play_dead(void) |
1322 | { | 1334 | { |
1323 | play_dead_common(); | 1335 | play_dead_common(); |
1336 | tboot_shutdown(TB_SHUTDOWN_WFS); | ||
1324 | wbinvd_halt(); | 1337 | wbinvd_halt(); |
1325 | } | 1338 | } |
1326 | 1339 | ||