arm64: fix ACPI dependencies
PATCH 1/1 arm64: fix ACPI dependencies
Kconfig reports a warning on x86 builds after the ARM64 dependency was added.
drivers/acpi/Kconfig:6:error: recursive dependency detected!drivers/acpi/Kconfig:6: symbol ACPI depends on EFI
This rephrases the dependency to keep the ARM64 details out of the shared Kconfig file, so Kconfig no longer gets confused by it.
--- arch/arm64/Kconfig | 1 + drivers/acpi/Kconfig | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-)
arch/arm64/Kconfig +1 -0
@@ -1267,6 +1267,7 @@ config EFI bool "UEFI runtime support" depends on OF && !CPU_BIG_ENDIAN depends on KERNEL_MODE_NEON + select ARCH_SUPPORTS_ACPI select LIBFDT select UCS2_STRING select EFI_PARAMS_FROM_FDT
drivers/acpi/Kconfig +4 -1
@@ -6,7 +6,7 @@ menuconfig ACPI bool "ACPI (Advanced Configuration and Power Interface) Support" depends on !IA64_HP_SIM - depends on IA64 || X86 || (ARM64 && EFI) + depends on IA64 || X86 || ARCH_SUPPORTS_ACPI depends on PCI select PNP default y if (IA64 || X86)
@@ -41,6 +41,9 @@ menuconfig ACPI <http://www.acpi.info> <http://www.uefi.org/acpi/specs> +config ARCH_SUPPORTS_ACPI + bool + if ACPI config ACPI_LEGACY_TABLES_LOOKUP
Signature · 1 line
2.18.0
Rafael J. Wysocki
maintainerQuoted 33 lines · Arnd Bergmann
Kconfigreports a warning on x86 builds after the ARM64 dependency was added.drivers/acpi/Kconfig:6:error: recursive dependency detected!
drivers/acpi/Kconfig:6: symbol ACPI depends on EFIThis rephrases the dependency to keep the ARM64 details out of the shared
Kconfigfile, soKconfigno longer gets confused by it.Fixes 5bcd44083a08 ("drivers: acpi: add dependency of EFI for arm64")Signed-off-by Arnd Bergmann <[email protected]>--- arch/arm64/Kconfig | 1 + drivers/acpi/Kconfig | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-)arch/arm64/Kconfig +1
-0@@ -1267,6 +1267,7 @@ config EFI bool "UEFI runtime support" depends on OF && !CPU_BIG_ENDIAN depends on KERNEL_MODE_NEON + select ARCH_SUPPORTS_ACPI select LIBFDT select UCS2_STRING select EFI_PARAMS_FROM_FDTdrivers/acpi/Kconfig +0
-0
drivers/acpi/Kconfig line 9
Quoted 5 lines
drivers/acpi/Kconfig +1
-1@@ -6,7 +6,7 @@ menuconfig ACPI bool "ACPI (Advanced Configuration and Power Interface) Support" depends on !IA64_HP_SIM - depends on IA64 || X86 || (ARM64 && EFI) + depends on IA64 || X86 || ARCH_SUPPORTS_ACPI
That doesn't look particularly consistent to me.
It should be either "depends on ARCH_SUPPORTS_ACPI" alone or mention ARM64 somehow IMO
Quoted 14 lines
drivers/acpi/Kconfig +3
-1depends on PCI select PNP default y if (IA64 || X86)@@ -41,6 +41,9 @@ menuconfig ACPI <http://www.acpi.info> <http://www.uefi.org/acpi/specs> +config ARCH_SUPPORTS_ACPI + bool + if ACPI config ACPI_LEGACY_TABLES_LOOKUP --
Quoted 42 lines · Rafael J. Wysocki
Quoted 33 lines · Arnd Bergmann
Kconfigreports a warning on x86 builds after the ARM64 dependency was added.drivers/acpi/Kconfig:6:error: recursive dependency detected!
drivers/acpi/Kconfig:6: symbol ACPI depends on EFIThis rephrases the dependency to keep the ARM64 details out of the shared
Kconfigfile, soKconfigno longer gets confused by it.Fixes 5bcd44083a08 ("drivers: acpi: add dependency of EFI for arm64")Signed-off-by Arnd Bergmann <[email protected]>--- arch/arm64/Kconfig | 1 + drivers/acpi/Kconfig | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-)arch/arm64/Kconfig +1
-0@@ -1267,6 +1267,7 @@ config EFI bool "UEFI runtime support" depends on OF && !CPU_BIG_ENDIAN depends on KERNEL_MODE_NEON + select ARCH_SUPPORTS_ACPI select LIBFDT select UCS2_STRING select EFI_PARAMS_FROM_FDTdrivers/acpi/Kconfig +0
-0drivers/acpi/Kconfig line 9
Quoted 5 lines
drivers/acpi/Kconfig +1
-1@@ -6,7 +6,7 @@ menuconfig ACPI bool "ACPI (Advanced Configuration and Power Interface) Support" depends on !IA64_HP_SIM - depends on IA64 || X86 || (ARM64 && EFI) + depends on IA64 || X86 || ARCH_SUPPORTS_ACPIThat doesn't look particularly consistent to me.
Quoted 2 lines
It should be either "depends on
ARCH_SUPPORTS_ACPI" alone or mention ARM64 somehow IMO
How about something along the lines of what Ard suggested? Untested diff below.
Will
--->8
arch/arm64/Kconfig +1 -0
@@ -56,6 +56,7 @@ config ARM64 select ARCH_USE_CMPXCHG_LOCKREF select ARCH_USE_QUEUED_RWLOCKS select ARCH_USE_QUEUED_SPINLOCKS + select ARCH_SUPPORTS_ACPI select ARCH_SUPPORTS_MEMORY_FAILURE select ARCH_SUPPORTS_ATOMIC_RMW select ARCH_SUPPORTS_INT128 if GCC_VERSION >= 50000 || CC_IS_CLANG
drivers/acpi/Kconfig +4 -2
@@ -3,10 +3,12 @@ # ACPI Configuration # +config ARCH_SUPPORTS_ACPI + def_bool (IA64 && !IA64_HP_SIM) || X86 + menuconfig ACPI bool "ACPI (Advanced Configuration and Power Interface) Support" - depends on !IA64_HP_SIM - depends on IA64 || X86 || (ARM64 && EFI) + depends on ARCH_SUPPORTS_ACPI depends on PCI select PNP default y if (IA64 || X86)
Quoted 13 lines · Will Deacon
Quoted 1 line · Rafael J. Wysocki
On Tue, Jul 24, 2018 at 11:33 AM, Arnd Bergmann <[email protected]> wrote:
How about something along the lines of what Ard suggested? Untested diff below.
arch/arm64/Kconfig +0
-0
arch/arm64/Kconfig config ARM64 · line 62
Quoted 7 lines
arch/arm64/Kconfig +1
-0@@ -56,6 +56,7 @@ config ARM64 select ARCH_USE_CMPXCHG_LOCKREF select ARCH_USE_QUEUED_RWLOCKS select ARCH_USE_QUEUED_SPINLOCKS + select ARCH_SUPPORTS_ACPI select ARCH_SUPPORTS_MEMORY_FAILURE select ARCH_SUPPORTS_ATOMIC_RMW select ARCH_SUPPORTS_INT128 if GCC_VERSION >= 50000 || CC_IS_CLANG
I'd prefer Rafael's suggestion of just leaving out the architecture names from the dependency, and making all three 'select ARCH_SUPPORTS_ACPI'.
I'll send a v2.
Arnd
Quoted 25 lines · Arnd Bergmann
Quoted 13 lines · Will Deacon
Quoted 1 line · Rafael J. Wysocki
On Tue, Jul 24, 2018 at 11:33 AM, Arnd Bergmann <[email protected]> wrote:
How about something along the lines of what Ard suggested? Untested diff below.
arch/arm64/Kconfig +0
-0arch/arm64/Kconfig config ARM64 · line 62
Quoted 7 lines
arch/arm64/Kconfig +1
-0@@ -56,6 +56,7 @@ config ARM64 select ARCH_USE_CMPXCHG_LOCKREF select ARCH_USE_QUEUED_RWLOCKS select ARCH_USE_QUEUED_SPINLOCKS + select ARCH_SUPPORTS_ACPI select ARCH_SUPPORTS_MEMORY_FAILURE select ARCH_SUPPORTS_ATOMIC_RMW select ARCH_SUPPORTS_INT128 if GCC_VERSION >= 50000 || CC_IS_CLANGI'd prefer Rafael's suggestion of just leaving out the architecture names from the dependency, and making all three 'select
ARCH_SUPPORTS_ACPI'.
Quoted 1 line
I'll send a v2.
Ok, thanks.
Will