aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/cpu.c
diff options
context:
space:
mode:
authorShane Wang <shane.wang@intel.com>2009-09-01 21:25:07 -0400
committerH. Peter Anvin <hpa@zytor.com>2009-09-01 21:25:07 -0400
commit69575d388603365f2afbf4166df93152df59b165 (patch)
treeca3d66668c8ec47befc0adbfa62cf135229bda59 /kernel/cpu.c
parent62a3207b8cf3de35368cdc3822b30b82d59eea95 (diff)
x86, intel_txt: clean up the impact on generic code, unbreak non-x86
Move tboot.h from asm to linux to fix the build errors of intel_txt patch on non-X86 platforms. Remove the tboot code from generic code init/main.c and kernel/cpu.c. Signed-off-by: Shane Wang <shane.wang@intel.com> Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Diffstat (limited to 'kernel/cpu.c')
-rw-r--r--kernel/cpu.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/kernel/cpu.c b/kernel/cpu.c
index ff071e022a85..67a60076dd7e 100644
--- a/kernel/cpu.c
+++ b/kernel/cpu.c
@@ -14,7 +14,6 @@
14#include <linux/kthread.h> 14#include <linux/kthread.h>
15#include <linux/stop_machine.h> 15#include <linux/stop_machine.h>
16#include <linux/mutex.h> 16#include <linux/mutex.h>
17#include <asm/tboot.h>
18 17
19#ifdef CONFIG_SMP 18#ifdef CONFIG_SMP
20/* Serializes the updates to cpu_online_mask, cpu_present_mask */ 19/* Serializes the updates to cpu_online_mask, cpu_present_mask */
@@ -377,7 +376,7 @@ static cpumask_var_t frozen_cpus;
377 376
378int disable_nonboot_cpus(void) 377int disable_nonboot_cpus(void)
379{ 378{
380 int cpu, first_cpu, error, num_cpus = 0; 379 int cpu, first_cpu, error;
381 380
382 error = stop_machine_create(); 381 error = stop_machine_create();
383 if (error) 382 if (error)
@@ -392,7 +391,6 @@ int disable_nonboot_cpus(void)
392 for_each_online_cpu(cpu) { 391 for_each_online_cpu(cpu) {
393 if (cpu == first_cpu) 392 if (cpu == first_cpu)
394 continue; 393 continue;
395 num_cpus++;
396 error = _cpu_down(cpu, 1); 394 error = _cpu_down(cpu, 1);
397 if (!error) { 395 if (!error) {
398 cpumask_set_cpu(cpu, frozen_cpus); 396 cpumask_set_cpu(cpu, frozen_cpus);
@@ -403,8 +401,6 @@ int disable_nonboot_cpus(void)
403 break; 401 break;
404 } 402 }
405 } 403 }
406 /* ensure all CPUs have gone into wait-for-SIPI */
407 error |= tboot_wait_for_aps(num_cpus);
408 404
409 if (!error) { 405 if (!error) {
410 BUG_ON(num_online_cpus() > 1); 406 BUG_ON(num_online_cpus() > 1);