diff options
author | James Morse <james.morse@arm.com> | 2021-03-29 18:28:35 +0100 |
---|---|---|
committer | Russell King (Oracle) <rmk+kernel@armlinux.org.uk> | 2023-10-12 10:58:16 +0100 |
commit | b165ddfdfd10f35997cd8e04cf374c7dabeb5f5c (patch) | |
tree | b76381a994c04313f5dd7d2a4d4fcacb53109094 | |
parent | 2b4923da48db6379486c2025b68a41425757b10e (diff) |
ACPI: processor: Register all CPUs from acpi_processor_get_info()
To allow ACPI to skip the call to arch_register_cpu() when the _STA
value indicates the CPU can't be brought online right now, move the
arch_register_cpu() call into acpi_processor_get_info().
Systems can still be booted with 'acpi=off', or in the case of arm64,
not include an ACPI description at all. For these, the CPUs are
registered by cpu_dev_register_generic().
This moves the CPU register logic back to a subsys_initcall(),
while the memory nodes will have been registered earlier.
Signed-off-by: James Morse <james.morse@arm.com>
Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
-rw-r--r-- | drivers/acpi/acpi_processor.c | 6 | ||||
-rw-r--r-- | drivers/base/cpu.c | 2 |
2 files changed, 7 insertions, 1 deletions
diff --git a/drivers/acpi/acpi_processor.c b/drivers/acpi/acpi_processor.c index c3ce48ef6488..65ac396db8dd 100644 --- a/drivers/acpi/acpi_processor.c +++ b/drivers/acpi/acpi_processor.c @@ -313,6 +313,12 @@ static int acpi_processor_get_info(struct acpi_device *device) cpufreq_add_device("acpi-cpufreq"); } + if (!invalid_logical_cpuid(pr->id) && cpu_present(pr->id)) { + int ret = arch_register_cpu(pr->id); + if (ret) + return ret; + } + /* * Extra Processor objects may be enumerated on MP systems with * less than the max # of CPUs. They should be ignored _iff diff --git a/drivers/base/cpu.c b/drivers/base/cpu.c index 579064fda97b..4d218db63a05 100644 --- a/drivers/base/cpu.c +++ b/drivers/base/cpu.c @@ -537,7 +537,7 @@ static void __init cpu_dev_register_generic(void) { int i; - if (!IS_ENABLED(CONFIG_GENERIC_CPU_DEVICES)) + if (!IS_ENABLED(CONFIG_GENERIC_CPU_DEVICES) || !acpi_disabled) return; for_each_present_cpu(i) { |