summaryrefslogtreecommitdiff
path: root/include/linux/cpu.h
diff options
context:
space:
mode:
authorJames Morse <james.morse@arm.com>2021-07-02 16:48:41 +0100
committerRussell King (Oracle) <rmk+kernel@armlinux.org.uk>2023-08-29 15:30:08 +0100
commit8a34ac66449388a2e3cd1825bd9ea59c5e72b17a (patch)
treeb870fe1499b28df0d3501873cfc2ce67b685e737 /include/linux/cpu.h
parent13bd3033d6e6f502da61bedd480891988f43813d (diff)
ACPI: Check _STA present bit before making CPUs not present
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 <james.morse@arm.com> Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Diffstat (limited to 'include/linux/cpu.h')
-rw-r--r--include/linux/cpu.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/cpu.h b/include/linux/cpu.h
index 7efa3adc65a2..cb09e7ca1d95 100644
--- a/include/linux/cpu.h
+++ b/include/linux/cpu.h
@@ -80,6 +80,7 @@ struct device *cpu_device_create(struct device *parent, void *drvdata,
const struct attribute_group **groups,
const char *fmt, ...);
extern int arch_register_cpu(int cpu);
+extern void arch_unregister_cpu(int cpu);
#ifdef CONFIG_HOTPLUG_CPU
extern void unregister_cpu(struct cpu *cpu);
extern ssize_t arch_cpu_probe(const char *, size_t);