Skip to contentSkip to conversation

arm64: Kconfig: Fix dependencies to enable ACPI_HOTPLUG_CPU

PATCH Applied Gavin Shan 3 participants 3 messages Jul 1, 2024 arm64

lore
Share & tools
lore

Gavin Shan

author
#0 lore raw

PATCH 1/1 arm64: Kconfig: Fix dependencies to enable ACPI_HOTPLUG_CPU

Both ACPI_PROCESSOR and HOTPLUG_CPU are needed by ACPI_HOTPLUG_CPU. Otherwise, we can have compiling error with the following configurations.

CONFIG_HOTPLUG_CPU=n
CONFIG_ACPI_PROCESSOR=y
CONFIG_ACPI_HOTPLUG_CPU=y

  arch/arm64/kernel/smp.c: In function ‘arch_unregister_cpu’:
  arch/arm64/kernel/smp.c:563:9: error: implicit declaration of  \
  function ‘unregister_cpu’; did you mean ‘register_cpu’?        \
  [-Werror=implicit-function-declaration]
  563 |         unregister_cpu(c);
      |         ^~~~~~~~~~~~~~
      |         register_cpu

Fix it by enabling ACPI_HOTPLUG_CPU when both ACPI_PROCESSOR and HOTPLUG_CPU are enabled, consistent with other architectures like x86 and loongarch.

Fixes 9d0873892f4d ("arm64: Kconfig: Enable hotplug CPU on arm64 if ACPI_PROCESSOR is enabled.")
---
 arch/arm64/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm64/Kconfig +1 -1
index e8f2ef2312db..ff17c5705324 100644
@@ -5,7 +5,7 @@ config ARM64
 	select ACPI_CCA_REQUIRED if ACPI
 	select ACPI_GENERIC_GSI if ACPI
 	select ACPI_GTDT if ACPI
-	select ACPI_HOTPLUG_CPU if ACPI_PROCESSOR
+	select ACPI_HOTPLUG_CPU if ACPI_PROCESSOR && HOTPLUG_CPU
 	select ACPI_IORT if ACPI
 	select ACPI_REDUCED_HARDWARE_ONLY if ACPI
 	select ACPI_MCFG if (ACPI && PCI)
Signature · 1 line
2.45.1
Acked-by on v1 1/1
#1 lore raw
Quoted 15 lines · On Mon, 1 Jul 2024 10:11:32 +1000 Gavin Shan <[email protected]> wrote:

Both ACPI_PROCESSOR and HOTPLUG_CPU are needed by ACPI_HOTPLUG_CPU. Otherwise, we can have compiling error with the following configurations.

CONFIG_HOTPLUG_CPU=n
CONFIG_ACPI_PROCESSOR=y
CONFIG_ACPI_HOTPLUG_CPU=y

  arch/arm64/kernel/smp.c: In function ‘arch_unregister_cpu’:
  arch/arm64/kernel/smp.c:563:9: error: implicit declaration of  \
  function ‘unregister_cpu’; did you mean ‘register_cpu’?        \
  [-Werror=implicit-function-declaration]
  563 |         unregister_cpu(c);
      |         ^~~~~~~~~~~~~~
      |         register_cpu
Quoted 8 lines

Fix it by enabling ACPI_HOTPLUG_CPU when both ACPI_PROCESSOR and HOTPLUG_CPU are enabled, consistent with other architectures like x86 and loongarch.

Fixes 9d0873892f4d ("arm64: Kconfig: Enable hotplug CPU on arm64 if ACPI_PROCESSOR is enabled.")

Thanks for the quick analysis and patch!

Quoted 17 lines
---
 arch/arm64/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm64/Kconfig +1 -1
index e8f2ef2312db..ff17c5705324 100644
@@ -5,7 +5,7 @@ config ARM64
 	select ACPI_CCA_REQUIRED if ACPI
 	select ACPI_GENERIC_GSI if ACPI
 	select ACPI_GTDT if ACPI
-	select ACPI_HOTPLUG_CPU if ACPI_PROCESSOR
+	select ACPI_HOTPLUG_CPU if ACPI_PROCESSOR && HOTPLUG_CPU
 	select ACPI_IORT if ACPI
 	select ACPI_REDUCED_HARDWARE_ONLY if ACPI
 	select ACPI_MCFG if (ACPI && PCI)
maintainer Applied
#2 lore raw
In reply to Gavin Shan
Quoted 8 lines · Gavin Shan

Both ACPI_PROCESSOR and HOTPLUG_CPU are needed by ACPI_HOTPLUG_CPU. Otherwise, we can have compiling error with the following configurations.

CONFIG_HOTPLUG_CPU=n
CONFIG_ACPI_PROCESSOR=y
CONFIG_ACPI_HOTPLUG_CPU=y

[...]

Applied to arm64 (for-next/vcpu-hotplug), thanks!

[1/1] arm64: Kconfig: Fix dependencies to enable ACPI_HOTPLUG_CPU

      https://git.kernel.org/arm64/c/46800e38ef0e
Signature · 1 line
Catalin