From patchwork Thu Dec 8 02:39:41 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: 31119 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp525375wrr; Wed, 7 Dec 2022 18:44:41 -0800 (PST) X-Google-Smtp-Source: AA0mqf4rDuPNbqo7KITwBcPyVZPxN3UvuvcNEnJ2VzbXsKauqsSg0tvGM/YjD6xDpCwHTcX50+/l X-Received: by 2002:a63:f00e:0:b0:477:5e25:6d4c with SMTP id k14-20020a63f00e000000b004775e256d4cmr68934831pgh.159.1670467481699; Wed, 07 Dec 2022 18:44:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670467481; cv=none; d=google.com; s=arc-20160816; b=AGSk0eGwSepJ0649kkZPv6kBlZnRImzzOMZO34YG4Gpgu3H/HjgG/YhkzAeGS8oBQQ 1wFL2JFgvFkB3qEIL4lyA92131jUm7u1e+9dkg44+IuRJAyZhpzwVFyZqNv+rtyuzW0Y G/kowwKurEV9KFM2jHr6hsdmsJG2HouCQslFq92RtcfM9MywpmOIxphoOdQyQnv0YFkE Xc9NbPyu+QPtLLirR+dHm2EJMiFhoKGRG8guYr/iRUjRkOWBfRZs7WeX5cNyjGcKFi8E c6NW7hW23Pq1rT8Jw4orGonRs7FFl7HpElD8Fm0X1zLL6IPSmWpepDUDv2XF9BZyPKAB UWzg== 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=FxSPN8UWO/jpVj1WJnYHLRHPXShkFoaXfsCvY8wfbS8=; b=XHbpbYcK72+PkYBWT1Oc4qy/Zt/lHNUQ73uaEYezKphP4MSNNdNmieGMMTJPjBCY2b ERJ4hVG98UMb12H0zurkjqGHRgJeg3GHeb+Ba7+4fU7sVD/MfhJp/mDnk/u3w2+B4gmB 4XBocY2ZLurM3SCrxqeZ4AnyOpO4nDGuLGcHdsrnsgo47uJ4wFT73aHIDeomXZG7VUnC N304NxL363Zo7xbQZOrOnR/SzKKaqOfkiz34efY1ATWAAqOXbdC3DzrLVOae56yy/Ix+ GRoGaLpQ3bpleGx8cInu2XXhk5KK1r5yyPQ1J/CHVDerGURedC8h1f7Mz7+l0hXBt7VL oakw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=MNAsyCj2; 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 n7-20020a170903110700b00186abd0c784si25018825plh.217.2022.12.07.18.44.27; Wed, 07 Dec 2022 18:44:41 -0800 (PST) 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=MNAsyCj2; 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 S229776AbiLHCkG (ORCPT + 99 others); Wed, 7 Dec 2022 21:40:06 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:32776 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229720AbiLHCj4 (ORCPT ); Wed, 7 Dec 2022 21:39:56 -0500 Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 236DFD2DA; Wed, 7 Dec 2022 18:39:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1670467189; x=1702003189; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=bjcGVmqllVeyslGIKKpHUTw9LnYHWSQOP+KUedZWZ4Y=; b=MNAsyCj2/S//p53MMtS3Nyk3yTq6CtPJXtd/vs6iGBwPcPPXi9U0tjlg 1LsU0ot5xtrFbZx+Ua5ZBTcr5Za9pnUImNlvPw5ghxJzch6t5trNg5cai y6O24Nwd1zdnuSQGPt1vGSqFy9KU7kQ+FTDoVZgGUPIYMcFEylTv/jDqO Gs1K2uspv6zXE//vyrGuwFYq5/giNLI5KQTRRYn4SWw/uysfnEz6wiewD TWZkaTcJJ6DXU2mOaDc/6L0sC19ii0Tbbyb9VNauPLl0SI/o2K9ncMOhd tc9rNNzzin5p7HZPk0Q/pCFt9ete/S72Tt5d+G8aBxuExWbN94YD/q5yW Q==; X-IronPort-AV: E=McAfee;i="6500,9779,10554"; a="315774134" X-IronPort-AV: E=Sophos;i="5.96,226,1665471600"; d="scan'208";a="315774134" Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Dec 2022 18:39:47 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10554"; a="648966395" X-IronPort-AV: E=Sophos;i="5.96,226,1665471600"; d="scan'208";a="648966395" Received: from linux.intel.com ([10.54.29.200]) by fmsmga007.fm.intel.com with ESMTP; 07 Dec 2022 18:39:43 -0800 Received: from debox1-desk4.intel.com (unknown [10.212.164.201]) by linux.intel.com (Postfix) with ESMTP id 71938580C4C; Wed, 7 Dec 2022 18:39:43 -0800 (PST) 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, michael.a.bottini@intel.com, rafael@kernel.org, sathyanarayanan.kuppuswamy@linux.intel.com, me@adhityamohan.in Cc: linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH V9 3/4] PCI: vmd: Create feature grouping for client products Date: Wed, 7 Dec 2022 18:39:41 -0800 Message-Id: <20221208023942.491721-4-david.e.box@linux.intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221208023942.491721-1-david.e.box@linux.intel.com> References: <20221208023942.491721-1-david.e.box@linux.intel.com> MIME-Version: 1.0 X-Spam-Status: No, score=-4.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,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?1751612110127850815?= X-GMAIL-MSGID: =?utf-8?q?1751612110127850815?= 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 --- V9 - No change. 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);