Re: [PATCH] powerpc/powernv/cpuidle: Pass correct drv->cpumask for registration
From: Michael Ellerman <mpe@ellerman.id.au>
Date: 2017-03-22 10:55:51
Vaidyanathan Srinivasan [off-list ref] writes:
* Michael Ellerman [off-list ref] [2017-03-20 14:05:39]:quoted
Vaidyanathan Srinivasan [off-list ref] writes:quoted
quoted
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.
...
quoted
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. cheers