Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp457004pxv; Thu, 22 Jul 2021 04:32:10 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzLhkREjc8H1hWnY5r1+OV6oepDEe4jij7CX2t131anvK093WfNfH0Op/zKgufT3qLmoBac X-Received: by 2002:a05:6e02:1c88:: with SMTP id w8mr27228749ill.154.1626953529982; Thu, 22 Jul 2021 04:32:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626953529; cv=none; d=google.com; s=arc-20160816; b=s9L2G9KkMc3Z4o9MKn8QeGWeuNDVkIsT90vp2h/b17lpzAQoCC8LJq0PRJKEhB5U4k +Ez7e0SukH4KTdPjsQa3uZsDqkj06J+xEneWeBeYY6vmv+9LFMohs2YMUBW/07Q1OQ5I YqTPZP1buT0GiFnyJHoEXBJoDev/ORE3/mP40LYYUOPXx6ozqP8suNa/80/GUjajNjhH xCRcuPiOOWIekrVy4f3rNGqNI73zeb6UzyYUZKOIs6yef/SDIxVKX/NTfz9EY+2UTiqy B5lJFcws+nF77DY3g3V31BvSNRv2ApdN7XmEjiIio9yEYxnVCMbB9eFoMFqGOub+RAWk 4mIw== 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=HhnbZZDqy/ybMnFMMsZI/emHaOoLW52gid4mrlJ9uoxVjjddKU8WvTZnK37m+O+2JX 1LLH7NgOglmh4ciFt/rZZ6hnEN/ThkbTtRFGxsmPHdJG23AdmUL0hRjNJfKMwRpj8flC JPMaAxNQwoZzJHmxL3tMz4r3E2Xw0b8g9pDqxfK+Pj+MJejIoJgyn6OGCvPNq26V+XQg XBaqX7Qih6pl34tgOsnnN1xQH0TdVUPcxImoNIEw2PfylG9TJVS9e0KYdaKnRgGg6YX1 gDMufbQCcIqvd6puhJWDYTFJhAoR79DVY2SxEeutMUzdU5ZZyk5/Wc8tnAqerIrFeY9R KTxg== 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 d1si21113720jak.77.2021.07.22.04.31.58; Thu, 22 Jul 2021 04:32: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 S231741AbhGVKts (ORCPT + 99 others); Thu, 22 Jul 2021 06:49:48 -0400 Received: from mx20.baidu.com ([111.202.115.85]:60168 "EHLO baidu.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S231580AbhGVKtr (ORCPT ); Thu, 22 Jul 2021 06:49:47 -0400 Received: from BC-Mail-Ex10.internal.baidu.com (unknown [172.31.51.50]) by Forcepoint Email with ESMTPS id EADE0EB63FB4F7DACF57; Thu, 22 Jul 2021 19:30:20 +0800 (CST) Received: from BJHW-MAIL-EX27.internal.baidu.com (10.127.64.42) by BC-Mail-Ex10.internal.baidu.com (172.31.51.50) 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:30:20 +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:30:20 +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:29:54 +0800 Message-ID: <20210722112954.477-3-caihuoqing@baidu.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210722112954.477-1-caihuoqing@baidu.com> References: <20210722112954.477-1-caihuoqing@baidu.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [172.31.63.8] X-ClientProxiedBy: BC-Mail-Ex30.internal.baidu.com (172.31.51.24) 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