RE: [platform-drivers-x86:testing 4/5] drivers/platform/x86/dell-smbios-smm.c:99: undefined reference to `dcdbas_smi_request'

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

 



> -----Original Message-----
> From: Darren Hart [mailto:dvhart@xxxxxxxxxxxxx]
> Sent: Wednesday, March 7, 2018 10:16 AM
> To: Limonciello, Mario <Mario_Limonciello@xxxxxxxx>
> Cc: kbuild-all@xxxxxx; platform-driver-x86@xxxxxxxxxxxxxxx;
> andriy.shevchenko@xxxxxxxxxxxxxxx; fengguang.wu@xxxxxxxxx
> Subject: Re: [platform-drivers-x86:testing 4/5] drivers/platform/x86/dell-smbios-
> smm.c:99: undefined reference to `dcdbas_smi_request'
> 
> On Tue, Mar 06, 2018 at 05:52:57PM -0800, Darren Hart wrote:
> > On Tue, Mar 06, 2018 at 05:53:16AM +0000, Mario.Limonciello@xxxxxxxx wrote:
> > > Darren,
> > >
> > > I looked through this and I think this is caused by dell-smbios-smm
> > > no longer being mandated as it's own module but dcdbas being
> > > allowed to be a module.
> > >
> > > The config that was selected had dcdbas as a module and dell-smbios
> > > compiled in. That particular configuration should be prevented
> > >
> >
> > This is a weird corner case, I had to dig up the syntax:
> >
> > config DELL_SMBIOS
> > 	depends on DCDBAS || DCDBAS=n
> >
> > Is what we want. BUT. We only want that if DELL_SMBIOS_SMM, which
> > unforunately causes a circular dependency (sort of, but it complains, so
> > it won't fly)
> >
> > I'm working on this between conference sessions. Will report back when I
> > sort it out.
> 
> OK, this takes advantage of "select" not doing dependency checking to avoid the
> recursion. Yuuuuuuck, but it works.

Well that's pretty ugly, but yeah I guess if it works it works..

> 
> 
> From fe0c6c32fe4616343af8799f0d3c86d7b12d21a6 Mon Sep 17 00:00:00 2001
> Message-Id:
> <fe0c6c32fe4616343af8799f0d3c86d7b12d21a6.1520388937.git.dvhart@infradead.
> org>
> 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
> needs to depend on DELL_DCDBAS - and specifically avoid the situation
> where DELL_SMBIOS=y and DCDBAS=m.
> 
> The intermediary DELL_SMBIOS_USING_DCDBAS avoids what would otherwise be
> reported as a recursive dependency between DELL_SMBIOS and
> DELL_SMBIOS_SMM (thanks to Steven Rostedt for the idea).
> 
> Cc: Mario.Limonciello@xxxxxxxx
> Signed-off-by: Darren Hart (VMware) <dvhart@xxxxxxxxxxxxx>
> ---
>  drivers/platform/x86/Kconfig | 10 ++++++++++
>  1 file changed, 10 insertions(+)
> 
> diff --git a/drivers/platform/x86/Kconfig b/drivers/platform/x86/Kconfig
> index 022c837..0b3d330 100644
> --- a/drivers/platform/x86/Kconfig
> +++ b/drivers/platform/x86/Kconfig
> @@ -107,12 +107,21 @@ config ASUS_LAPTOP
> 
>  config DELL_SMBIOS
>  	tristate "Dell SMBIOS driver"
> +	depends on !DELL_SMBIOS_USING_DCDBAS || (DCDBAS || DCDBAS=n)
>  	---help---
>  	This provides support for the Dell SMBIOS calling interface.
>  	If you have a Dell computer you should enable this option.
> 
>  	Be sure to select at least one backend for it to work properly.
> 
> +#
> +# This decouples what would otherwise be a recursive dependency between
> +# DELL_SMBIOS and DELL_SMBIOS_SMM. If DELL_SMBIOS_SMM is selected, then
> +# DELL_SMBIOS needs to depend on DCDBAS.
> +#
> +config DELL_SMBIOS_USING_DCDBAS
> +	bool
> +
>  config DELL_SMBIOS_WMI
>  	bool "Dell SMBIOS driver WMI backend"
>  	default y
> @@ -132,6 +141,7 @@ config DELL_SMBIOS_SMM
>  	default y
>  	depends on DCDBAS
>  	depends on DELL_SMBIOS
> +	select DELL_SMBIOS_USING_DCDBAS
>  	---help---
>  	This provides an implementation for the Dell SMBIOS calling interface
>  	communicated over SMI/SMM.
> --
> 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