[v8 PATCH 1/8]: cpuidle: cleanup drivers/cpuidle/cpuidle.c

Balbir Singh balbir at linux.vnet.ibm.com
Mon Oct 12 22:36:02 EST 2009


* Arun R B <arun at linux.vnet.ibm.com> [2009-10-08 15:19:42]:

> * Arun R Bharadwaj <arun at linux.vnet.ibm.com> [2009-10-08 15:18:28]:
> 
> This patch cleans up drivers/cpuidle/cpuidle.c
> Earlier cpuidle assumed pm_idle as the default idle loop. Break that
> assumption and make it more generic. cpuidle_idle_call() which is the
> main idle loop of cpuidle is to be called by architectures which have
> registered to cpuidle.
> 
> Remove routines cpuidle_install/uninstall_idle_handler() which are not
> needed anymore.
> 
>

[snip]

  /**
> - * cpuidle_install_idle_handler - installs the cpuidle idle loop handler
> - */
> -void cpuidle_install_idle_handler(void)
> -{
> -	if (enabled_devices && (pm_idle != cpuidle_idle_call)) {
> -		/* Make sure all changes finished before we switch to new idle */
> -		smp_wmb();
> -		pm_idle = cpuidle_idle_call;
> -	}
> -}
> -
> -/**
> - * cpuidle_uninstall_idle_handler - uninstalls the cpuidle idle loop handler
> - */
> -void cpuidle_uninstall_idle_handler(void)
> -{
> -	if (enabled_devices && pm_idle_old && (pm_idle != pm_idle_old)) {
> -		pm_idle = pm_idle_old;
> -		cpuidle_kick_cpus();
> -	}
> -}
> -

I see the routines above being called in from
cpuidle_pause/resume_and_lock/unlock below and they are entries from
ACPI on ACPI_PROCESSOR_NOTIFY_POWER and from the hotplug path, could
you test them to make sure they are not broken. We also seem to be
missing a cpuidle_kick_cpus() in cpuidle_pause_and_lock()

[snip]

-- 
	Balbir


More information about the Linuxppc-dev mailing list