Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp6193373rdb; Thu, 14 Dec 2023 10:40:27 -0800 (PST) X-Google-Smtp-Source: AGHT+IGAPkyzJQ+G1/Om/bGp2LoXE+8n5NtiUuyrs3Kgo4lj+TLE+KHaAmZMQNjmOWNi5xtpXWS+ X-Received: by 2002:a17:902:a38e:b0:1d3:7707:8f3 with SMTP id x14-20020a170902a38e00b001d3770708f3mr730445pla.123.1702579227040; Thu, 14 Dec 2023 10:40:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702579227; cv=none; d=google.com; s=arc-20160816; b=v2MEAeHamLVdn8hCjMiNl25WtRtjzzPTyXspnMc2ageXi5oPdZvFropYHLsSU86LME TPuuKqgKSQH/k4Bpt2wtteUhhiC3RR89qdqexwmq43j+EXIVqrLdf08SLP2eMSkbsLgr dF44qh41+7I1DN51Yzz/Hj7l7J//yIZ1NtsNsZLoMYhDfmHv7G5AF4rU32xYm2fQwjVC aXACzSl25t/UjQ83ZPWbbwOI1zAld4LnCw3grKraFTDzaW0eG+CDCjseL6meBsj/YndV 2oUNjPDdVFR7FtJmDSNsk+Js9j9lK46VCWPEqQqs4FqasFOSJ8cQbwfHKYgernHQvDGb OGWg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=GZS1uCqYzfC4IXJIcDTYVCeGCzNIYxmklv/joOBVRVs=; fh=LJdtKDG3G7m9d4JaiSeQKrRdVzhnkqFx8shoPP2Tke8=; b=DY8JGv7B5hWhhOn4c71G/fmB7afqzq8QIjKUHL5EmKnZhHhZiJunZRM6RG0xJRmLbA O7WE18KvRCLBL073q1AwbWi3ZifvqMF0ROzNNM/IA3ehLjDm5Ht/J2/krWdt4aGdzxPq 2yJ5Hz5QJ+Pg8LHhZYkYeP+jM7nojwq1hV4y9nRcWdeVwpVSlk7MCE7rGefc61uoH6oS jm/w2tvv2XE0U2K2RS8B1F9g4BgUq5RsL7mH1WscgFFuVNSlhlVV5lgMpTpNq2/DMItV lxZIWfP0q/8DNxcf5uIoL65bj+jYcp/B11ZCba1iAAyrhH2l5bV9XvYsg7D9Jx4CnHNl Ab0A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=I28hsePz; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from agentk.vger.email (agentk.vger.email. [2620:137:e000::3:2]) by mx.google.com with ESMTPS id p20-20020a170902ead400b001d1d8f578ebsi11395929pld.647.2023.12.14.10.40.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 Dec 2023 10:40:27 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) client-ip=2620:137:e000::3:2; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=I28hsePz; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id 4041F80F8F4D; Thu, 14 Dec 2023 10:40:14 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1444209AbjLNSj7 (ORCPT + 99 others); Thu, 14 Dec 2023 13:39:59 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54436 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229753AbjLNSj6 (ORCPT ); Thu, 14 Dec 2023 13:39:58 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CDEA0124 for ; Thu, 14 Dec 2023 10:40:04 -0800 (PST) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4ABA7C433C8; Thu, 14 Dec 2023 18:40:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1702579204; bh=J4U6wb6lu/CHw150O1fiDTxZ3HL8M735WWSgKLN8raA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=I28hsePzUIMHYmJ8XbVLvoJrdUVS8RocUspbPYh6PhpbIoOpr+YsDl6z1iddDUejT bk9tMB4EimrncVOJqFgj3E1DgL3+gkKITvGse5MZMgZ38e5Xlv+E8mGLun/PGtiqeC 52I2JrjkiAa46CFBpLWrD7pG5zAh/0WRHYLUbMWHjWWuRixAuVwhtsytQwFu23CWu3 dg42Mp6c4WTYAUZeRuuwqAF14xYPf4VRIq6xEr7fgiScS7J4T0/R6cHOH1kpTBSnxe xTWH6iUnEljd/LSMKz7ejQqSc7Yf9NXUlgEj98nuYhOQm2O0C2mqeIvfjn+4R8w3A6 bNX6TVB0KDuRA== From: Arnd Bergmann To: Tomas Winkler , Arnd Bergmann , Greg Kroah-Hartman Cc: Wentong Wu , Alexander Usyskin , Alan Previn , Daniele Ceraolo Spurio , linux-kernel@vger.kernel.org Subject: [PATCH 2/2] mei: rework Kconfig dependencies Date: Thu, 14 Dec 2023 18:39:32 +0000 Message-Id: <20231214183946.109124-2-arnd@kernel.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20231214183946.109124-1-arnd@kernel.org> References: <20231214183946.109124-1-arnd@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (agentk.vger.email [0.0.0.0]); Thu, 14 Dec 2023 10:40:14 -0800 (PST) From: Arnd Bergmann The dependencies in the mei framework are inconsistent, with some symbols using 'select INTEL_MEI' to force it being enabled and others using 'depends on INTEL_MEI'. In general, one should not select user-visible symbols, so change all of these to normal dependencies, but change the default on INTEL_MEI to be enabled when building a kernel for an Intel CPU with ME or a generic x86 kernel. Having consistent dependencies makes the 'menuconfig' listing more readable by using proper indentation. A large if/endif block is just a simpler syntax than repeating the dependencies for each symbol. Signed-off-by: Arnd Bergmann --- This does not fix a bug, but seems like a sensible cleanup to me, making the logic less error-prone for future changes. Feel free to just take the first patch and ignore this one if I missed an important reason for the original variant, or if you prefer a different method. --- drivers/misc/mei/Kconfig | 14 ++++++-------- drivers/misc/mei/gsc_proxy/Kconfig | 2 +- drivers/misc/mei/hdcp/Kconfig | 2 +- drivers/misc/mei/pxp/Kconfig | 2 +- 4 files changed, 9 insertions(+), 11 deletions(-) diff --git a/drivers/misc/mei/Kconfig b/drivers/misc/mei/Kconfig index 1e28ca23a74a..67d9391f1855 100644 --- a/drivers/misc/mei/Kconfig +++ b/drivers/misc/mei/Kconfig @@ -3,6 +3,7 @@ config INTEL_MEI tristate "Intel Management Engine Interface" depends on X86 && PCI + default GENERIC_CPU || MCORE2 || MATOM || X86_GENERIC help The Intel Management Engine (Intel ME) provides Manageability, Security and Media services for system containing Intel chipsets. @@ -11,10 +12,11 @@ config INTEL_MEI For more information see +if INTEL_MEI + config INTEL_MEI_ME tristate "ME Enabled Intel Chipsets" - select INTEL_MEI - depends on X86 && PCI + default y help MEI support for ME Enabled Intel chipsets. @@ -38,8 +40,6 @@ config INTEL_MEI_ME config INTEL_MEI_TXE tristate "Intel Trusted Execution Environment with ME Interface" - select INTEL_MEI - depends on X86 && PCI help MEI Support for Trusted Execution Environment device on Intel SoCs @@ -48,9 +48,7 @@ config INTEL_MEI_TXE config INTEL_MEI_GSC tristate "Intel MEI GSC embedded device" - depends on INTEL_MEI depends on INTEL_MEI_ME - depends on X86 && PCI depends on DRM_I915 help Intel auxiliary driver for GSC devices embedded in Intel graphics devices. @@ -62,7 +60,6 @@ config INTEL_MEI_GSC config INTEL_MEI_VSC_HW tristate "Intel visual sensing controller device transport driver" - depends on INTEL_MEI depends on ACPI && SPI depends on GPIOLIB || COMPILE_TEST help @@ -75,7 +72,6 @@ config INTEL_MEI_VSC_HW config INTEL_MEI_VSC tristate "Intel visual sensing controller device with ME interface" depends on INTEL_MEI_VSC_HW - depends on INTEL_MEI help Intel MEI over SPI driver for Intel visual sensing controller (IVSC) device embedded in IA platform. It supports camera sharing @@ -88,3 +84,5 @@ config INTEL_MEI_VSC source "drivers/misc/mei/hdcp/Kconfig" source "drivers/misc/mei/pxp/Kconfig" source "drivers/misc/mei/gsc_proxy/Kconfig" + +endif diff --git a/drivers/misc/mei/gsc_proxy/Kconfig b/drivers/misc/mei/gsc_proxy/Kconfig index 5f68d9f3d691..ac78b9d1eccd 100644 --- a/drivers/misc/mei/gsc_proxy/Kconfig +++ b/drivers/misc/mei/gsc_proxy/Kconfig @@ -3,7 +3,7 @@ # config INTEL_MEI_GSC_PROXY tristate "Intel GSC Proxy services of ME Interface" - select INTEL_MEI_ME + depends on INTEL_MEI_ME depends on DRM_I915 help MEI Support for GSC Proxy Services on Intel platforms. diff --git a/drivers/misc/mei/hdcp/Kconfig b/drivers/misc/mei/hdcp/Kconfig index 54e1c9526909..9be312ec798d 100644 --- a/drivers/misc/mei/hdcp/Kconfig +++ b/drivers/misc/mei/hdcp/Kconfig @@ -3,7 +3,7 @@ # config INTEL_MEI_HDCP tristate "Intel HDCP2.2 services of ME Interface" - select INTEL_MEI_ME + depends on INTEL_MEI_ME depends on DRM_I915 help MEI Support for HDCP2.2 Services on Intel platforms. diff --git a/drivers/misc/mei/pxp/Kconfig b/drivers/misc/mei/pxp/Kconfig index 4029b96afc04..838eae556dd4 100644 --- a/drivers/misc/mei/pxp/Kconfig +++ b/drivers/misc/mei/pxp/Kconfig @@ -4,7 +4,7 @@ # config INTEL_MEI_PXP tristate "Intel PXP services of ME Interface" - select INTEL_MEI_ME + depends on INTEL_MEI_ME depends on DRM_I915 help MEI Support for PXP Services on Intel platforms. -- 2.39.2