idle.c (a7b152d5342c06e81ab0cf7d18345f69fa7e56b5) idle.c (1268fbc746ea1cd279886a740dcbad4ba5232225)
1/*
2 * Idle daemon for PowerPC. Idle daemon will handle any action
3 * that needs to be taken when the system becomes idle.
4 *
5 * Originally written by Cort Dougan (cort@cs.nmt.edu).
6 * Subsequent 32-bit hacking by Tom Rini, Armin Kuster,
7 * Paul Mackerras and others.
8 *

--- 48 unchanged lines hidden (view full) ---

57 */
58void cpu_idle(void)
59{
60 if (ppc_md.idle_loop)
61 ppc_md.idle_loop(); /* doesn't return */
62
63 set_thread_flag(TIF_POLLING_NRFLAG);
64 while (1) {
1/*
2 * Idle daemon for PowerPC. Idle daemon will handle any action
3 * that needs to be taken when the system becomes idle.
4 *
5 * Originally written by Cort Dougan (cort@cs.nmt.edu).
6 * Subsequent 32-bit hacking by Tom Rini, Armin Kuster,
7 * Paul Mackerras and others.
8 *

--- 48 unchanged lines hidden (view full) ---

57 */
58void cpu_idle(void)
59{
60 if (ppc_md.idle_loop)
61 ppc_md.idle_loop(); /* doesn't return */
62
63 set_thread_flag(TIF_POLLING_NRFLAG);
64 while (1) {
65 if (idle_uses_rcu)
66 tick_nohz_idle_enter();
67 else
68 tick_nohz_idle_enter_norcu();
65 tick_nohz_idle_enter();
66 if (!idle_uses_rcu)
67 rcu_idle_enter();
68
69 while (!need_resched() && !cpu_should_die()) {
70 ppc64_runlatch_off();
71
72 if (ppc_md.power_save) {
73 clear_thread_flag(TIF_POLLING_NRFLAG);
74 /*
75 * smp_mb is so clearing of TIF_POLLING_NRFLAG
76 * is ordered w.r.t. need_resched() test.

--- 20 unchanged lines hidden (view full) ---

97 */
98 HMT_low();
99 HMT_very_low();
100 }
101 }
102
103 HMT_medium();
104 ppc64_runlatch_on();
69 while (!need_resched() && !cpu_should_die()) {
70 ppc64_runlatch_off();
71
72 if (ppc_md.power_save) {
73 clear_thread_flag(TIF_POLLING_NRFLAG);
74 /*
75 * smp_mb is so clearing of TIF_POLLING_NRFLAG
76 * is ordered w.r.t. need_resched() test.

--- 20 unchanged lines hidden (view full) ---

97 */
98 HMT_low();
99 HMT_very_low();
100 }
101 }
102
103 HMT_medium();
104 ppc64_runlatch_on();
105 if (idle_uses_rcu)
106 tick_nohz_idle_exit();
107 else
108 tick_nohz_idle_exit_norcu();
105 if (!idle_uses_rcu)
106 rcu_idle_exit();
107 tick_nohz_idle_exit();
109 preempt_enable_no_resched();
110 if (cpu_should_die())
111 cpu_die();
112 schedule();
113 preempt_disable();
114 }
115}
116

--- 34 unchanged lines hidden ---
108 preempt_enable_no_resched();
109 if (cpu_should_die())
110 cpu_die();
111 schedule();
112 preempt_disable();
113 }
114}
115

--- 34 unchanged lines hidden ---