Skip to content

Commit 962f1e7

Browse files
davejiangbjorn-helgaas
authored andcommitted
PCI/CXL: Move CXL Vendor ID to pci_ids.h
Move PCI_DVSEC_VENDOR_ID_CXL in CXL private code to PCI_VENDOR_ID_CXL in pci_ids.h in order to be utilized in PCI subsystem. While the CXL Vendor ID (0x1e98) is not listed in the PCI SIG "Member Companies" database at https://pcisig.com/membership/member-companies, the SIG has confirmed that it is reserved by CXL. Link: https://lore.kernel.org/r/[email protected] Suggested-by: Bjorn Helgaas <[email protected]> Link: https://lore.kernel.org/linux-cxl/20240402172323.GA1818777@bhelgaas/ Signed-off-by: Dave Jiang <[email protected]> [bhelgaas: update commit log] Signed-off-by: Bjorn Helgaas <[email protected]> Reviewed-by: Kuppuswamy Sathyanarayanan <[email protected]> Reviewed-by: Dan Williams <[email protected]>
1 parent 4cece76 commit 962f1e7

File tree

6 files changed

+8
-7
lines changed

6 files changed

+8
-7
lines changed

drivers/cxl/core/pci.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -525,7 +525,7 @@ static int cxl_cdat_get_length(struct device *dev,
525525
__le32 response[2];
526526
int rc;
527527

528-
rc = pci_doe(doe_mb, PCI_DVSEC_VENDOR_ID_CXL,
528+
rc = pci_doe(doe_mb, PCI_VENDOR_ID_CXL,
529529
CXL_DOE_PROTOCOL_TABLE_ACCESS,
530530
&request, sizeof(request),
531531
&response, sizeof(response));
@@ -555,7 +555,7 @@ static int cxl_cdat_read_table(struct device *dev,
555555
__le32 request = CDAT_DOE_REQ(entry_handle);
556556
int rc;
557557

558-
rc = pci_doe(doe_mb, PCI_DVSEC_VENDOR_ID_CXL,
558+
rc = pci_doe(doe_mb, PCI_VENDOR_ID_CXL,
559559
CXL_DOE_PROTOCOL_TABLE_ACCESS,
560560
&request, sizeof(request),
561561
rsp, sizeof(*rsp) + remaining);
@@ -640,7 +640,7 @@ void read_cdat_data(struct cxl_port *port)
640640
if (!pdev)
641641
return;
642642

643-
doe_mb = pci_find_doe_mailbox(pdev, PCI_DVSEC_VENDOR_ID_CXL,
643+
doe_mb = pci_find_doe_mailbox(pdev, PCI_VENDOR_ID_CXL,
644644
CXL_DOE_PROTOCOL_TABLE_ACCESS);
645645
if (!doe_mb) {
646646
dev_dbg(dev, "No CDAT mailbox\n");

drivers/cxl/core/regs.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -313,7 +313,7 @@ int cxl_find_regblock_instance(struct pci_dev *pdev, enum cxl_regloc_type type,
313313
.resource = CXL_RESOURCE_NONE,
314314
};
315315

316-
regloc = pci_find_dvsec_capability(pdev, PCI_DVSEC_VENDOR_ID_CXL,
316+
regloc = pci_find_dvsec_capability(pdev, PCI_VENDOR_ID_CXL,
317317
CXL_DVSEC_REG_LOCATOR);
318318
if (!regloc)
319319
return -ENXIO;

drivers/cxl/cxlpci.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
* "DVSEC" redundancies removed. When obvious, abbreviations may be used.
1414
*/
1515
#define PCI_DVSEC_HEADER1_LENGTH_MASK GENMASK(31, 20)
16-
#define PCI_DVSEC_VENDOR_ID_CXL 0x1E98
1716

1817
/* CXL 2.0 8.1.3: PCIe DVSEC for CXL Device */
1918
#define CXL_DVSEC_PCIE_DEVICE 0

drivers/cxl/pci.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -817,7 +817,7 @@ static int cxl_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id)
817817
cxlds->rcd = is_cxl_restricted(pdev);
818818
cxlds->serial = pci_get_dsn(pdev);
819819
cxlds->cxl_dvsec = pci_find_dvsec_capability(
820-
pdev, PCI_DVSEC_VENDOR_ID_CXL, CXL_DVSEC_PCIE_DEVICE);
820+
pdev, PCI_VENDOR_ID_CXL, CXL_DVSEC_PCIE_DEVICE);
821821
if (!cxlds->cxl_dvsec)
822822
dev_warn(&pdev->dev,
823823
"Device DVSEC not present, skip CXL.mem init\n");

drivers/perf/cxl_pmu.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -345,7 +345,7 @@ static ssize_t cxl_pmu_event_sysfs_show(struct device *dev,
345345

346346
/* For CXL spec defined events */
347347
#define CXL_PMU_EVENT_CXL_ATTR(_name, _gid, _msk) \
348-
CXL_PMU_EVENT_ATTR(_name, PCI_DVSEC_VENDOR_ID_CXL, _gid, _msk)
348+
CXL_PMU_EVENT_ATTR(_name, PCI_VENDOR_ID_CXL, _gid, _msk)
349349

350350
static struct attribute *cxl_pmu_event_attrs[] = {
351351
CXL_PMU_EVENT_CXL_ATTR(clock_ticks, CXL_PMU_GID_CLOCK_TICKS, BIT(0)),

include/linux/pci_ids.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2607,6 +2607,8 @@
26072607

26082608
#define PCI_VENDOR_ID_ALIBABA 0x1ded
26092609

2610+
#define PCI_VENDOR_ID_CXL 0x1e98
2611+
26102612
#define PCI_VENDOR_ID_TEHUTI 0x1fc9
26112613
#define PCI_DEVICE_ID_TEHUTI_3009 0x3009
26122614
#define PCI_DEVICE_ID_TEHUTI_3010 0x3010

0 commit comments

Comments
 (0)