Re: [platform-drivers-x86:testing 6/6] drivers/platform/x86/Kconfig:128:error: recursive dependency detected!

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Mar 08, 2018 at 12:03:11PM -0800, Darren Hart wrote:
> On Fri, Mar 09, 2018 at 02:45:05AM +0800, kbuild test robot wrote:
> > tree:   git://git.infradead.org/users/dvhart/linux-platform-drivers-x86.git testing
> > head:   1fd7ad4be77160c4a6c6deca62c3b9c728836b7d
> > commit: 1fd7ad4be77160c4a6c6deca62c3b9c728836b7d [6/6] platform/x86: dell-smbios: Resolve dependency error on DCDBAS
> > config: sh-allmodconfig (attached as .config)
> > compiler: sh4-linux-gnu-gcc (Debian 7.2.0-11) 7.2.0
> > reproduce:
> >         wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
> >         chmod +x ~/bin/make.cross
> >         git checkout 1fd7ad4be77160c4a6c6deca62c3b9c728836b7d
> >         # save the attached .config to linux build tree
> >         make.cross ARCH=sh 
> > 
> > All errors (new ones prefixed by >>):
> > 
> > >> drivers/platform/x86/Kconfig:128:error: recursive dependency detected!
> > >> drivers/platform/x86/Kconfig:128: symbol DELL_SMBIOS_USING_DCDBAS is selected by DELL_SMBIOS_SMM
> > >> drivers/platform/x86/Kconfig:145: symbol DELL_SMBIOS_SMM depends on DELL_SMBIOS
> > >> drivers/platform/x86/Kconfig:114: symbol DELL_SMBIOS depends on DELL_SMBIOS_USING_DCDBAS
> >    For a resolution refer to Documentation/kbuild/kconfig-language.txt
> >    subsection "Kconfig recursive dependency limitations"
> > 
> > vim +128 drivers/platform/x86/Kconfig
> 
> Well, apparently this needs more work. I don't know why I didn't see this
> recursive error with this version of my patch. I'll see if there is anything I
> can do...
> 
> Andy, this means we'll probably have to break testing and roll this back.

OK, I spent some time mapping this out and... oi, what a mess. Greg KH is here
at OSLS and I worked through this with him - he suggested just simplifying this
by forcing DELL_SMBIOS to be <= DCDBAS if DCDBAS is enabled. I've updated my
patch in testing to reflect this, and force pushed. Hopefully nobody but 0-day
is impacted. This is bad form, but sending something to Linus with Kconfig
errors would be worse.


>From cc69c88fbeb915447b87e5179378d899d1f61554 Mon Sep 17 00:00:00 2001
Message-Id: <cc69c88fbeb915447b87e5179378d899d1f61554.1520545797.git.dvhart@xxxxxxxxxxxxx>
From: "Darren Hart (VMware)" <dvhart@xxxxxxxxxxxxx>
Date: Tue, 6 Mar 2018 18:01:04 -0800
Subject: [PATCH] platform/x86: dell-smbios: Resolve dependency error on DCDBAS

When the DELL_SMBIOS_SMM backend is enabled, the DELL_SMBIOS symbol
depends on DELL_DCDBAS, and we must avoid the situation where
DELL_SMBIOS=y and DCDBAS=m.

Adding the conditional dependency to DELL_SMBIOS such as:

depends !DELL_SMBIOS_SMM || (DCDBAS || DCDBAS=n)

results in the Kconfig tooling complaining about a circular dependency,
although it appears to work in practice.

Avoid the errors by simplifying the dependency and forcing DELL_SMBIOS
to be <= DCDBAS if DCDBAS is enabled (thanks to Greg KH for the
suggestion).

Cc: Mario.Limonciello@xxxxxxxx
Signed-off-by: Darren Hart (VMware) <dvhart@xxxxxxxxxxxxx>
---
 drivers/platform/x86/Kconfig | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/platform/x86/Kconfig b/drivers/platform/x86/Kconfig
index 022c837..e55b008 100644
--- a/drivers/platform/x86/Kconfig
+++ b/drivers/platform/x86/Kconfig
@@ -105,8 +105,14 @@ config ASUS_LAPTOP
 
 	  If you have an ACPI-compatible ASUS laptop, say Y or M here.
 
+#
+# If the DELL_SMBIOS_SMM feature is enabled, the DELL_SMBIOS driver
+# becomes dependent on the DCDBAS driver. The "depends" line prevents a
+# configuration where DELL_SMBIOS=y while DCDBAS=m.
+#
 config DELL_SMBIOS
 	tristate "Dell SMBIOS driver"
+	depends on DCDBAS || DCDBAS=n
 	---help---
 	This provides support for the Dell SMBIOS calling interface.
 	If you have a Dell computer you should enable this option.
-- 
2.9.5


-- 
Darren Hart
VMware Open Source Technology Center



[Index of Archives]     [Linux Kernel Development]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux