On 4/26/24 23:51, Jonathan Cameron wrote:
From: Jean-Philippe Brucker <jean-philippe@xxxxxxxxxx> When a CPU is marked as disabled, but online capable in the MADT, PSCI applies some firmware policy to control when it can be brought online. PSCI returns DENIED to a CPU_ON request if this is not currently permitted. The OS can learn the current policy from the _STA enabled bit. Handle the PSCI DENIED return code gracefully instead of printing an error. Note the alternatives to the PSCI cpu_boot() callback do not return -EPERM so the change in smp.c has no affect. See https://developer.arm.com/documentation/den0022/f/?lang=en page 58. Signed-off-by: Jean-Philippe Brucker <jean-philippe@xxxxxxxxxx> [ morse: Rewrote commit message ] Signed-off-by: James Morse <james.morse@xxxxxxx> Tested-by: Miguel Luis <miguel.luis@xxxxxxxxxx> Tested-by: Vishnu Pajjuri <vishnu@xxxxxxxxxxxxxxxxxxxxxx> Tested-by: Jianyong Wu <jianyong.wu@xxxxxxx> Reviewed-by: Jonathan Cameron <Jonathan.Cameron@xxxxxxxxxx> Signed-off-by: Russell King (Oracle) <rmk+kernel@xxxxxxxxxxxxxxx> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@xxxxxxxxxx> --- v8: Note in commit message that the -EPERM guard on the error print only affects PSCI as other options never use this error code. Should they do so in future, that may well indicate that they now support similar refusal to boot. --- arch/arm64/kernel/psci.c | 2 +- arch/arm64/kernel/smp.c | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-)
Thanks for the check and clarification that -EPERM is only sensible to PSCI. With the clarification: Reviewed-by: Gavin Shan <gshan@xxxxxxxxxx> Thanks, Gavin