Skip to content

Commit e46746c

Browse files
committed
c6x: 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> Cc: Mark Salter <msalter@redhat.com> Link: http://lkml.kernel.org/r/20130321215234.087033904@linutronix.de Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
1 parent 25d67f8 commit e46746c

2 files changed

Lines changed: 2 additions & 27 deletions

File tree

‎arch/c6x/Kconfig‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ config C6X
1818
select OF_EARLY_FLATTREE
1919
select GENERIC_CLOCKEVENTS
2020
select MODULES_USE_ELF_RELA
21+
select GENERIC_IDLE_LOOP
2122

2223
config MMU
2324
def_bool n

‎arch/c6x/kernel/process.c‎

Lines changed: 1 addition & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ extern asmlinkage void ret_from_kernel_thread(void);
3333
void (*pm_power_off)(void);
3434
EXPORT_SYMBOL(pm_power_off);
3535

36-
static void c6x_idle(void)
36+
void arch_cpu_idle(void)
3737
{
3838
unsigned long tmp;
3939

@@ -49,32 +49,6 @@ static void c6x_idle(void)
4949
: "=b"(tmp));
5050
}
5151

52-
/*
53-
* The idle loop for C64x
54-
*/
55-
void cpu_idle(void)
56-
{
57-
/* endless idle loop with no priority at all */
58-
while (1) {
59-
tick_nohz_idle_enter();
60-
rcu_idle_enter();
61-
while (1) {
62-
local_irq_disable();
63-
if (need_resched()) {
64-
local_irq_enable();
65-
break;
66-
}
67-
c6x_idle(); /* enables local irqs */
68-
}
69-
rcu_idle_exit();
70-
tick_nohz_idle_exit();
71-
72-
preempt_enable_no_resched();
73-
schedule();
74-
preempt_disable();
75-
}
76-
}
77-
7852
static void halt_loop(void)
7953
{
8054
printk(KERN_EMERG "System Halted, OK to turn off power\n");

0 commit comments

Comments
 (0)