aboutsummaryrefslogtreecommitdiffstats
path: root/arch/microblaze/kernel
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2013-03-21 17:49:51 -0400
committerThomas Gleixner <tglx@linutronix.de>2013-04-08 11:39:26 -0400
commite962bb9e9cf73b8c8893c95903e791dd5ec19fb4 (patch)
tree820b06626ef6a0614fc10aa30073949df28fae6e /arch/microblaze/kernel
parentd1dba0fcd3e62f32d5925bcb91eba8757951464c (diff)
microblaze: Use generic idle loop
The microblaze idle loop provides a polling and a non polling version, which are suprisingly both polling, just with slightly different instrumentation. Remove them and use the generic poller. 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: Michal Simek <monstr@monstr.eu> Link: http://lkml.kernel.org/r/20130321215234.687590459@linutronix.de Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'arch/microblaze/kernel')
-rw-r--r--arch/microblaze/kernel/process.c53
1 files changed, 0 insertions, 53 deletions
diff --git a/arch/microblaze/kernel/process.c b/arch/microblaze/kernel/process.c
index 7c36171771f2..7cce2e9c1719 100644
--- a/arch/microblaze/kernel/process.c
+++ b/arch/microblaze/kernel/process.c
@@ -44,59 +44,6 @@ void show_regs(struct pt_regs *regs)
44void (*pm_power_off)(void) = NULL; 44void (*pm_power_off)(void) = NULL;
45EXPORT_SYMBOL(pm_power_off); 45EXPORT_SYMBOL(pm_power_off);
46 46
47static int hlt_counter = 1;
48
49static int __init nohlt_setup(char *__unused)
50{
51 hlt_counter = 1;
52 return 1;
53}
54__setup("nohlt", nohlt_setup);
55
56static int __init hlt_setup(char *__unused)
57{
58 hlt_counter = 0;
59 return 1;
60}
61__setup("hlt", hlt_setup);
62
63void default_idle(void)
64{
65 if (likely(hlt_counter)) {
66 local_irq_disable();
67 stop_critical_timings();
68 cpu_relax();
69 start_critical_timings();
70 local_irq_enable();
71 } else {
72 clear_thread_flag(TIF_POLLING_NRFLAG);
73 smp_mb__after_clear_bit();
74 local_irq_disable();
75 while (!need_resched())
76 cpu_sleep();
77 local_irq_enable();
78 set_thread_flag(TIF_POLLING_NRFLAG);
79 }
80}
81
82void cpu_idle(void)
83{
84 set_thread_flag(TIF_POLLING_NRFLAG);
85
86 /* endless idle loop with no priority at all */
87 while (1) {
88 tick_nohz_idle_enter();
89 rcu_idle_enter();
90 while (!need_resched())
91 default_idle();
92 rcu_idle_exit();
93 tick_nohz_idle_exit();
94
95 schedule_preempt_disabled();
96 check_pgt_cache();
97 }
98}
99
100void flush_thread(void) 47void flush_thread(void)
101{ 48{
102} 49}