diff mbox series

EDAC: skx_edac: add ACPI dependency

Message ID 20181102153232.1450251-1-arnd@arndb.de
State New
Headers show
Series EDAC: skx_edac: add ACPI dependency | expand

Commit Message

Arnd Bergmann Nov. 2, 2018, 3:32 p.m. UTC
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")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>

---
 drivers/edac/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

-- 
2.18.0

Comments

Borislav Petkov Nov. 2, 2018, 4:10 p.m. UTC | #1
On Fri, Nov 02, 2018 at 04:32:06PM +0100, Arnd Bergmann wrote:
> 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

-- 
Regards/Gruss,
    Boris.

Good mailing practices for 400: avoid top-posting and trim the reply.
Luck, Tony Nov. 2, 2018, 5:39 p.m. UTC | #2
On Fri, Nov 02, 2018 at 05:10:13PM +0100, Borislav Petkov wrote:
> On Fri, Nov 02, 2018 at 04:32:06PM +0100, Arnd Bergmann wrote:

> > 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


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
Borislav Petkov Nov. 2, 2018, 11:42 p.m. UTC | #3
On Fri, Nov 02, 2018 at 10:39:59AM -0700, Luck, Tony wrote:
> On Fri, Nov 02, 2018 at 05:10:13PM +0100, Borislav Petkov wrote:

> > On Fri, Nov 02, 2018 at 04:32:06PM +0100, Arnd Bergmann wrote:

> > > 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

> 

> 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.

-- 
Regards/Gruss,
    Boris.

Good mailing practices for 400: avoid top-posting and trim the reply.
Arnd Bergmann Nov. 6, 2018, 1:44 p.m. UTC | #4
On Sat, Nov 3, 2018 at 12:42 AM Borislav Petkov <bp@alien8.de> wrote:
>

> On Fri, Nov 02, 2018 at 10:39:59AM -0700, Luck, Tony wrote:

> > On Fri, Nov 02, 2018 at 05:10:13PM +0100, Borislav Petkov wrote:

> > > On Fri, Nov 02, 2018 at 04:32:06PM +0100, Arnd Bergmann wrote:

> > > > 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"

> -       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.


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

     Arnd
Borislav Petkov Nov. 6, 2018, 2:32 p.m. UTC | #5
On Tue, Nov 06, 2018 at 02:44:42PM +0100, Arnd Bergmann wrote:
> 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

Thx.

-- 
Regards/Gruss,
    Boris.

Good mailing practices for 400: avoid top-posting and trim the reply.
Borislav Petkov Nov. 7, 2018, 10:03 p.m. UTC | #6
On Tue, Nov 06, 2018 at 10:39:15AM -0800, Luck, Tony wrote:
> On Tue, Nov 06, 2018 at 03:32:53PM +0100, Borislav Petkov wrote:

> > On Tue, Nov 06, 2018 at 02:44:42PM +0100, Arnd Bergmann wrote:

> > > 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")

> Signed-off-by: Tony Luck <tony.luck@intel.com>

> ---

>  drivers/edac/Kconfig | 4 ++--

>  include/linux/adxl.h | 5 -----

>  2 files changed, 2 insertions(+), 7 deletions(-)


Applied, thanks.

-- 
Regards/Gruss,
    Boris.

Good mailing practices for 400: avoid top-posting and trim the reply.
diff mbox series

Patch

diff --git a/drivers/edac/Kconfig b/drivers/edac/Kconfig
index 41c9ccdd20d6..2397e1d2493a 100644
--- a/drivers/edac/Kconfig
+++ b/drivers/edac/Kconfig
@@ -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