Re: [PATCH RFC v3 10/21] ACPI: Check _STA present bit before making CPUs not present

Jonathan Cameron <[email protected]> Fri, 15 Dec 2023 16:18:03 +0000
Newsgroups gmane.linux.ports.parisc,gmane.linux.power-management.general,gmane.linux.acpi.devel,gmane.linux.kernel.cross-arch,gmane.linux.kernel,gmane.linux.ports.arm.kernel,gmane.linux.ports.riscv,gmane.linux.documentation,gmane.linux.ports.ia64
Organization Huawei Technologies Research and Development (UK) Ltd.
Message-ID <[email protected]>
On Wed, 13 Dec 2023 12:50:02 +0000
Russell King (Oracle) <[email protected]> wrote:

> From: James Morse <[email protected]>
> 
> When called acpi_processor_post_eject() unconditionally make a CPU
> not-present and unregisters it.
> 
> To add support for AML events where the CPU has become disabled, but
> remains present, the _STA method should be checked before calling
> acpi_processor_remove().
> 
> Rename acpi_processor_post_eject() acpi_processor_remove_possible(), and
> check the _STA before calling.
> 
> Adding the function prototype for arch_unregister_cpu() allows the
> preprocessor guards to be removed.
> 
> After this change CPUs will remain registered and visible to
> user-space as offline if buggy firmware triggers an eject-request,
> but doesn't clear the corresponding _STA bits after _EJ0 has been
> called.
> 
> Signed-off-by: James Morse <[email protected]>
> Tested-by: Miguel Luis <[email protected]>
> Tested-by: Vishnu Pajjuri <[email protected]>
> Tested-by: Jianyong Wu <[email protected]>
LGTM
Reviewed-by: Jonathan Cameron <[email protected]>