diff options
Diffstat (limited to 'arch/x86_64/kernel')
-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 |
3 files changed, 12 insertions, 10 deletions
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; |