cxl/pci: Rename CXL REGLOC ID
authorBen Widawsky <ben.widawsky@intel.com>
Fri, 18 Jun 2021 00:30:09 +0000 (17:30 -0700)
committerDan Williams <dan.j.williams@intel.com>
Fri, 18 Jun 2021 00:37:18 +0000 (17:37 -0700)
The current naming is confusing and wrong. The Register Locator is
identified by the DSVSEC identifier, not an offset.

Cc: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: Ben Widawsky <ben.widawsky@intel.com>
Link: https://lore.kernel.org/r/20210618003009.956929-1-ben.widawsky@intel.com
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
drivers/cxl/pci.c
drivers/cxl/pci.h

index f8408e5f0754daf8c83a9272824b4c8bee83341e..4cf351a3cf99233e408ee0d07782285a89373a7b 100644 (file)
@@ -1086,7 +1086,7 @@ static int cxl_mem_setup_regs(struct cxl_mem *cxlm)
        LIST_HEAD(register_maps);
        int ret = 0;
 
-       regloc = cxl_mem_dvsec(pdev, PCI_DVSEC_ID_CXL_REGLOC_OFFSET);
+       regloc = cxl_mem_dvsec(pdev, PCI_DVSEC_ID_CXL_REGLOC_DVSEC_ID);
        if (!regloc) {
                dev_err(dev, "register location dvsec not found\n");
                return -ENXIO;
index af3ec078cf6cbe7cf43173178abe84f826e1b095..dad7a831f65f4d10d7b985dbed253862fa750806 100644 (file)
@@ -13,7 +13,7 @@
 #define PCI_DVSEC_VENDOR_ID_CXL                0x1E98
 #define PCI_DVSEC_ID_CXL               0x0
 
-#define PCI_DVSEC_ID_CXL_REGLOC_OFFSET         0x8
+#define PCI_DVSEC_ID_CXL_REGLOC_DVSEC_ID       0x8
 #define PCI_DVSEC_ID_CXL_REGLOC_BLOCK1_OFFSET  0xC
 
 /* BAR Indicator Register (BIR) */