--- linux-2.5.64/arch/ia64/Kconfig~ Fri Mar 14 14:18:38 2003 +++ linux-2.5.64/arch/ia64/Kconfig Fri Mar 14 14:55:58 2003 @@ -405,6 +405,15 @@ endchoice +config IA64_PAL_IDLE + bool "Use PAL_HALT_LIGHT in idle loop" + ---help--- + Say Y here to enable use of PAL_HALT_LIGHT in the cpu_idle loop. + This allows the CPU to enter a low power state when idle. You + can enable CONFIG_IA64_PALINFO and check /proc/pal/cpu0/power_info + to see the power consumption and latency for this state. If you're + unsure your firmware supports it, answer N. + config SMP bool "SMP support" ---help--- --- linux-2.5.64/arch/ia64/kernel/process.c~ Fri Mar 14 14:25:24 2003 +++ linux-2.5.64/arch/ia64/kernel/process.c Fri Mar 14 14:46:17 2003 @@ -169,7 +169,10 @@ void default_idle (void) { - /* may want to do PAL_LIGHT_HALT here... */ +#ifdef CONFIG_IA64_PAL_IDLE + if (!need_resched()) + safe_halt(); +#endif } void __attribute__((noreturn)) @@ -177,6 +180,10 @@ { /* endless idle loop with no priority at all */ while (1) { + void (*idle)(void) = pm_idle; + if (!idle) + idle = default_idle; + #ifdef CONFIG_SMP if (!need_resched()) min_xtp(); @@ -186,10 +193,7 @@ #ifdef CONFIG_IA64_SGI_SN snidle(); #endif - if (pm_idle) - (*pm_idle)(); - else - default_idle(); + idle(); } #ifdef CONFIG_IA64_SGI_SN --- linux-2.5.64/include/asm-ia64/system.h~ Fri Mar 14 10:55:23 2003 +++ linux-2.5.64/include/asm-ia64/system.h Fri Mar 14 10:55:51 2003 @@ -108,7 +108,7 @@ #define set_mb(var, value) do { (var) = (value); mb(); } while (0) #define set_wmb(var, value) do { (var) = (value); mb(); } while (0) -#define safe_halt() ia64_pal_halt(1) /* PAL_HALT */ +#define safe_halt() ia64_pal_halt_light() /* PAL_HALT_LIGHT */ /* * The group barrier in front of the rsm & ssm are necessary to ensure