Skip to content

Commit 14d2079

Browse files
debox1Lorenzo Pieralisi
authored andcommitted
PCI: vmd: Create feature grouping for client products
Simplify the device ID list by creating a grouping of features shared by client products. Suggested-by: Jon Derrick <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: David E. Box <[email protected]> Signed-off-by: Lorenzo Pieralisi <[email protected]> Reviewed-by: Kuppuswamy Sathyanarayanan <[email protected]>
1 parent cca0dfe commit 14d2079

File tree

1 file changed

+10
-18
lines changed
  • drivers/pci/controller

1 file changed

+10
-18
lines changed

drivers/pci/controller/vmd.c

Lines changed: 10 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,10 @@ enum vmd_features {
6868
VMD_FEAT_CAN_BYPASS_MSI_REMAP = (1 << 4),
6969
};
7070

71+
#define VMD_FEATS_CLIENT (VMD_FEAT_HAS_MEMBAR_SHADOW_VSCAP | \
72+
VMD_FEAT_HAS_BUS_RESTRICTIONS | \
73+
VMD_FEAT_OFFSET_FIRST_VECTOR)
74+
7175
static DEFINE_IDA(vmd_instance_ida);
7276

7377
/*
@@ -1024,29 +1028,17 @@ static const struct pci_device_id vmd_ids[] = {
10241028
VMD_FEAT_HAS_BUS_RESTRICTIONS |
10251029
VMD_FEAT_CAN_BYPASS_MSI_REMAP,},
10261030
{PCI_VDEVICE(INTEL, 0x467f),
1027-
.driver_data = VMD_FEAT_HAS_MEMBAR_SHADOW_VSCAP |
1028-
VMD_FEAT_HAS_BUS_RESTRICTIONS |
1029-
VMD_FEAT_OFFSET_FIRST_VECTOR,},
1031+
.driver_data = VMD_FEATS_CLIENT,},
10301032
{PCI_VDEVICE(INTEL, 0x4c3d),
1031-
.driver_data = VMD_FEAT_HAS_MEMBAR_SHADOW_VSCAP |
1032-
VMD_FEAT_HAS_BUS_RESTRICTIONS |
1033-
VMD_FEAT_OFFSET_FIRST_VECTOR,},
1033+
.driver_data = VMD_FEATS_CLIENT,},
10341034
{PCI_VDEVICE(INTEL, 0xa77f),
1035-
.driver_data = VMD_FEAT_HAS_MEMBAR_SHADOW_VSCAP |
1036-
VMD_FEAT_HAS_BUS_RESTRICTIONS |
1037-
VMD_FEAT_OFFSET_FIRST_VECTOR,},
1035+
.driver_data = VMD_FEATS_CLIENT,},
10381036
{PCI_VDEVICE(INTEL, 0x7d0b),
1039-
.driver_data = VMD_FEAT_HAS_MEMBAR_SHADOW_VSCAP |
1040-
VMD_FEAT_HAS_BUS_RESTRICTIONS |
1041-
VMD_FEAT_OFFSET_FIRST_VECTOR,},
1037+
.driver_data = VMD_FEATS_CLIENT,},
10421038
{PCI_VDEVICE(INTEL, 0xad0b),
1043-
.driver_data = VMD_FEAT_HAS_MEMBAR_SHADOW_VSCAP |
1044-
VMD_FEAT_HAS_BUS_RESTRICTIONS |
1045-
VMD_FEAT_OFFSET_FIRST_VECTOR,},
1039+
.driver_data = VMD_FEATS_CLIENT,},
10461040
{PCI_VDEVICE(INTEL, PCI_DEVICE_ID_INTEL_VMD_9A0B),
1047-
.driver_data = VMD_FEAT_HAS_MEMBAR_SHADOW_VSCAP |
1048-
VMD_FEAT_HAS_BUS_RESTRICTIONS |
1049-
VMD_FEAT_OFFSET_FIRST_VECTOR,},
1041+
.driver_data = VMD_FEATS_CLIENT,},
10501042
{0,}
10511043
};
10521044
MODULE_DEVICE_TABLE(pci, vmd_ids);

0 commit comments

Comments
 (0)