Re: [linux-pm] [PATCH] CPUidle: compile fix for non-x86

Kevin Hilman
2008-01-31T18:51:07Z

"Pallipadi, Venkatesh" <venkatesh.pallipadi@intel.com> writes:

>> Wrap cpu_idle_wait() in an x86 #ifdef since it's x86 only.
>> Signed-off-by: Kevin Hilman <khilman@mvista.com>
>>
>> diff --git a/drivers/cpuidle/cpuidle.c b/drivers/cpuidle/cpuidle.c
>> index d2fabe7..4d0f9b0 100644
>> --- a/drivers/cpuidle/cpuidle.c
>> +++ b/drivers/cpuidle/cpuidle.c
>> @@ -82,7 +82,9 @@ void cpuidle_uninstall_idle_handler(void)
>> {
>> if (enabled_devices && (pm_idle != pm_idle_old)) {
>> pm_idle = pm_idle_old;
>> +#ifdef CONFIG_X86
>> cpu_idle_wait();
>> +#endif
>>
>
> The archs that do not have cpu_idle_wait() and has more than one CPU
> will need something equivalent to cpu_idle_wait() to kick all other CPUs
> out of idle loop.
> The reason being we do not want another CPU to be in idle loop that is
> being uninstalled here.
>
> Do you have more than one logical CPU on your platform?

No, I'm testing on a UP ARM-based platform (TI OMAP.)

Maybe #ifdef CONFIG_SMP is the right thing instead of #ifdef
CONFIG_X86?

Kevin