aboutsummaryrefslogtreecommitdiffstats
path: root/arch/frv
diff options
context:
space:
mode:
Diffstat (limited to 'arch/frv')
-rw-r--r--arch/frv/kernel/process.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/arch/frv/kernel/process.c b/arch/frv/kernel/process.c
index 3001b82b1514..54a452136f00 100644
--- a/arch/frv/kernel/process.c
+++ b/arch/frv/kernel/process.c
@@ -77,16 +77,20 @@ void (*idle)(void) = core_sleep_idle;
77 */ 77 */
78void cpu_idle(void) 78void cpu_idle(void)
79{ 79{
80 int cpu = smp_processor_id();
81
80 /* endless idle loop with no priority at all */ 82 /* endless idle loop with no priority at all */
81 while (1) { 83 while (1) {
82 while (!need_resched()) { 84 while (!need_resched()) {
83 irq_stat[smp_processor_id()].idle_timestamp = jiffies; 85 irq_stat[cpu].idle_timestamp = jiffies;
84 86
85 if (!frv_dma_inprogress && idle) 87 if (!frv_dma_inprogress && idle)
86 idle(); 88 idle();
87 } 89 }
88 90
91 preempt_enable_no_resched();
89 schedule(); 92 schedule();
93 preempt_disable();
90 } 94 }
91} 95}
92 96