[PATCH] powerpc/powernv/cpuidle: Pass correct drv->cpumask for registration

Vaidyanathan Srinivasan svaidy at linux.vnet.ibm.com
Thu Mar 23 14:59:02 AEDT 2017


* Michael Ellerman <mpe at ellerman.id.au> [2017-03-22 21:55:50]:

> Vaidyanathan Srinivasan <svaidy at linux.vnet.ibm.com> writes:
> > * Michael Ellerman <mpe at ellerman.id.au> [2017-03-20 14:05:39]:
> >> Vaidyanathan Srinivasan <svaidy at linux.vnet.ibm.com> writes:
> >  
> >> > On powernv platform cpu_present could be less than cpu_possible
> >> > in cases where firmware detects the cpu, but it is not available
> >> > for OS.
> >> 
> >> It's entirely normal for present < possible, on my laptop for example,
> >> so I don't see how that causes the bug.
> >
> > Yes, present < possible in itself not a problem.  It is whether
> > cpu_device exist for that cpu or not.
> ...
> >
> > Currently if CONFIG_HOTPLUG_CPU=n, then we skip calling register_cpu()
> > and that causes the problem.
> ...
> >> 
> >> I really don't understand how a CPU not being present leads to a crash
> >> in printf()? Something in that call chain should have checked that the
> >> CPU was registered before crashing in printf() - surely?
> >
> > Yes, we should have just failed to register the cpuidle driver.  I have
> > the fix here:
> >
> > [PATCH] cpuidle: Validate cpu_dev in cpuidle_add_sysfs
> > http://patchwork.ozlabs.org/patch/740634/
> 
> OK. Can you send a v2 of this with a better change log that includes all
> the clarifications above.
> 
> And despite your subject being powerpc/powernv/cpuidle, this is a
> cpuidle patch. I can merge it, but I at least need you to Cc the cpuidle
> maintainers so they have a chance to see it.

Thanks for the review, I will post a v2 with more detailed commit log
and CC cpuidle maintainers and linux-pm.

--Vaidy



More information about the Linuxppc-dev mailing list