All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] EDAC: skx_edac: add ACPI dependency
@ 2018-11-02 15:32 ` Arnd Bergmann
  0 siblings, 0 replies; 16+ messages in thread
From: Arnd Bergmann @ 2018-11-02 15:32 UTC (permalink / raw)
  To: Borislav Petkov, Mauro Carvalho Chehab
  Cc: Arnd Bergmann, Tony Luck, Qiuxu Zhuo, linux-edac, linux-kernel

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

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


^ permalink raw reply related	[flat|nested] 16+ messages in thread

* EDAC: skx_edac: add ACPI dependency
@ 2018-11-02 15:32 ` Arnd Bergmann
  0 siblings, 0 replies; 16+ messages in thread
From: Arnd Bergmann @ 2018-11-02 15:32 UTC (permalink / raw)
  To: Borislav Petkov, Mauro Carvalho Chehab
  Cc: Arnd Bergmann, Tony Luck, Qiuxu Zhuo, linux-edac, linux-kernel

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

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

^ permalink raw reply related	[flat|nested] 16+ messages in thread

* Re: [PATCH] EDAC: skx_edac: add ACPI dependency
@ 2018-11-02 16:10   ` Borislav Petkov
  0 siblings, 0 replies; 16+ messages in thread
From: Borislav Petkov @ 2018-11-02 16:10 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Mauro Carvalho Chehab, Tony Luck, Qiuxu Zhuo, linux-edac, linux-kernel

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.

^ permalink raw reply	[flat|nested] 16+ messages in thread

* EDAC: skx_edac: add ACPI dependency
@ 2018-11-02 16:10   ` Borislav Petkov
  0 siblings, 0 replies; 16+ messages in thread
From: Borislav Petkov @ 2018-11-02 16:10 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Mauro Carvalho Chehab, Tony Luck, Qiuxu Zhuo, linux-edac, linux-kernel

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

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH] EDAC: skx_edac: add ACPI dependency
@ 2018-11-02 17:39     ` Luck, Tony
  0 siblings, 0 replies; 16+ messages in thread
From: Luck, Tony @ 2018-11-02 17:39 UTC (permalink / raw)
  To: Borislav Petkov
  Cc: Arnd Bergmann, Mauro Carvalho Chehab, Qiuxu Zhuo, linux-edac,
	linux-kernel

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

^ permalink raw reply	[flat|nested] 16+ messages in thread

* EDAC: skx_edac: add ACPI dependency
@ 2018-11-02 17:39     ` Luck, Tony
  0 siblings, 0 replies; 16+ messages in thread
From: Luck, Tony @ 2018-11-02 17:39 UTC (permalink / raw)
  To: Borislav Petkov
  Cc: Arnd Bergmann, Mauro Carvalho Chehab, Qiuxu Zhuo, linux-edac,
	linux-kernel

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

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH] EDAC: skx_edac: add ACPI dependency
@ 2018-11-02 23:42       ` Borislav Petkov
  0 siblings, 0 replies; 16+ messages in thread
From: Borislav Petkov @ 2018-11-02 23:42 UTC (permalink / raw)
  To: Luck, Tony
  Cc: Arnd Bergmann, Mauro Carvalho Chehab, Qiuxu Zhuo, linux-edac,
	linux-kernel

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.

^ permalink raw reply	[flat|nested] 16+ messages in thread

* EDAC: skx_edac: add ACPI dependency
@ 2018-11-02 23:42       ` Borislav Petkov
  0 siblings, 0 replies; 16+ messages in thread
From: Borislav Petkov @ 2018-11-02 23:42 UTC (permalink / raw)
  To: Luck, Tony
  Cc: Arnd Bergmann, Mauro Carvalho Chehab, Qiuxu Zhuo, linux-edac,
	linux-kernel

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.

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH] EDAC: skx_edac: add ACPI dependency
@ 2018-11-06 13:44         ` Arnd Bergmann
  0 siblings, 0 replies; 16+ messages in thread
From: Arnd Bergmann @ 2018-11-06 13:44 UTC (permalink / raw)
  To: Borislav Petkov
  Cc: Tony Luck, Mauro Carvalho Chehab, qiuxu.zhuo, linux-edac,
	Linux Kernel Mailing List

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

^ permalink raw reply	[flat|nested] 16+ messages in thread

* EDAC: skx_edac: add ACPI dependency
@ 2018-11-06 13:44         ` Arnd Bergmann
  0 siblings, 0 replies; 16+ messages in thread
From: Arnd Bergmann @ 2018-11-06 13:44 UTC (permalink / raw)
  To: Borislav Petkov
  Cc: Tony Luck, Mauro Carvalho Chehab, qiuxu.zhuo, linux-edac,
	Linux Kernel Mailing List

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

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH] EDAC: skx_edac: add ACPI dependency
@ 2018-11-06 14:32           ` Borislav Petkov
  0 siblings, 0 replies; 16+ messages in thread
From: Borislav Petkov @ 2018-11-06 14:32 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Tony Luck, Mauro Carvalho Chehab, qiuxu.zhuo, linux-edac,
	Linux Kernel Mailing List

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.

^ permalink raw reply	[flat|nested] 16+ messages in thread

* EDAC: skx_edac: add ACPI dependency
@ 2018-11-06 14:32           ` Borislav Petkov
  0 siblings, 0 replies; 16+ messages in thread
From: Borislav Petkov @ 2018-11-06 14:32 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Tony Luck, Mauro Carvalho Chehab, qiuxu.zhuo, linux-edac,
	Linux Kernel Mailing List

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.

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [PATCH] EDAC, skx: Better fix for randconfig builds
@ 2018-11-06 18:39             ` Luck, Tony
  0 siblings, 0 replies; 16+ messages in thread
From: Luck, Tony @ 2018-11-06 18:39 UTC (permalink / raw)
  To: Borislav Petkov
  Cc: Arnd Bergmann, Mauro Carvalho Chehab, qiuxu.zhuo, linux-edac,
	Linux Kernel Mailing List

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

diff --git a/drivers/edac/Kconfig b/drivers/edac/Kconfig
index ec2727b27556..e286b5b99003 100644
--- a/drivers/edac/Kconfig
+++ b/drivers/edac/Kconfig
@@ -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
diff --git a/include/linux/adxl.h b/include/linux/adxl.h
index 2d29f55923e3..2a629acb4c3f 100644
--- a/include/linux/adxl.h
+++ b/include/linux/adxl.h
@@ -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 */
-- 
2.19.1


^ permalink raw reply related	[flat|nested] 16+ messages in thread

* EDAC, skx: Better fix for randconfig builds
@ 2018-11-06 18:39             ` Luck, Tony
  0 siblings, 0 replies; 16+ messages in thread
From: Luck, Tony @ 2018-11-06 18:39 UTC (permalink / raw)
  To: Borislav Petkov
  Cc: Arnd Bergmann, Mauro Carvalho Chehab, qiuxu.zhuo, linux-edac,
	Linux Kernel Mailing List

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

diff --git a/drivers/edac/Kconfig b/drivers/edac/Kconfig
index ec2727b27556..e286b5b99003 100644
--- a/drivers/edac/Kconfig
+++ b/drivers/edac/Kconfig
@@ -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
diff --git a/include/linux/adxl.h b/include/linux/adxl.h
index 2d29f55923e3..2a629acb4c3f 100644
--- a/include/linux/adxl.h
+++ b/include/linux/adxl.h
@@ -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 */

^ permalink raw reply related	[flat|nested] 16+ messages in thread

* Re: [PATCH] EDAC, skx: Better fix for randconfig builds
@ 2018-11-07 22:03               ` Borislav Petkov
  0 siblings, 0 replies; 16+ messages in thread
From: Borislav Petkov @ 2018-11-07 22:03 UTC (permalink / raw)
  To: Luck, Tony
  Cc: Arnd Bergmann, Mauro Carvalho Chehab, qiuxu.zhuo, linux-edac,
	Linux Kernel Mailing List

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.

^ permalink raw reply	[flat|nested] 16+ messages in thread

* EDAC, skx: Better fix for randconfig builds
@ 2018-11-07 22:03               ` Borislav Petkov
  0 siblings, 0 replies; 16+ messages in thread
From: Borislav Petkov @ 2018-11-07 22:03 UTC (permalink / raw)
  To: Luck, Tony
  Cc: Arnd Bergmann, Mauro Carvalho Chehab, qiuxu.zhuo, linux-edac,
	Linux Kernel Mailing List

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.

^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2018-11-07 22:03 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-11-02 15:32 [PATCH] EDAC: skx_edac: add ACPI dependency Arnd Bergmann
2018-11-02 15:32 ` Arnd Bergmann
2018-11-02 16:10 ` [PATCH] " Borislav Petkov
2018-11-02 16:10   ` Borislav Petkov
2018-11-02 17:39   ` [PATCH] " Luck, Tony
2018-11-02 17:39     ` Luck, Tony
2018-11-02 23:42     ` [PATCH] " Borislav Petkov
2018-11-02 23:42       ` Borislav Petkov
2018-11-06 13:44       ` [PATCH] " Arnd Bergmann
2018-11-06 13:44         ` Arnd Bergmann
2018-11-06 14:32         ` [PATCH] " Borislav Petkov
2018-11-06 14:32           ` Borislav Petkov
2018-11-06 18:39           ` [PATCH] EDAC, skx: Better fix for randconfig builds Luck, Tony
2018-11-06 18:39             ` Luck, Tony
2018-11-07 22:03             ` [PATCH] " Borislav Petkov
2018-11-07 22:03               ` Borislav Petkov

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.