diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2013-03-21 17:49:42 -0400 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2013-04-08 11:39:24 -0400 |
commit | e46746cd5542b74f1e34bb1b8a997c5c0a6e69ea (patch) | |
tree | e6b04afdfc45556ba2617068265c3101aba189cc /arch/c6x | |
parent | 25d67f860f3a29d216f8206092a284cacbc6127e (diff) |
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>
Diffstat (limited to 'arch/c6x')
-rw-r--r-- | arch/c6x/Kconfig | 1 | ||||
-rw-r--r-- | arch/c6x/kernel/process.c | 28 |
2 files changed, 2 insertions, 27 deletions
diff --git a/arch/c6x/Kconfig b/arch/c6x/Kconfig index f6a3648f5ec3..af2aa4b44140 100644 --- a/arch/c6x/Kconfig +++ b/arch/c6x/Kconfig | |||
@@ -18,6 +18,7 @@ config C6X | |||
18 | select OF_EARLY_FLATTREE | 18 | select OF_EARLY_FLATTREE |
19 | select GENERIC_CLOCKEVENTS | 19 | select GENERIC_CLOCKEVENTS |
20 | select MODULES_USE_ELF_RELA | 20 | select MODULES_USE_ELF_RELA |
21 | select GENERIC_IDLE_LOOP | ||
21 | 22 | ||
22 | config MMU | 23 | config MMU |
23 | def_bool n | 24 | def_bool n |
diff --git a/arch/c6x/kernel/process.c b/arch/c6x/kernel/process.c index 6434df476f77..57d2ea8d1977 100644 --- a/arch/c6x/kernel/process.c +++ b/arch/c6x/kernel/process.c | |||
@@ -33,7 +33,7 @@ extern asmlinkage void ret_from_kernel_thread(void); | |||
33 | void (*pm_power_off)(void); | 33 | void (*pm_power_off)(void); |
34 | EXPORT_SYMBOL(pm_power_off); | 34 | EXPORT_SYMBOL(pm_power_off); |
35 | 35 | ||
36 | static void c6x_idle(void) | 36 | void arch_cpu_idle(void) |
37 | { | 37 | { |
38 | unsigned long tmp; | 38 | unsigned long tmp; |
39 | 39 | ||
@@ -49,32 +49,6 @@ static void c6x_idle(void) | |||
49 | : "=b"(tmp)); | 49 | : "=b"(tmp)); |
50 | } | 50 | } |
51 | 51 | ||
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 | |||
78 | static void halt_loop(void) | 52 | static void halt_loop(void) |
79 | { | 53 | { |
80 | printk(KERN_EMERG "System Halted, OK to turn off power\n"); | 54 | printk(KERN_EMERG "System Halted, OK to turn off power\n"); |