idle.c (d1a76187a5be4f89c6cb19d800cb5fb7aac735c5) idle.c (6d07bb47354174a9b52d3b03f9e38b069a93d341)
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 *

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

64 clear_thread_flag(TIF_POLLING_NRFLAG);
65 /*
66 * smp_mb is so clearing of TIF_POLLING_NRFLAG
67 * is ordered w.r.t. need_resched() test.
68 */
69 smp_mb();
70 local_irq_disable();
71
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 *

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

64 clear_thread_flag(TIF_POLLING_NRFLAG);
65 /*
66 * smp_mb is so clearing of TIF_POLLING_NRFLAG
67 * is ordered w.r.t. need_resched() test.
68 */
69 smp_mb();
70 local_irq_disable();
71
72 /* Don't trace irqs off for idle */
73 stop_critical_timings();
74
72 /* check again after disabling irqs */
73 if (!need_resched() && !cpu_should_die())
74 ppc_md.power_save();
75
75 /* check again after disabling irqs */
76 if (!need_resched() && !cpu_should_die())
77 ppc_md.power_save();
78
79 start_critical_timings();
80
76 local_irq_enable();
77 set_thread_flag(TIF_POLLING_NRFLAG);
78
79 } else {
80 /*
81 * Go into low thread priority and possibly
82 * low power mode.
83 */

--- 52 unchanged lines hidden ---
81 local_irq_enable();
82 set_thread_flag(TIF_POLLING_NRFLAG);
83
84 } else {
85 /*
86 * Go into low thread priority and possibly
87 * low power mode.
88 */

--- 52 unchanged lines hidden ---