From patchwork Wed Mar 7 02:16:06 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Darren Hart X-Patchwork-Id: 10263315 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id F031E6055D for ; Wed, 7 Mar 2018 02:16:11 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E0B0B29120 for ; Wed, 7 Mar 2018 02:16:11 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D4F4B2930F; Wed, 7 Mar 2018 02:16:11 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5FA192933E for ; Wed, 7 Mar 2018 02:16:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753996AbeCGCQL (ORCPT ); Tue, 6 Mar 2018 21:16:11 -0500 Received: from bombadil.infradead.org ([198.137.202.133]:59932 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753940AbeCGCQK (ORCPT ); Tue, 6 Mar 2018 21:16:10 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=mrrHImwehC/hv3Jx/m92mwjEmQZCtXO28iZntZz0ruE=; b=ri64vs6Q659F8RtQH5GaEVtCU c6F2j3Y5vvLGGlM7hJtlQNDfzWNLVaqiS2SFThM2/Ha0XGM89hW17Vd+Z7PtILvwAoDTB1H9Qx1cX l5Oo/Zfm4pLrb9iVAEHHDTPDTx1p4X5diUnMyBuaZwo0G1nssnm5L1nvPKR5wWx6mi8MOvX2/HmTr NCGSc9ltNsLTxRjbnY+jZEYLt5VnhRRIWbRFsId1VheomS+T79/VAgREkQcudCi3lwS2zMMDrk02O dSMufFng2UyTxxVdP3hYxWdF4DhJTJTwmbvglrLjwBBzyxYQMikw23DLSI8gjZUQJGxYTB3I354YL /69ixdbpg==; Received: from dvhart by bombadil.infradead.org with local (Exim 4.89 #1 (Red Hat Linux)) id 1etOch-0007tM-Uu; Wed, 07 Mar 2018 02:16:07 +0000 Date: Tue, 6 Mar 2018 18:16:06 -0800 From: Darren Hart To: Mario.Limonciello@dell.com Cc: kbuild-all@01.org, platform-driver-x86@vger.kernel.org, andriy.shevchenko@linux.intel.com, fengguang.wu@intel.com Subject: Re: [platform-drivers-x86:testing 4/5] drivers/platform/x86/dell-smbios-smm.c:99: undefined reference to `dcdbas_smi_request' Message-ID: <20180307021606.GB124624@localhost.localdomain> References: <201803061357.JzjuagTC%fengguang.wu@intel.com> <2b5b860c0a6545fb95e1f24bbe9b0a3b@ausx13mpc124.AMER.DELL.COM> <20180307015257.GA124624@localhost.localdomain> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20180307015257.GA124624@localhost.localdomain> User-Agent: Mutt/1.9.1 (2017-09-22) Sender: platform-driver-x86-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: platform-driver-x86@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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@dell.com 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. From fe0c6c32fe4616343af8799f0d3c86d7b12d21a6 Mon Sep 17 00:00:00 2001 Message-Id: From: "Darren Hart (VMware)" 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@dell.com Signed-off-by: Darren Hart (VMware) --- 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.