diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2013-03-21 17:49:57 -0400 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2013-04-08 11:39:27 -0400 |
commit | 52c0065947b7f78a3d9808b421006a3d870d1f92 (patch) | |
tree | b23f080c849b89c39b6c2ac3045ddf6d70466315 /arch/s390/kernel/process.c | |
parent | 799fef06123f86ff69cf754f996219e6ad1678f8 (diff) |
s390: Use generic idle loop
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Rusty Russell <rusty@rustcorp.com.au>
Cc: Paul McKenney <paulmck@linux.vnet.ibm.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Reviewed-by: Cc: Srivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>
Cc: Magnus Damm <magnus.damm@gmail.com>
Acked-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Link: http://lkml.kernel.org/r/20130321215235.090816526@linutronix.de
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'arch/s390/kernel/process.c')
-rw-r--r-- | arch/s390/kernel/process.c | 32 |
1 files changed, 9 insertions, 23 deletions
diff --git a/arch/s390/kernel/process.c b/arch/s390/kernel/process.c index 536d64579d9a..2bc3eddae34a 100644 --- a/arch/s390/kernel/process.c +++ b/arch/s390/kernel/process.c | |||
@@ -61,18 +61,8 @@ unsigned long thread_saved_pc(struct task_struct *tsk) | |||
61 | return sf->gprs[8]; | 61 | return sf->gprs[8]; |
62 | } | 62 | } |
63 | 63 | ||
64 | /* | 64 | void arch_cpu_idle(void) |
65 | * The idle loop on a S390... | ||
66 | */ | ||
67 | static void default_idle(void) | ||
68 | { | 65 | { |
69 | if (cpu_is_offline(smp_processor_id())) | ||
70 | cpu_die(); | ||
71 | local_irq_disable(); | ||
72 | if (need_resched()) { | ||
73 | local_irq_enable(); | ||
74 | return; | ||
75 | } | ||
76 | local_mcck_disable(); | 66 | local_mcck_disable(); |
77 | if (test_thread_flag(TIF_MCCK_PENDING)) { | 67 | if (test_thread_flag(TIF_MCCK_PENDING)) { |
78 | local_mcck_enable(); | 68 | local_mcck_enable(); |
@@ -83,19 +73,15 @@ static void default_idle(void) | |||
83 | vtime_stop_cpu(); | 73 | vtime_stop_cpu(); |
84 | } | 74 | } |
85 | 75 | ||
86 | void cpu_idle(void) | 76 | void arch_cpu_idle_exit(void) |
87 | { | 77 | { |
88 | for (;;) { | 78 | if (test_thread_flag(TIF_MCCK_PENDING)) |
89 | tick_nohz_idle_enter(); | 79 | s390_handle_mcck(); |
90 | rcu_idle_enter(); | 80 | } |
91 | while (!need_resched() && !test_thread_flag(TIF_MCCK_PENDING)) | 81 | |
92 | default_idle(); | 82 | void arch_cpu_idle_dead(void) |
93 | rcu_idle_exit(); | 83 | { |
94 | tick_nohz_idle_exit(); | 84 | cpu_die(); |
95 | if (test_thread_flag(TIF_MCCK_PENDING)) | ||
96 | s390_handle_mcck(); | ||
97 | schedule_preempt_disabled(); | ||
98 | } | ||
99 | } | 85 | } |
100 | 86 | ||
101 | extern void __kprobes kernel_thread_starter(void); | 87 | extern void __kprobes kernel_thread_starter(void); |