From patchwork Thu Nov 3 02:18:21 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "David E. Box" X-Patchwork-Id: 14597 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp273078wru; Wed, 2 Nov 2022 19:33:25 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5QCkonwgO7UB6YFXEkHDWMiljqKPfkNffVxVFJw0+5J6plMxs3w8RMOJvjDmZpJw77mw+q X-Received: by 2002:a17:907:7f8e:b0:7aa:7598:126d with SMTP id qk14-20020a1709077f8e00b007aa7598126dmr27237822ejc.289.1667442805413; Wed, 02 Nov 2022 19:33:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667442805; cv=none; d=google.com; s=arc-20160816; b=CzfCKSM8uiYoq6jpUwxe/yYsPudNUX020q3KLvLv+5ux7vMRH0IOPWltQ4XPWsbmzF dfX3M2IDLWxX5a7H37R2YAyq44vQ19SEipsJ/lUq7j82Wc7H7Z79Rfxnj3I1OEurR3bD 60F8MuQ9WMfDs6lpbhaE9PIt2bOs0qNQrUmxx0bdb7daa0pLKTncU7q9razig5SUNJQL bOVZvYmvBf0Jd1ipR8nE4c1qyhR1OJOOHgPaJSAkNbdU2WIP+5O2JICUaYclVpec0aes UksHkhuakG/uI9f6OSPq8MdJWK2Amt6QdIs5i8Jj6VIyMWCubplvIMfG3DQ1bPmZ0A0Y PKxg== 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=RdL9XLk/giWuN9D+GmwdN4zA/m2EjP5E0JqXtOcrc1s=; b=y4/mPXsLM53jawXeYL3KMXrSgU2t4KASANf5gY2c9x3WucwyHHzNhkhQ7VGdU8Z6mG KZYjqtA+8PzaUeUsrTCW452W+K/bSnLbjBa9p2mR/t85h5WJK8Pzh1s+oy4lerOZqI3a M5VFiuq8cINdl3u805K8ERjvQAeuJDBcK1rBJRImHBKXeTCG42COm70zm8GnThU+hxRm pouXG8Zkn4XJbdzoQuBB4A+MnpyS6xc3HNe7I8wc6zoLtvSFLk1yAh9Q9OEwMTxAC4Os LdYQJZAK54Xa7otGg0NW6yW43xDdJ0HFRqiFNDfcUM/q6GzHh0mcXUgEl/jXhiZ5YfgP RYxA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b="V33lj/7y"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id dr18-20020a170907721200b007ad8bd5b636si19123366ejc.377.2022.11.02.19.33.02; Wed, 02 Nov 2022 19:33:25 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b="V33lj/7y"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230500AbiKCCSm (ORCPT + 99 others); Wed, 2 Nov 2022 22:18:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56160 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230266AbiKCCS1 (ORCPT ); Wed, 2 Nov 2022 22:18:27 -0400 Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 555FCE81; Wed, 2 Nov 2022 19:18:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1667441905; x=1698977905; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=HPzcsAi/d9ZZUHE0bfR05SfFvSoDaIB+WYmjKiFqpy4=; b=V33lj/7ygFrkVPShV+DmuCKKknUkX0Q7z9HbHDxn3ShOrOfFS2Rx4nM3 xjl0IwcP/rEPGdhppTqNFW5NIerdyqTnmdg7YyQGxPyRTucNImawYYZRW w/yiahAjImxpdSl7IS2lptgcDAGf47ICAq5JErYk1rvNLF39QLspv62DR CC1HN6W1abC4BX/aRlEjSpdFE1vBYY6p1K5XihseccLQ3scRbxNXZHfce ultbE/3pOXffkDVu0W9FauUZg7J2fpEAkxtc27cyKbQ9k99h8Bfhg/3cM +CYz+uMa0lzXX/m6KXst/qVnsCsoPJb2lYrXIcHu+Q46hgUJKrph3wKRX g==; X-IronPort-AV: E=McAfee;i="6500,9779,10519"; a="292886416" X-IronPort-AV: E=Sophos;i="5.95,235,1661842800"; d="scan'208";a="292886416" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Nov 2022 19:18:23 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10519"; a="629175111" X-IronPort-AV: E=Sophos;i="5.95,235,1661842800"; d="scan'208";a="629175111" Received: from linux.intel.com ([10.54.29.200]) by orsmga007.jf.intel.com with ESMTP; 02 Nov 2022 19:18:23 -0700 Received: from debox1-desk4.intel.com (unknown [10.212.195.54]) by linux.intel.com (Postfix) with ESMTP id 56E3E580B9E; Wed, 2 Nov 2022 19:18:23 -0700 (PDT) From: "David E. Box" To: nirmal.patel@linux.intel.com, jonathan.derrick@linux.dev, lorenzo.pieralisi@arm.com, hch@infradead.org, kw@linux.com, robh@kernel.org, bhelgaas@google.com, david.e.box@linux.intel.com, michael.a.bottini@intel.com, rafael@kernel.org, me@adhityamohan.in Cc: linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH V8 3/4] PCI: vmd: Create feature grouping for client products Date: Wed, 2 Nov 2022 19:18:21 -0700 Message-Id: <20221103021822.308586-4-david.e.box@linux.intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221103021822.308586-1-david.e.box@linux.intel.com> References: <20221103021822.308586-1-david.e.box@linux.intel.com> MIME-Version: 1.0 X-Spam-Status: No, score=-3.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,SPF_HELO_NONE,SPF_NONE, UPPERCASE_50_75 autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1748440507280422069?= X-GMAIL-MSGID: =?utf-8?q?1748440507280422069?= Simplify the device ID list by creating a grouping of features shared by client products. Suggested-by: Jon Derrick Signed-off-by: David E. Box --- V8 - New patch. drivers/pci/controller/vmd.c | 28 ++++++++++------------------ 1 file changed, 10 insertions(+), 18 deletions(-) diff --git a/drivers/pci/controller/vmd.c b/drivers/pci/controller/vmd.c index 9dedca714c18..86f3085db014 100644 --- a/drivers/pci/controller/vmd.c +++ b/drivers/pci/controller/vmd.c @@ -68,6 +68,10 @@ enum vmd_features { VMD_FEAT_CAN_BYPASS_MSI_REMAP = (1 << 4), }; +#define VMD_FEATS_CLIENT (VMD_FEAT_HAS_MEMBAR_SHADOW_VSCAP | \ + VMD_FEAT_HAS_BUS_RESTRICTIONS | \ + VMD_FEAT_OFFSET_FIRST_VECTOR) + static DEFINE_IDA(vmd_instance_ida); /* @@ -1001,29 +1005,17 @@ static const struct pci_device_id vmd_ids[] = { VMD_FEAT_HAS_BUS_RESTRICTIONS | VMD_FEAT_CAN_BYPASS_MSI_REMAP,}, {PCI_VDEVICE(INTEL, 0x467f), - .driver_data = VMD_FEAT_HAS_MEMBAR_SHADOW_VSCAP | - VMD_FEAT_HAS_BUS_RESTRICTIONS | - VMD_FEAT_OFFSET_FIRST_VECTOR,}, + .driver_data = VMD_FEATS_CLIENT,}, {PCI_VDEVICE(INTEL, 0x4c3d), - .driver_data = VMD_FEAT_HAS_MEMBAR_SHADOW_VSCAP | - VMD_FEAT_HAS_BUS_RESTRICTIONS | - VMD_FEAT_OFFSET_FIRST_VECTOR,}, + .driver_data = VMD_FEATS_CLIENT,}, {PCI_VDEVICE(INTEL, 0xa77f), - .driver_data = VMD_FEAT_HAS_MEMBAR_SHADOW_VSCAP | - VMD_FEAT_HAS_BUS_RESTRICTIONS | - VMD_FEAT_OFFSET_FIRST_VECTOR,}, + .driver_data = VMD_FEATS_CLIENT,}, {PCI_VDEVICE(INTEL, 0x7d0b), - .driver_data = VMD_FEAT_HAS_MEMBAR_SHADOW_VSCAP | - VMD_FEAT_HAS_BUS_RESTRICTIONS | - VMD_FEAT_OFFSET_FIRST_VECTOR,}, + .driver_data = VMD_FEATS_CLIENT,}, {PCI_VDEVICE(INTEL, 0xad0b), - .driver_data = VMD_FEAT_HAS_MEMBAR_SHADOW_VSCAP | - VMD_FEAT_HAS_BUS_RESTRICTIONS | - VMD_FEAT_OFFSET_FIRST_VECTOR,}, + .driver_data = VMD_FEATS_CLIENT,}, {PCI_VDEVICE(INTEL, PCI_DEVICE_ID_INTEL_VMD_9A0B), - .driver_data = VMD_FEAT_HAS_MEMBAR_SHADOW_VSCAP | - VMD_FEAT_HAS_BUS_RESTRICTIONS | - VMD_FEAT_OFFSET_FIRST_VECTOR,}, + .driver_data = VMD_FEATS_CLIENT,}, {0,} }; MODULE_DEVICE_TABLE(pci, vmd_ids);