diff options
Diffstat (limited to 'arch/mips/kernel/process.c')
-rw-r--r-- | arch/mips/kernel/process.c | 48 |
1 files changed, 15 insertions, 33 deletions
diff --git a/arch/mips/kernel/process.c b/arch/mips/kernel/process.c index 3be4405c2d14..cfc742d75b7f 100644 --- a/arch/mips/kernel/process.c +++ b/arch/mips/kernel/process.c | |||
@@ -41,44 +41,26 @@ | |||
41 | #include <asm/inst.h> | 41 | #include <asm/inst.h> |
42 | #include <asm/stacktrace.h> | 42 | #include <asm/stacktrace.h> |
43 | 43 | ||
44 | /* | 44 | #ifdef CONFIG_HOTPLUG_CPU |
45 | * The idle thread. There's no useful work to be done, so just try to conserve | 45 | void arch_cpu_idle_dead(void) |
46 | * power and have a low exit latency (ie sit in a loop waiting for somebody to | ||
47 | * say that they'd like to reschedule) | ||
48 | */ | ||
49 | void __noreturn cpu_idle(void) | ||
50 | { | 46 | { |
51 | int cpu; | 47 | /* What the heck is this check doing ? */ |
52 | 48 | if (!cpu_isset(smp_processor_id(), cpu_callin_map)) | |
53 | /* CPU is going idle. */ | 49 | play_dead(); |
54 | cpu = smp_processor_id(); | 50 | } |
51 | #endif | ||
55 | 52 | ||
56 | /* endless idle loop with no priority at all */ | 53 | void arch_cpu_idle(void) |
57 | while (1) { | 54 | { |
58 | tick_nohz_idle_enter(); | ||
59 | rcu_idle_enter(); | ||
60 | while (!need_resched() && cpu_online(cpu)) { | ||
61 | #ifdef CONFIG_MIPS_MT_SMTC | 55 | #ifdef CONFIG_MIPS_MT_SMTC |
62 | extern void smtc_idle_loop_hook(void); | 56 | extern void smtc_idle_loop_hook(void); |
63 | 57 | ||
64 | smtc_idle_loop_hook(); | 58 | smtc_idle_loop_hook(); |
65 | #endif | 59 | #endif |
66 | 60 | if (cpu_wait) | |
67 | if (cpu_wait) { | 61 | (*cpu_wait)(); |
68 | /* Don't trace irqs off for idle */ | 62 | else |
69 | stop_critical_timings(); | 63 | local_irq_enable(); |
70 | (*cpu_wait)(); | ||
71 | start_critical_timings(); | ||
72 | } | ||
73 | } | ||
74 | #ifdef CONFIG_HOTPLUG_CPU | ||
75 | if (!cpu_online(cpu) && !cpu_isset(cpu, cpu_callin_map)) | ||
76 | play_dead(); | ||
77 | #endif | ||
78 | rcu_idle_exit(); | ||
79 | tick_nohz_idle_exit(); | ||
80 | schedule_preempt_disabled(); | ||
81 | } | ||
82 | } | 64 | } |
83 | 65 | ||
84 | asmlinkage void ret_from_fork(void); | 66 | asmlinkage void ret_from_fork(void); |