diff options
Diffstat (limited to 'arch')
-rw-r--r-- | arch/i386/kernel/cpu/mcheck/non-fatal.c | 6 | ||||
-rw-r--r-- | arch/i386/kernel/smpboot.c | 11 | ||||
-rw-r--r-- | arch/i386/kernel/tsc.c | 4 | ||||
-rw-r--r-- | arch/powerpc/platforms/pseries/eeh_event.c | 6 | ||||
-rw-r--r-- | arch/x86_64/kernel/mce.c | 6 | ||||
-rw-r--r-- | arch/x86_64/kernel/smpboot.c | 12 | ||||
-rw-r--r-- | arch/x86_64/kernel/time.c | 4 |
7 files changed, 26 insertions, 23 deletions
diff --git a/arch/i386/kernel/cpu/mcheck/non-fatal.c b/arch/i386/kernel/cpu/mcheck/non-fatal.c index 1f9153ae5b03..6b5d3518a1c0 100644 --- a/arch/i386/kernel/cpu/mcheck/non-fatal.c +++ b/arch/i386/kernel/cpu/mcheck/non-fatal.c | |||
@@ -51,10 +51,10 @@ static void mce_checkregs (void *info) | |||
51 | } | 51 | } |
52 | } | 52 | } |
53 | 53 | ||
54 | static void mce_work_fn(void *data); | 54 | static void mce_work_fn(struct work_struct *work); |
55 | static DECLARE_WORK(mce_work, mce_work_fn, NULL); | 55 | static DECLARE_DELAYED_WORK(mce_work, mce_work_fn); |
56 | 56 | ||
57 | static void mce_work_fn(void *data) | 57 | static void mce_work_fn(struct work_struct *work) |
58 | { | 58 | { |
59 | on_each_cpu(mce_checkregs, NULL, 1, 1); | 59 | on_each_cpu(mce_checkregs, NULL, 1, 1); |
60 | schedule_delayed_work(&mce_work, MCE_RATE); | 60 | schedule_delayed_work(&mce_work, MCE_RATE); |
diff --git a/arch/i386/kernel/smpboot.c b/arch/i386/kernel/smpboot.c index 4bb8b77cd65b..02a9b66b6ac3 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; |
diff --git a/arch/i386/kernel/tsc.c b/arch/i386/kernel/tsc.c index fbc95828cd74..9810c8c90750 100644 --- a/arch/i386/kernel/tsc.c +++ b/arch/i386/kernel/tsc.c | |||
@@ -217,7 +217,7 @@ static unsigned int cpufreq_delayed_issched = 0; | |||
217 | static unsigned int cpufreq_init = 0; | 217 | static unsigned int cpufreq_init = 0; |
218 | static struct work_struct cpufreq_delayed_get_work; | 218 | static struct work_struct cpufreq_delayed_get_work; |
219 | 219 | ||
220 | static void handle_cpufreq_delayed_get(void *v) | 220 | static void handle_cpufreq_delayed_get(struct work_struct *work) |
221 | { | 221 | { |
222 | unsigned int cpu; | 222 | unsigned int cpu; |
223 | 223 | ||
@@ -306,7 +306,7 @@ static int __init cpufreq_tsc(void) | |||
306 | { | 306 | { |
307 | int ret; | 307 | int ret; |
308 | 308 | ||
309 | INIT_WORK(&cpufreq_delayed_get_work, handle_cpufreq_delayed_get, NULL); | 309 | INIT_WORK(&cpufreq_delayed_get_work, handle_cpufreq_delayed_get); |
310 | ret = cpufreq_register_notifier(&time_cpufreq_notifier_block, | 310 | ret = cpufreq_register_notifier(&time_cpufreq_notifier_block, |
311 | CPUFREQ_TRANSITION_NOTIFIER); | 311 | CPUFREQ_TRANSITION_NOTIFIER); |
312 | if (!ret) | 312 | if (!ret) |
diff --git a/arch/powerpc/platforms/pseries/eeh_event.c b/arch/powerpc/platforms/pseries/eeh_event.c index 137077451316..49037edf7d39 100644 --- a/arch/powerpc/platforms/pseries/eeh_event.c +++ b/arch/powerpc/platforms/pseries/eeh_event.c | |||
@@ -37,8 +37,8 @@ | |||
37 | /* EEH event workqueue setup. */ | 37 | /* EEH event workqueue setup. */ |
38 | static DEFINE_SPINLOCK(eeh_eventlist_lock); | 38 | static DEFINE_SPINLOCK(eeh_eventlist_lock); |
39 | LIST_HEAD(eeh_eventlist); | 39 | LIST_HEAD(eeh_eventlist); |
40 | static void eeh_thread_launcher(void *); | 40 | static void eeh_thread_launcher(struct work_struct *); |
41 | DECLARE_WORK(eeh_event_wq, eeh_thread_launcher, NULL); | 41 | DECLARE_WORK(eeh_event_wq, eeh_thread_launcher); |
42 | 42 | ||
43 | /* Serialize reset sequences for a given pci device */ | 43 | /* Serialize reset sequences for a given pci device */ |
44 | DEFINE_MUTEX(eeh_event_mutex); | 44 | DEFINE_MUTEX(eeh_event_mutex); |
@@ -103,7 +103,7 @@ static int eeh_event_handler(void * dummy) | |||
103 | * eeh_thread_launcher | 103 | * eeh_thread_launcher |
104 | * @dummy - unused | 104 | * @dummy - unused |
105 | */ | 105 | */ |
106 | static void eeh_thread_launcher(void *dummy) | 106 | static void eeh_thread_launcher(struct work_struct *dummy) |
107 | { | 107 | { |
108 | if (kernel_thread(eeh_event_handler, NULL, CLONE_KERNEL) < 0) | 108 | if (kernel_thread(eeh_event_handler, NULL, CLONE_KERNEL) < 0) |
109 | printk(KERN_ERR "Failed to start EEH daemon\n"); | 109 | printk(KERN_ERR "Failed to start EEH daemon\n"); |
diff --git a/arch/x86_64/kernel/mce.c b/arch/x86_64/kernel/mce.c index bbea88801d88..c7587fc39015 100644 --- a/arch/x86_64/kernel/mce.c +++ b/arch/x86_64/kernel/mce.c | |||
@@ -306,8 +306,8 @@ void mce_log_therm_throt_event(unsigned int cpu, __u64 status) | |||
306 | */ | 306 | */ |
307 | 307 | ||
308 | static int check_interval = 5 * 60; /* 5 minutes */ | 308 | static int check_interval = 5 * 60; /* 5 minutes */ |
309 | static void mcheck_timer(void *data); | 309 | static void mcheck_timer(struct work_struct *work); |
310 | static DECLARE_WORK(mcheck_work, mcheck_timer, NULL); | 310 | static DECLARE_DELAYED_WORK(mcheck_work, mcheck_timer); |
311 | 311 | ||
312 | static void mcheck_check_cpu(void *info) | 312 | static void mcheck_check_cpu(void *info) |
313 | { | 313 | { |
@@ -315,7 +315,7 @@ static void mcheck_check_cpu(void *info) | |||
315 | do_machine_check(NULL, 0); | 315 | do_machine_check(NULL, 0); |
316 | } | 316 | } |
317 | 317 | ||
318 | static void mcheck_timer(void *data) | 318 | static void mcheck_timer(struct work_struct *work) |
319 | { | 319 | { |
320 | on_each_cpu(mcheck_check_cpu, NULL, 1, 1); | 320 | on_each_cpu(mcheck_check_cpu, NULL, 1, 1); |
321 | schedule_delayed_work(&mcheck_work, check_interval * HZ); | 321 | schedule_delayed_work(&mcheck_work, check_interval * HZ); |
diff --git a/arch/x86_64/kernel/smpboot.c b/arch/x86_64/kernel/smpboot.c index 62c2e747af58..9800147c4c68 100644 --- a/arch/x86_64/kernel/smpboot.c +++ b/arch/x86_64/kernel/smpboot.c | |||
@@ -753,14 +753,16 @@ static int __cpuinit wakeup_secondary_via_INIT(int phys_apicid, unsigned int sta | |||
753 | } | 753 | } |
754 | 754 | ||
755 | struct create_idle { | 755 | struct create_idle { |
756 | struct work_struct work; | ||
756 | struct task_struct *idle; | 757 | struct task_struct *idle; |
757 | struct completion done; | 758 | struct completion done; |
758 | int cpu; | 759 | int cpu; |
759 | }; | 760 | }; |
760 | 761 | ||
761 | void do_fork_idle(void *_c_idle) | 762 | void do_fork_idle(struct work_struct *work) |
762 | { | 763 | { |
763 | struct create_idle *c_idle = _c_idle; | 764 | struct create_idle *c_idle = |
765 | container_of(work, struct create_idle, work); | ||
764 | 766 | ||
765 | c_idle->idle = fork_idle(c_idle->cpu); | 767 | c_idle->idle = fork_idle(c_idle->cpu); |
766 | complete(&c_idle->done); | 768 | complete(&c_idle->done); |
@@ -775,10 +777,10 @@ static int __cpuinit do_boot_cpu(int cpu, int apicid) | |||
775 | int timeout; | 777 | int timeout; |
776 | unsigned long start_rip; | 778 | unsigned long start_rip; |
777 | struct create_idle c_idle = { | 779 | struct create_idle c_idle = { |
780 | .work = __WORK_INITIALIZER(c_idle.work, do_fork_idle), | ||
778 | .cpu = cpu, | 781 | .cpu = cpu, |
779 | .done = COMPLETION_INITIALIZER_ONSTACK(c_idle.done), | 782 | .done = COMPLETION_INITIALIZER_ONSTACK(c_idle.done), |
780 | }; | 783 | }; |
781 | DECLARE_WORK(work, do_fork_idle, &c_idle); | ||
782 | 784 | ||
783 | /* allocate memory for gdts of secondary cpus. Hotplug is considered */ | 785 | /* allocate memory for gdts of secondary cpus. Hotplug is considered */ |
784 | if (!cpu_gdt_descr[cpu].address && | 786 | if (!cpu_gdt_descr[cpu].address && |
@@ -825,9 +827,9 @@ static int __cpuinit do_boot_cpu(int cpu, int apicid) | |||
825 | * thread. | 827 | * thread. |
826 | */ | 828 | */ |
827 | if (!keventd_up() || current_is_keventd()) | 829 | if (!keventd_up() || current_is_keventd()) |
828 | work.func(work.data); | 830 | c_idle.work.func(&c_idle.work); |
829 | else { | 831 | else { |
830 | schedule_work(&work); | 832 | schedule_work(&c_idle.work); |
831 | wait_for_completion(&c_idle.done); | 833 | wait_for_completion(&c_idle.done); |
832 | } | 834 | } |
833 | 835 | ||
diff --git a/arch/x86_64/kernel/time.c b/arch/x86_64/kernel/time.c index e3ef544d2cfb..9f05bc9b2dad 100644 --- a/arch/x86_64/kernel/time.c +++ b/arch/x86_64/kernel/time.c | |||
@@ -563,7 +563,7 @@ static unsigned int cpufreq_delayed_issched = 0; | |||
563 | static unsigned int cpufreq_init = 0; | 563 | static unsigned int cpufreq_init = 0; |
564 | static struct work_struct cpufreq_delayed_get_work; | 564 | static struct work_struct cpufreq_delayed_get_work; |
565 | 565 | ||
566 | static void handle_cpufreq_delayed_get(void *v) | 566 | static void handle_cpufreq_delayed_get(struct work_struct *v) |
567 | { | 567 | { |
568 | unsigned int cpu; | 568 | unsigned int cpu; |
569 | for_each_online_cpu(cpu) { | 569 | for_each_online_cpu(cpu) { |
@@ -639,7 +639,7 @@ static struct notifier_block time_cpufreq_notifier_block = { | |||
639 | 639 | ||
640 | static int __init cpufreq_tsc(void) | 640 | static int __init cpufreq_tsc(void) |
641 | { | 641 | { |
642 | INIT_WORK(&cpufreq_delayed_get_work, handle_cpufreq_delayed_get, NULL); | 642 | INIT_WORK(&cpufreq_delayed_get_work, handle_cpufreq_delayed_get); |
643 | if (!cpufreq_register_notifier(&time_cpufreq_notifier_block, | 643 | if (!cpufreq_register_notifier(&time_cpufreq_notifier_block, |
644 | CPUFREQ_TRANSITION_NOTIFIER)) | 644 | CPUFREQ_TRANSITION_NOTIFIER)) |
645 | cpufreq_init = 1; | 645 | cpufreq_init = 1; |