Skip to content

Commit a02f66b

Browse files
James Morsegregkh
authored andcommitted
ACPI: Move ACPI_HOTPLUG_CPU to be disabled on arm64 and riscv
Neither arm64 nor riscv support physical hotadd of CPUs that were not present at boot. For arm64 much of the platform description is in static tables which do not have update methods. arm64 does support HOTPLUG_CPU, which is backed by a firmware interface to turn CPUs on and off. acpi_processor_hotadd_init() and acpi_processor_remove() are for adding and removing CPUs that were not present at boot. arm64 systems that do this are not supported as there is currently insufficient information in the platform description. (e.g. did the GICR get removed too?) arm64 currently relies on the MADT enabled flag check in map_gicc_mpidr() to prevent CPUs that were not described as present at boot from being added to the system. Similarly, riscv relies on the same check in map_rintc_hartid(). Both architectures also rely on the weak 'always fails' definitions of acpi_map_cpu() and arch_register_cpu(). Subsequent changes will redefine ACPI_HOTPLUG_CPU as making possible CPUs present. Neither arm64 nor riscv support this. Disable ACPI_HOTPLUG_CPU for arm64 and riscv by removing 'default y' and selecting it on the other three ACPI architectures. This allows the weak definitions of some symbols to be removed. Signed-off-by: James Morse <james.morse@arm.com> Reviewed-by: Shaoqin Huang <shahuang@redhat.com> Reviewed-by: Gavin Shan <gshan@redhat.com> Signed-off-by: "Russell King (Oracle)" <rmk+kernel@armlinux.org.uk> Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Reviewed-by: Thomas Gleixner <tglx@linutronix.de> Link: https://lore.kernel.org/r/E1r5R31-00Csyt-Jq@rmk-PC.armlinux.org.uk Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 29d9310 commit a02f66b

File tree

4 files changed

+2
-19
lines changed

4 files changed

+2
-19
lines changed

arch/loongarch/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ config LOONGARCH
55
select ACPI
66
select ACPI_GENERIC_GSI if ACPI
77
select ACPI_MCFG if ACPI
8+
select ACPI_HOTPLUG_CPU if ACPI_PROCESSOR && HOTPLUG_CPU
89
select ACPI_PPTT if ACPI
910
select ACPI_SYSTEM_POWER_STATES_SUPPORT if ACPI
1011
select ARCH_BINFMT_ELF_STATE

arch/x86/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ config X86
5959
#
6060
select ACPI_LEGACY_TABLES_LOOKUP if ACPI
6161
select ACPI_SYSTEM_POWER_STATES_SUPPORT if ACPI
62+
select ACPI_HOTPLUG_CPU if ACPI_PROCESSOR && HOTPLUG_CPU
6263
select ARCH_32BIT_OFF_T if X86_32
6364
select ARCH_CLOCKSOURCE_INIT
6465
select ARCH_CORRECT_STACKTRACE_ON_KRETPROBE

drivers/acpi/Kconfig

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -310,7 +310,6 @@ config ACPI_HOTPLUG_CPU
310310
bool
311311
depends on ACPI_PROCESSOR && HOTPLUG_CPU
312312
select ACPI_CONTAINER
313-
default y
314313

315314
config ACPI_PROCESSOR_AGGREGATOR
316315
tristate "Processor Aggregator"

drivers/acpi/acpi_processor.c

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -184,24 +184,6 @@ static void __init acpi_pcc_cpufreq_init(void) {}
184184

185185
/* Initialization */
186186
#ifdef CONFIG_ACPI_HOTPLUG_CPU
187-
int __weak acpi_map_cpu(acpi_handle handle,
188-
phys_cpuid_t physid, u32 acpi_id, int *pcpu)
189-
{
190-
return -ENODEV;
191-
}
192-
193-
int __weak acpi_unmap_cpu(int cpu)
194-
{
195-
return -ENODEV;
196-
}
197-
198-
int __weak arch_register_cpu(int cpu)
199-
{
200-
return -ENODEV;
201-
}
202-
203-
void __weak arch_unregister_cpu(int cpu) {}
204-
205187
static int acpi_processor_hotadd_init(struct acpi_processor *pr)
206188
{
207189
unsigned long long sta;

0 commit comments

Comments
 (0)