diff options
author | Haavard Skinnemoen <haavard.skinnemoen@atmel.com> | 2009-10-06 11:36:55 -0400 |
---|---|---|
committer | Haavard Skinnemoen <haavard.skinnemoen@atmel.com> | 2009-10-06 11:36:55 -0400 |
commit | d94e5fcbf1420366dcb4102bafe04dbcfc0d0d4b (patch) | |
tree | a9b7de7df6da5c3132cc68169b9c47ba288ccd42 /arch/x86/kernel/smpboot.c | |
parent | d55651168a20078a94597a297d5cdfd807bf07b6 (diff) | |
parent | 374576a8b6f865022c0fd1ca62396889b23d66dd (diff) |
Merge commit 'v2.6.32-rc3'
Diffstat (limited to 'arch/x86/kernel/smpboot.c')
-rw-r--r-- | arch/x86/kernel/smpboot.c | 32 |
1 files changed, 23 insertions, 9 deletions
diff --git a/arch/x86/kernel/smpboot.c b/arch/x86/kernel/smpboot.c index 2fecda69ee64..565ebc65920e 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> |
@@ -323,7 +324,7 @@ notrace static void __cpuinit start_secondary(void *unused) | |||
323 | /* enable local interrupts */ | 324 | /* enable local interrupts */ |
324 | local_irq_enable(); | 325 | local_irq_enable(); |
325 | 326 | ||
326 | setup_secondary_clock(); | 327 | x86_cpuinit.setup_percpu_clockev(); |
327 | 328 | ||
328 | wmb(); | 329 | wmb(); |
329 | cpu_idle(); | 330 | cpu_idle(); |
@@ -434,7 +435,8 @@ const struct cpumask *cpu_coregroup_mask(int cpu) | |||
434 | * For perf, we return last level cache shared map. | 435 | * For perf, we return last level cache shared map. |
435 | * And for power savings, we return cpu_core_map | 436 | * And for power savings, we return cpu_core_map |
436 | */ | 437 | */ |
437 | if (sched_mc_power_savings || sched_smt_power_savings) | 438 | if ((sched_mc_power_savings || sched_smt_power_savings) && |
439 | !(cpu_has(c, X86_FEATURE_AMD_DCM))) | ||
438 | return cpu_core_mask(cpu); | 440 | return cpu_core_mask(cpu); |
439 | else | 441 | else |
440 | return c->llc_shared_map; | 442 | return c->llc_shared_map; |
@@ -1057,12 +1059,9 @@ void __init native_smp_prepare_cpus(unsigned int max_cpus) | |||
1057 | #endif | 1059 | #endif |
1058 | current_thread_info()->cpu = 0; /* needed? */ | 1060 | current_thread_info()->cpu = 0; /* needed? */ |
1059 | for_each_possible_cpu(i) { | 1061 | for_each_possible_cpu(i) { |
1060 | alloc_cpumask_var(&per_cpu(cpu_sibling_map, i), GFP_KERNEL); | 1062 | zalloc_cpumask_var(&per_cpu(cpu_sibling_map, i), GFP_KERNEL); |
1061 | alloc_cpumask_var(&per_cpu(cpu_core_map, i), GFP_KERNEL); | 1063 | zalloc_cpumask_var(&per_cpu(cpu_core_map, i), GFP_KERNEL); |
1062 | alloc_cpumask_var(&cpu_data(i).llc_shared_map, GFP_KERNEL); | 1064 | zalloc_cpumask_var(&cpu_data(i).llc_shared_map, GFP_KERNEL); |
1063 | cpumask_clear(per_cpu(cpu_core_map, i)); | ||
1064 | cpumask_clear(per_cpu(cpu_sibling_map, i)); | ||
1065 | cpumask_clear(cpu_data(i).llc_shared_map); | ||
1066 | } | 1065 | } |
1067 | set_cpu_sibling_map(0); | 1066 | set_cpu_sibling_map(0); |
1068 | 1067 | ||
@@ -1112,13 +1111,26 @@ void __init native_smp_prepare_cpus(unsigned int max_cpus) | |||
1112 | 1111 | ||
1113 | printk(KERN_INFO "CPU%d: ", 0); | 1112 | printk(KERN_INFO "CPU%d: ", 0); |
1114 | print_cpu_info(&cpu_data(0)); | 1113 | print_cpu_info(&cpu_data(0)); |
1115 | setup_boot_clock(); | 1114 | x86_init.timers.setup_percpu_clockev(); |
1116 | 1115 | ||
1117 | if (is_uv_system()) | 1116 | if (is_uv_system()) |
1118 | uv_system_init(); | 1117 | uv_system_init(); |
1118 | |||
1119 | set_mtrr_aps_delayed_init(); | ||
1119 | out: | 1120 | out: |
1120 | preempt_enable(); | 1121 | preempt_enable(); |
1121 | } | 1122 | } |
1123 | |||
1124 | void arch_enable_nonboot_cpus_begin(void) | ||
1125 | { | ||
1126 | set_mtrr_aps_delayed_init(); | ||
1127 | } | ||
1128 | |||
1129 | void arch_enable_nonboot_cpus_end(void) | ||
1130 | { | ||
1131 | mtrr_aps_init(); | ||
1132 | } | ||
1133 | |||
1122 | /* | 1134 | /* |
1123 | * Early setup to make printk work. | 1135 | * Early setup to make printk work. |
1124 | */ | 1136 | */ |
@@ -1140,6 +1152,7 @@ void __init native_smp_cpus_done(unsigned int max_cpus) | |||
1140 | setup_ioapic_dest(); | 1152 | setup_ioapic_dest(); |
1141 | #endif | 1153 | #endif |
1142 | check_nmi_watchdog(); | 1154 | check_nmi_watchdog(); |
1155 | mtrr_aps_init(); | ||
1143 | } | 1156 | } |
1144 | 1157 | ||
1145 | static int __initdata setup_possible_cpus = -1; | 1158 | static int __initdata setup_possible_cpus = -1; |
@@ -1317,6 +1330,7 @@ void play_dead_common(void) | |||
1317 | void native_play_dead(void) | 1330 | void native_play_dead(void) |
1318 | { | 1331 | { |
1319 | play_dead_common(); | 1332 | play_dead_common(); |
1333 | tboot_shutdown(TB_SHUTDOWN_WFS); | ||
1320 | wbinvd_halt(); | 1334 | wbinvd_halt(); |
1321 | } | 1335 | } |
1322 | 1336 | ||