diff options
Diffstat (limited to 'arch/ppc64/kernel/idle.c')
-rw-r--r-- | arch/ppc64/kernel/idle.c | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/arch/ppc64/kernel/idle.c b/arch/ppc64/kernel/idle.c index 909ea669af91..715bc0e71e0f 100644 --- a/arch/ppc64/kernel/idle.c +++ b/arch/ppc64/kernel/idle.c | |||
@@ -34,15 +34,11 @@ extern void power4_idle(void); | |||
34 | 34 | ||
35 | void default_idle(void) | 35 | void default_idle(void) |
36 | { | 36 | { |
37 | long oldval; | ||
38 | unsigned int cpu = smp_processor_id(); | 37 | unsigned int cpu = smp_processor_id(); |
38 | set_thread_flag(TIF_POLLING_NRFLAG); | ||
39 | 39 | ||
40 | while (1) { | 40 | while (1) { |
41 | oldval = test_and_clear_thread_flag(TIF_NEED_RESCHED); | 41 | if (!need_resched()) { |
42 | |||
43 | if (!oldval) { | ||
44 | set_thread_flag(TIF_POLLING_NRFLAG); | ||
45 | |||
46 | while (!need_resched() && !cpu_is_offline(cpu)) { | 42 | while (!need_resched() && !cpu_is_offline(cpu)) { |
47 | ppc64_runlatch_off(); | 43 | ppc64_runlatch_off(); |
48 | 44 | ||
@@ -55,9 +51,6 @@ void default_idle(void) | |||
55 | } | 51 | } |
56 | 52 | ||
57 | HMT_medium(); | 53 | HMT_medium(); |
58 | clear_thread_flag(TIF_POLLING_NRFLAG); | ||
59 | } else { | ||
60 | set_need_resched(); | ||
61 | } | 54 | } |
62 | 55 | ||
63 | ppc64_runlatch_on(); | 56 | ppc64_runlatch_on(); |