Skip to contentSkip to conversation

EDAC: skx_edac: add ACPI dependency

PATCH In review Arnd Bergmann 3 participants 8 messages Nov 2, 2018 – Nov 7, 2018 EDAC-core

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 EDAC: skx_edac: add ACPI dependency

We cannot currently select ACPI_ADXL without also enabling the top-level ACPI option:

WARNING: unmet direct dependencies detected for ACPI_ADXL
Depends on [n]: ACPI [=n]
Selected by [y]:
- EDAC_SKX [=y] && EDAC [=y] && PCI [=y] && X86_64 [=y] && X86_MCE_INTEL [=y] && PCI_MMCONFIG [=y] && (ACPI_NFIT [=n] || !ACPI_NFIT [=n])

Add a corresponding dependency here.

Fixes ad6e16059d8e ("EDAC, skx_edac: Add address translation for non-volatile DIMMs")
---
 drivers/edac/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/edac/Kconfig +1 -1
index 41c9ccdd20d6..2397e1d2493a 100644
@@ -231,7 +231,7 @@ config EDAC_SBRIDGE
 
 config EDAC_SKX
 	tristate "Intel Skylake server Integrated MC"
-	depends on PCI && X86_64 && X86_MCE_INTEL && PCI_MMCONFIG
+	depends on PCI && X86_64 && X86_MCE_INTEL && PCI_MMCONFIG && ACPI
 	depends on ACPI_NFIT || !ACPI_NFIT # if ACPI_NFIT=m, EDAC_SKX can't be y
 	select DMI
 	select ACPI_ADXL if ACPI
maintainer
#1 lore raw
Quoted 7 lines · Arnd Bergmann

We cannot currently select ACPI_ADXL without also enabling the top-level ACPI option:

WARNING: unmet direct dependencies detected for ACPI_ADXL
Depends on [n]: ACPI [=n]
Selected by [y]:
- EDAC_SKX [=y] && EDAC [=y] && PCI [=y] && X86_64 [=y] && X86_MCE_INTEL [=y] && PCI_MMCONFIG [=y] && (ACPI_NFIT [=n] || !ACPI_NFIT [=n])

That should fix the issue too:

https://marc.info/?l=linux-acpi&m=154102117706500&w=2

maintainer
#2 lore raw
Quoted 4 lines · Borislav Petkov
Quoted 3 lines · Arnd Bergmann

We cannot currently select ACPI_ADXL without also enabling the top-level ACPI option:

Quoted 8 lines
Quoted 4 lines

WARNING: unmet direct dependencies detected for ACPI_ADXL
Depends on [n]: ACPI [=n]
Selected by [y]:
- EDAC_SKX [=y] && EDAC [=y] && PCI [=y] && X86_64 [=y] && X86_MCE_INTEL [=y] && PCI_MMCONFIG [=y] && (ACPI_NFIT [=n] || !ACPI_NFIT [=n])

That should fix the issue too:

https://marc.info/?l=linux-acpi&m=154102117706500&w=2

I have to say that Arnd's fix is prettier. With it, we can go back to

select ACPI_ADXL

instead of

select ACPI_ADXL if ACPI

-Tony

maintainer
#3 lore raw
Quoted 14 lines · Tony
Quoted 4 lines · Borislav Petkov
Quoted 3 lines · Arnd Bergmann

We cannot currently select ACPI_ADXL without also enabling the top-level ACPI option:

Quoted 8 lines
Quoted 4 lines

WARNING: unmet direct dependencies detected for ACPI_ADXL
Depends on [n]: ACPI [=n]
Selected by [y]:
- EDAC_SKX [=y] && EDAC [=y] && PCI [=y] && X86_64 [=y] && X86_MCE_INTEL [=y] && PCI_MMCONFIG [=y] && (ACPI_NFIT [=n] || !ACPI_NFIT [=n])

That should fix the issue too:

https://marc.info/?l=linux-acpi&m=154102117706500&w=2

Quoted 8 lines

I have to say that Arnd's fix is prettier. With it, we can go back to

select ACPI_ADXL

instead of

select ACPI_ADXL if ACPI

Arnd's fix already has that last line in there:

config EDAC_SKX
tristate "Intel Skylake server Integrated MC"
- depends on PCI && X86_64 && X86_MCE_INTEL && PCI_MMCONFIG
+ depends on PCI && X86_64 && X86_MCE_INTEL && PCI_MMCONFIG && ACPI

        depends on ACPI_NFIT || !ACPI_NFIT # if ACPI_NFIT=m, EDAC_SKX can't be y
        select DMI
        select ACPI_ADXL if ACPI
	^^^^^^^^^^^^^^^^^^^^^^^^

so I'm reading this as *additionally* needed, ontop of the ugly fix.

But let's wait until he clarifies first.

#4 lore raw
Quoted 25 lines · Borislav Petkov
Quoted 11 lines · Tony
Quoted 2 lines · Borislav Petkov
Quoted 1 line · Arnd Bergmann

We cannot currently select ACPI_ADXL without also enabling the top-level

I have to say that Arnd's fix is prettier. With it, we can go back to

select ACPI_ADXL

instead of

select ACPI_ADXL if ACPI

Arnd's fix already has that last line in there:

config EDAC_SKX
tristate "Intel Skylake server Integrated MC"

drivers/edac/Kconfig +1 -1
-       depends on PCI && X86_64 && X86_MCE_INTEL && PCI_MMCONFIG
+       depends on PCI && X86_64 && X86_MCE_INTEL && PCI_MMCONFIG && ACPI
        depends on ACPI_NFIT || !ACPI_NFIT # if ACPI_NFIT=m, EDAC_SKX can't be y
        select DMI
        select ACPI_ADXL if ACPI
        ^^^^^^^^^^^^^^^^^^^^^^^^
Quoted 3 lines

so I'm reading this as *additionally* needed, ontop of the ugly fix.

But let's wait until he clarifies first.

No, it was unintentional, the 'if ACPI' can be dropped when we add 'depends on ACPI'.

Arnd

maintainer
#6 lore raw

PATCH 1/1 EDAC, skx: Better fix for randconfig builds

Quoted 10 lines · Borislav Petkov
Quoted 2 lines · Arnd Bergmann

No, it was unintentional, the 'if ACPI' can be dropped when we add 'depends on ACPI'.

So I have one fix already which takes care of non-sensical configs. If you or Tony wanna make it prettier, feel free to test it thoroughly and send me a patch ontop of

https://git.kernel.org/pub/scm/linux/kernel/git/bp/bp.git/log/?h=for-next

It was previously noted that Kconfig complained about unmet dependencies when trying to configure skx_edac together with CONFIG_ACPI=n. First fix for this checked for ACPI when doing

select ACPI_ADXL

but this required stub functions for the case where ACPI wasn't selected. It also allowed building a driver that didn't actually work for a system that has non-volatile DIMMs.

Arnd Bergmann pointed out that the right fix is to make EDAC_SKX "depend on ACPI".

Fixes a324e9396ca3 ("EDAC, skx: Fix randconfig builds")
---
 drivers/edac/Kconfig | 4 ++--
 include/linux/adxl.h | 5 -----
 2 files changed, 2 insertions(+), 7 deletions(-)
drivers/edac/Kconfig +2 -2
index ec2727b27556..e286b5b99003 100644
@@ -231,10 +231,10 @@ config EDAC_SBRIDGE
 
 config EDAC_SKX
 	tristate "Intel Skylake server Integrated MC"
-	depends on PCI && X86_64 && X86_MCE_INTEL && PCI_MMCONFIG
+	depends on PCI && X86_64 && X86_MCE_INTEL && PCI_MMCONFIG && ACPI
 	depends on ACPI_NFIT || !ACPI_NFIT # if ACPI_NFIT=m, EDAC_SKX can't be y
 	select DMI
-	select ACPI_ADXL if ACPI
+	select ACPI_ADXL
 	help
 	  Support for error detection and correction the Intel
 	  Skylake server Integrated Memory Controllers. If your
include/linux/adxl.h +0 -5
index 2d29f55923e3..2a629acb4c3f 100644
@@ -7,12 +7,7 @@
 #ifndef _LINUX_ADXL_H
 #define _LINUX_ADXL_H
 
-#ifdef CONFIG_ACPI_ADXL
 const char * const *adxl_get_component_names(void);
 int adxl_decode(u64 addr, u64 component_values[]);
-#else
-static inline const char * const *adxl_get_component_names(void)  { return NULL; }
-static inline int adxl_decode(u64 addr, u64 component_values[])   { return  -EOPNOTSUPP; }
-#endif
 
 #endif /* _LINUX_ADXL_H */
maintainer Applied
#7 lore raw

Re: [PATCH] EDAC, skx: Better fix for randconfig builds

Quoted 26 lines · Tony
Quoted 10 lines · Borislav Petkov
Quoted 2 lines · Arnd Bergmann

No, it was unintentional, the 'if ACPI' can be dropped when we add 'depends on ACPI'.

So I have one fix already which takes care of non-sensical configs. If you or Tony wanna make it prettier, feel free to test it thoroughly and send me a patch ontop of

https://git.kernel.org/pub/scm/linux/kernel/git/bp/bp.git/log/?h=for-next

It was previously noted that Kconfig complained about unmet dependencies when trying to configure skx_edac together with CONFIG_ACPI=n. First fix for this checked for ACPI when doing

select ACPI_ADXL

but this required stub functions for the case where ACPI wasn't selected. It also allowed building a driver that didn't actually work for a system that has non-volatile DIMMs.

Arnd Bergmann pointed out that the right fix is to make EDAC_SKX "depend on ACPI".

Quoted 6 lines
Fixes a324e9396ca3 ("EDAC, skx: Fix randconfig builds")
---
 drivers/edac/Kconfig | 4 ++--
 include/linux/adxl.h | 5 -----
 2 files changed, 2 insertions(+), 7 deletions(-)

Applied, thanks.