Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp450624pxv; Thu, 22 Jul 2021 04:22:09 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyE2OjiKoyc2twvpmCY/lGcy3W943WaCJKUxQlWXSKIFnBrps+wcqTjecZxXgcNeaAyGTgH X-Received: by 2002:a17:906:a450:: with SMTP id cb16mr38540143ejb.296.1626952929498; Thu, 22 Jul 2021 04:22:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626952929; cv=none; d=google.com; s=arc-20160816; b=ppF825eRWsMMEqYHNbuHJ1HmdKZvR/EWu17bu9+doYJDKCCecegWBu7RmhYroaQCOP CPvK+i9VAhzOdl1rW41sR6L8qtmaG7VlPbwD8sZPZoBOHN25jMyH8L/K1hT0a9wYfPQ1 jjYMiAMQNTaqh+3dmvLj1QHYP571j6oPcDcxBg8QTo3THfSGVSpum4JE+vFRqvrgW7x2 0RLHmke6hgBYIOOKaYAozFOR+/vc9l1gmKYPgPUmm1ozSfAgOSO0OHWfaOE70FcNSDUc 5FV97Yd9vDDaLYz83BQaOimtDCQdsALAxlDRdFHRDxCTjWdwYcbez390pm1WIKSAO7EK aWew== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from; bh=0Nf0q4sMjibNhSwmB44CTC3WSvcJuoWl79WeGqr4t/I=; b=C+8EQ6A3yAIXtOG3UiUCkeK1Yif6ggpCl1dzSsANY7MJirRoqdLct5IqYoW5yCMFs9 9KHXSIY8NtIteGNgKxluYhY8mfVr692/1a/uEJvVQX431Btkhm9QrxvwGsYwfozFppI/ fWiXUT9Uq/mAajdrXYcc+NM8FwYlu9RMtvuzcYcH73eSSmx7pxKXr/7oji2+WpCQDOfr 5a3maak4soja5obgzmU07/df+lolA+ZypdBQlb/3G2tOBsH2/50HUNJ4OaKptOvaJlR7 tYQ0PyKNC8KK3PFBqR4v1ojtaHbOaY09Ud4dsw1RosGQLOHTo1mWZmb0qMtnn/PqgZW+ H80g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g13si29346293edp.307.2021.07.22.04.21.39; Thu, 22 Jul 2021 04:22:09 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231759AbhGVKiu (ORCPT + 99 others); Thu, 22 Jul 2021 06:38:50 -0400 Received: from mx20.baidu.com ([111.202.115.85]:46056 "EHLO baidu.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S231670AbhGVKin (ORCPT ); Thu, 22 Jul 2021 06:38:43 -0400 Received: from BC-Mail-Ex21.internal.baidu.com (unknown [172.31.51.15]) by Forcepoint Email with ESMTPS id 861D7199C51347E1C9AA; Thu, 22 Jul 2021 19:19:14 +0800 (CST) Received: from BJHW-MAIL-EX27.internal.baidu.com (10.127.64.42) by BC-Mail-Ex21.internal.baidu.com (172.31.51.15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2242.12; Thu, 22 Jul 2021 19:19:14 +0800 Received: from LAPTOP-UKSR4ENP.internal.baidu.com (172.31.63.8) by BJHW-MAIL-EX27.internal.baidu.com (10.127.64.42) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2308.14; Thu, 22 Jul 2021 19:19:13 +0800 From: Cai Huoqing To: , , , , , CC: , , Cai Huoqing Subject: [PATCH 2/2] PCI: vmd: Make use of PCI_DEVICE_DATA() helper function Date: Thu, 22 Jul 2021 19:19:03 +0800 Message-ID: <20210722111903.432-3-caihuoqing@baidu.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210722111903.432-1-caihuoqing@baidu.com> References: <20210722111903.432-1-caihuoqing@baidu.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [172.31.63.8] X-ClientProxiedBy: BC-Mail-Ex12.internal.baidu.com (172.31.51.52) To BJHW-MAIL-EX27.internal.baidu.com (10.127.64.42) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org We could make use of PCI_DEVICE_DATA() helper function Signed-off-by: Cai Huoqing --- drivers/pci/controller/vmd.c | 38 ++++++++++++++++++------------------ include/linux/pci_ids.h | 2 ++ 2 files changed, 21 insertions(+), 19 deletions(-) diff --git a/drivers/pci/controller/vmd.c b/drivers/pci/controller/vmd.c index e3fcdfec58b3..565681ed00a1 100644 --- a/drivers/pci/controller/vmd.c +++ b/drivers/pci/controller/vmd.c @@ -859,25 +859,25 @@ static int vmd_resume(struct device *dev) static SIMPLE_DEV_PM_OPS(vmd_dev_pm_ops, vmd_suspend, vmd_resume); static const struct pci_device_id vmd_ids[] = { - {PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_VMD_201D), - .driver_data = VMD_FEAT_HAS_MEMBAR_SHADOW_VSCAP,}, - {PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_VMD_28C0), - .driver_data = VMD_FEAT_HAS_MEMBAR_SHADOW | - VMD_FEAT_HAS_BUS_RESTRICTIONS | - VMD_FEAT_CAN_BYPASS_MSI_REMAP,}, - {PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x467f), - .driver_data = VMD_FEAT_HAS_MEMBAR_SHADOW_VSCAP | - VMD_FEAT_HAS_BUS_RESTRICTIONS | - VMD_FEAT_OFFSET_FIRST_VECTOR,}, - {PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x4c3d), - .driver_data = VMD_FEAT_HAS_MEMBAR_SHADOW_VSCAP | - VMD_FEAT_HAS_BUS_RESTRICTIONS | - VMD_FEAT_OFFSET_FIRST_VECTOR,}, - {PCI_DEVICE(PCI_VENDOR_ID_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,}, - {0,} + { PCI_DEVICE_DATA(INTEL, VMD_201D, + VMD_FEAT_HAS_MEMBAR_SHADOW_VSCAP) }, + { PCI_DEVICE_DATA(INTEL, VMD_28C0, + VMD_FEAT_HAS_MEMBAR_SHADOW | + VMD_FEAT_HAS_BUS_RESTRICTIONS | + VMD_FEAT_CAN_BYPASS_MSI_REMAP) }, + { PCI_DEVICE_DATA(INTEL, VMD_467F, + VMD_FEAT_HAS_MEMBAR_SHADOW_VSCAP | + VMD_FEAT_HAS_BUS_RESTRICTIONS | + VMD_FEAT_OFFSET_FIRST_VECTOR) }, + { PCI_DEVICE_DATA(INTEL, VMD_4C3D, + VMD_FEAT_HAS_MEMBAR_SHADOW_VSCAP | + VMD_FEAT_HAS_BUS_RESTRICTIONS | + VMD_FEAT_OFFSET_FIRST_VECTOR) }, + { PCI_DEVICE_DATA(INTEL, VMD_9A0B, + VMD_FEAT_HAS_MEMBAR_SHADOW_VSCAP | + VMD_FEAT_HAS_BUS_RESTRICTIONS | + VMD_FEAT_OFFSET_FIRST_VECTOR) }, + { }, }; MODULE_DEVICE_TABLE(pci, vmd_ids); diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h index 4bac1831de80..d25552b5ae3e 100644 --- a/include/linux/pci_ids.h +++ b/include/linux/pci_ids.h @@ -2954,6 +2954,8 @@ #define PCI_DEVICE_ID_INTEL_SBRIDGE_BR 0x3cf5 /* 13.6 */ #define PCI_DEVICE_ID_INTEL_SBRIDGE_SAD1 0x3cf6 /* 12.7 */ #define PCI_DEVICE_ID_INTEL_IOAT_SNB 0x402f +#define PCI_DEVICE_ID_INTEL_VMD_467F 0x467f +#define PCI_DEVICE_ID_INTEL_VMD_4C3D 0x4c3d #define PCI_DEVICE_ID_INTEL_5100_16 0x65f0 #define PCI_DEVICE_ID_INTEL_5100_19 0x65f3 #define PCI_DEVICE_ID_INTEL_5100_21 0x65f5 -- 2.25.1