Commit 14d2079a authored by David E. Box's avatar David E. Box Committed by Lorenzo Pieralisi

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: default avatarJon Derrick <jonathan.derrick@linux.dev>
Link: https://lore.kernel.org/r/20230120031522.2304439-4-david.e.box@linux.intel.comSigned-off-by: default avatarDavid E. Box <david.e.box@linux.intel.com>
Signed-off-by: default avatarLorenzo Pieralisi <lpieralisi@kernel.org>
Reviewed-by: default avatarKuppuswamy Sathyanarayanan <sathyanarayanan.kuppuswamy@linux.intel.com>
parent cca0dfec
...@@ -68,6 +68,10 @@ enum vmd_features { ...@@ -68,6 +68,10 @@ enum vmd_features {
VMD_FEAT_CAN_BYPASS_MSI_REMAP = (1 << 4), 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); static DEFINE_IDA(vmd_instance_ida);
/* /*
...@@ -1024,29 +1028,17 @@ static const struct pci_device_id vmd_ids[] = { ...@@ -1024,29 +1028,17 @@ static const struct pci_device_id vmd_ids[] = {
VMD_FEAT_HAS_BUS_RESTRICTIONS | VMD_FEAT_HAS_BUS_RESTRICTIONS |
VMD_FEAT_CAN_BYPASS_MSI_REMAP,}, VMD_FEAT_CAN_BYPASS_MSI_REMAP,},
{PCI_VDEVICE(INTEL, 0x467f), {PCI_VDEVICE(INTEL, 0x467f),
.driver_data = VMD_FEAT_HAS_MEMBAR_SHADOW_VSCAP | .driver_data = VMD_FEATS_CLIENT,},
VMD_FEAT_HAS_BUS_RESTRICTIONS |
VMD_FEAT_OFFSET_FIRST_VECTOR,},
{PCI_VDEVICE(INTEL, 0x4c3d), {PCI_VDEVICE(INTEL, 0x4c3d),
.driver_data = VMD_FEAT_HAS_MEMBAR_SHADOW_VSCAP | .driver_data = VMD_FEATS_CLIENT,},
VMD_FEAT_HAS_BUS_RESTRICTIONS |
VMD_FEAT_OFFSET_FIRST_VECTOR,},
{PCI_VDEVICE(INTEL, 0xa77f), {PCI_VDEVICE(INTEL, 0xa77f),
.driver_data = VMD_FEAT_HAS_MEMBAR_SHADOW_VSCAP | .driver_data = VMD_FEATS_CLIENT,},
VMD_FEAT_HAS_BUS_RESTRICTIONS |
VMD_FEAT_OFFSET_FIRST_VECTOR,},
{PCI_VDEVICE(INTEL, 0x7d0b), {PCI_VDEVICE(INTEL, 0x7d0b),
.driver_data = VMD_FEAT_HAS_MEMBAR_SHADOW_VSCAP | .driver_data = VMD_FEATS_CLIENT,},
VMD_FEAT_HAS_BUS_RESTRICTIONS |
VMD_FEAT_OFFSET_FIRST_VECTOR,},
{PCI_VDEVICE(INTEL, 0xad0b), {PCI_VDEVICE(INTEL, 0xad0b),
.driver_data = VMD_FEAT_HAS_MEMBAR_SHADOW_VSCAP | .driver_data = VMD_FEATS_CLIENT,},
VMD_FEAT_HAS_BUS_RESTRICTIONS |
VMD_FEAT_OFFSET_FIRST_VECTOR,},
{PCI_VDEVICE(INTEL, PCI_DEVICE_ID_INTEL_VMD_9A0B), {PCI_VDEVICE(INTEL, PCI_DEVICE_ID_INTEL_VMD_9A0B),
.driver_data = VMD_FEAT_HAS_MEMBAR_SHADOW_VSCAP | .driver_data = VMD_FEATS_CLIENT,},
VMD_FEAT_HAS_BUS_RESTRICTIONS |
VMD_FEAT_OFFSET_FIRST_VECTOR,},
{0,} {0,}
}; };
MODULE_DEVICE_TABLE(pci, vmd_ids); MODULE_DEVICE_TABLE(pci, vmd_ids);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment