idle.c (2d8ad8719591fa803b0d589ed057fa46f49b7155) | idle.c (771dae81896855d25f7f8746aaf56c0238deafb6) |
---|---|
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 * --- 25 unchanged lines hidden (view full) --- 34#include <asm/smp.h> 35 36#ifdef CONFIG_HOTPLUG_CPU 37#define cpu_should_die() cpu_is_offline(smp_processor_id()) 38#else 39#define cpu_should_die() 0 40#endif 41 | 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 * --- 25 unchanged lines hidden (view full) --- 34#include <asm/smp.h> 35 36#ifdef CONFIG_HOTPLUG_CPU 37#define cpu_should_die() cpu_is_offline(smp_processor_id()) 38#else 39#define cpu_should_die() 0 40#endif 41 |
42unsigned long cpuidle_disable = IDLE_NO_OVERRIDE; 43EXPORT_SYMBOL(cpuidle_disable); 44 |
|
42static int __init powersave_off(char *arg) 43{ 44 ppc_md.power_save = NULL; | 45static int __init powersave_off(char *arg) 46{ 47 ppc_md.power_save = NULL; |
48 cpuidle_disable = IDLE_POWERSAVE_OFF; |
|
45 return 0; 46} 47__setup("powersave=off", powersave_off); 48 49/* 50 * The body of the idle task. 51 */ 52void cpu_idle(void) --- 44 unchanged lines hidden (view full) --- 97 preempt_enable_no_resched(); 98 if (cpu_should_die()) 99 cpu_die(); 100 schedule(); 101 preempt_disable(); 102 } 103} 104 | 49 return 0; 50} 51__setup("powersave=off", powersave_off); 52 53/* 54 * The body of the idle task. 55 */ 56void cpu_idle(void) --- 44 unchanged lines hidden (view full) --- 101 preempt_enable_no_resched(); 102 if (cpu_should_die()) 103 cpu_die(); 104 schedule(); 105 preempt_disable(); 106 } 107} 108 |
109 110/* 111 * cpu_idle_wait - Used to ensure that all the CPUs come out of the old 112 * idle loop and start using the new idle loop. 113 * Required while changing idle handler on SMP systems. 114 * Caller must have changed idle handler to the new value before the call. 115 * This window may be larger on shared systems. 116 */ 117void cpu_idle_wait(void) 118{ 119 int cpu; 120 smp_mb(); 121 122 /* kick all the CPUs so that they exit out of old idle routine */ 123 get_online_cpus(); 124 for_each_online_cpu(cpu) { 125 if (cpu != smp_processor_id()) 126 smp_send_reschedule(cpu); 127 } 128 put_online_cpus(); 129} 130EXPORT_SYMBOL_GPL(cpu_idle_wait); 131 |
|
105int powersave_nap; 106 107#ifdef CONFIG_SYSCTL 108/* 109 * Register the sysctl to set/clear powersave_nap. 110 */ 111static ctl_table powersave_nap_ctl_table[]={ 112 { --- 26 unchanged lines hidden --- | 132int powersave_nap; 133 134#ifdef CONFIG_SYSCTL 135/* 136 * Register the sysctl to set/clear powersave_nap. 137 */ 138static ctl_table powersave_nap_ctl_table[]={ 139 { --- 26 unchanged lines hidden --- |