[PATCH v2 7/7] ARM: smp: Add runtime PM support for CPU hotplug

Russell King - ARM Linux linux at arm.linux.org.uk
Fri Sep 4 02:17:35 PDT 2015


On Thu, Sep 03, 2015 at 01:58:34PM -0600, Lina Iyer wrote:
> @@ -401,6 +412,11 @@ asmlinkage void secondary_start_kernel(void)
>  	local_irq_enable();
>  	local_fiq_enable();
>  
> +	/* We are running, enable runtime PM for the CPU. */
> +	cpu_dev = get_cpu_device(cpu);
> +	if (cpu_dev)
> +		pm_runtime_get_sync(cpu_dev);
> +

Please no.  This is fragile.

pm_runtime_get_sync() can sleep, and this path is used when the system
is fully up and running.  Locks may be held, which cause this to sleep.
However, we're calling it from a context where we can't sleep - which
is the general rule for any part of system initialisation where we
have not entered the idle thread yet (the idle thread is what we run
when sleeping.)

NAK on this.

-- 
FTTC broadband for 0.8mile line: currently at 9.6Mbps down 400kbps up
according to speedtest.net.



More information about the linux-arm-kernel mailing list