diff options
Diffstat (limited to 'arch/i386/kernel/smpboot.c')
-rw-r--r-- | arch/i386/kernel/smpboot.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/arch/i386/kernel/smpboot.c b/arch/i386/kernel/smpboot.c index 4bb8b77cd65..02a9b66b6ac 100644 --- a/arch/i386/kernel/smpboot.c +++ b/arch/i386/kernel/smpboot.c | |||
@@ -1049,13 +1049,15 @@ void cpu_exit_clear(void) | |||
1049 | 1049 | ||
1050 | struct warm_boot_cpu_info { | 1050 | struct warm_boot_cpu_info { |
1051 | struct completion *complete; | 1051 | struct completion *complete; |
1052 | struct work_struct task; | ||
1052 | int apicid; | 1053 | int apicid; |
1053 | int cpu; | 1054 | int cpu; |
1054 | }; | 1055 | }; |
1055 | 1056 | ||
1056 | static void __cpuinit do_warm_boot_cpu(void *p) | 1057 | static void __cpuinit do_warm_boot_cpu(struct work_struct *work) |
1057 | { | 1058 | { |
1058 | struct warm_boot_cpu_info *info = p; | 1059 | struct warm_boot_cpu_info *info = |
1060 | container_of(work, struct warm_boot_cpu_info, task); | ||
1059 | do_boot_cpu(info->apicid, info->cpu); | 1061 | do_boot_cpu(info->apicid, info->cpu); |
1060 | complete(info->complete); | 1062 | complete(info->complete); |
1061 | } | 1063 | } |
@@ -1064,7 +1066,6 @@ static int __cpuinit __smp_prepare_cpu(int cpu) | |||
1064 | { | 1066 | { |
1065 | DECLARE_COMPLETION_ONSTACK(done); | 1067 | DECLARE_COMPLETION_ONSTACK(done); |
1066 | struct warm_boot_cpu_info info; | 1068 | struct warm_boot_cpu_info info; |
1067 | struct work_struct task; | ||
1068 | int apicid, ret; | 1069 | int apicid, ret; |
1069 | struct Xgt_desc_struct *cpu_gdt_descr = &per_cpu(cpu_gdt_descr, cpu); | 1070 | struct Xgt_desc_struct *cpu_gdt_descr = &per_cpu(cpu_gdt_descr, cpu); |
1070 | 1071 | ||
@@ -1089,7 +1090,7 @@ static int __cpuinit __smp_prepare_cpu(int cpu) | |||
1089 | info.complete = &done; | 1090 | info.complete = &done; |
1090 | info.apicid = apicid; | 1091 | info.apicid = apicid; |
1091 | info.cpu = cpu; | 1092 | info.cpu = cpu; |
1092 | INIT_WORK(&task, do_warm_boot_cpu, &info); | 1093 | INIT_WORK(&info.task, do_warm_boot_cpu); |
1093 | 1094 | ||
1094 | tsc_sync_disabled = 1; | 1095 | tsc_sync_disabled = 1; |
1095 | 1096 | ||
@@ -1097,7 +1098,7 @@ static int __cpuinit __smp_prepare_cpu(int cpu) | |||
1097 | clone_pgd_range(swapper_pg_dir, swapper_pg_dir + USER_PGD_PTRS, | 1098 | clone_pgd_range(swapper_pg_dir, swapper_pg_dir + USER_PGD_PTRS, |
1098 | KERNEL_PGD_PTRS); | 1099 | KERNEL_PGD_PTRS); |
1099 | flush_tlb_all(); | 1100 | flush_tlb_all(); |
1100 | schedule_work(&task); | 1101 | schedule_work(&info.task); |
1101 | wait_for_completion(&done); | 1102 | wait_for_completion(&done); |
1102 | 1103 | ||
1103 | tsc_sync_disabled = 0; | 1104 | tsc_sync_disabled = 0; |