Commit 4142f00b authored by Kenneth W. Chen's avatar Kenneth W. Chen Committed by David Mosberger

[PATCH] ia64: Interim pal_halt_light patch

While the sysctl variable is being worked out in the general kernel, here is
an interim patch which allows boot-time/dynamic control over the use of
PAL_HALT_LIGHT in the idle-loop.
parent e35370a6
......@@ -214,15 +214,6 @@ config FORCE_MAX_ZONEORDER
int
default "18"
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 "Symmetric multi-processing support"
help
......
......@@ -159,16 +159,25 @@ do_notify_resume_user (sigset_t *oldset, struct sigscratch *scr, long in_syscall
ia64_do_signal(oldset, scr, in_syscall);
}
static int pal_halt = 1;
static int __init nohalt_setup(char * str)
{
pal_halt = 0;
return 1;
}
__setup("nohalt", nohalt_setup);
/*
* We use this if we don't have any better idle routine..
*/
void
default_idle (void)
{
#ifdef CONFIG_IA64_PAL_IDLE
if (!need_resched())
safe_halt();
#endif
unsigned long pmu_active = ia64_getreg(_IA64_REG_PSR) &
(IA64_PSR_PP | IA64_PSR_UP);
while (!need_resched())
if (pal_halt && !pmu_active)
safe_halt();
}
void __attribute__((noreturn))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment