cxl/pci: Remove Component Register base address from struct cxl_dev_state
authorRobert Richter <rrichter@amd.com>
Wed, 18 Oct 2023 17:17:01 +0000 (19:17 +0200)
committerDan Williams <dan.j.williams@intel.com>
Sat, 28 Oct 2023 03:13:37 +0000 (20:13 -0700)
The Component Register base address @component_reg_phys is no longer
used after the rework of the Component Register setup which now uses
struct member @reg_map instead. Remove the base address.

Signed-off-by: Terry Bowman <terry.bowman@amd.com>
Signed-off-by: Robert Richter <rrichter@amd.com>
Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Reviewed-by: Dave Jiang <dave.jiang@intel.com>
Link: https://lore.kernel.org/r/20231018171713.1883517-9-rrichter@amd.com
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
drivers/cxl/cxlmem.h
drivers/cxl/pci.c
tools/testing/cxl/test/mem.c

index 8fb8db47c3b7d86f121f0c0c7395604e43ae732d..cfd287466fa8d1dbcfb2154a47fef453d7b2964a 100644 (file)
@@ -405,7 +405,6 @@ enum cxl_devtype {
  * @dpa_res: Overall DPA resource tree for the device
  * @pmem_res: Active Persistent memory capacity configuration
  * @ram_res: Active Volatile memory capacity configuration
- * @component_reg_phys: register base of component registers
  * @serial: PCIe Device Serial Number
  * @type: Generic Memory Class device or Vendor Specific Memory device
  */
@@ -420,7 +419,6 @@ struct cxl_dev_state {
        struct resource dpa_res;
        struct resource pmem_res;
        struct resource ram_res;
-       resource_size_t component_reg_phys;
        u64 serial;
        enum cxl_devtype type;
 };
index a6ad9bcb96b4a5f8d7fcd3b9c06220e571a6c661..037792e941f2c8a992548c1b838023d91e8a3e9a 100644 (file)
@@ -834,7 +834,6 @@ static int cxl_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id)
         * If the component registers can't be found, the cxl_pci driver may
         * still be useful for management functions so don't return an error.
         */
-       cxlds->component_reg_phys = CXL_RESOURCE_NONE;
        rc = cxl_pci_setup_regs(pdev, CXL_REGLOC_RBI_COMPONENT,
                                &cxlds->reg_map);
        if (rc)
@@ -842,8 +841,6 @@ static int cxl_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id)
        else if (!cxlds->reg_map.component_map.ras.valid)
                dev_dbg(&pdev->dev, "RAS registers not found\n");
 
-       cxlds->component_reg_phys = cxlds->reg_map.resource;
-
        rc = cxl_map_component_regs(&cxlds->reg_map, &cxlds->regs.component,
                                    BIT(CXL_CM_CAP_CAP_ID_RAS));
        if (rc)
index 464fc39ed2776b5ea1f89d2e82b7d072fd21424c..92111cd7c4ffc888a9336074060ccde687265f55 100644 (file)
@@ -1421,10 +1421,8 @@ static int cxl_mock_mem_probe(struct platform_device *pdev)
 
        cxlds = &mds->cxlds;
        cxlds->serial = pdev->id;
-       if (is_rcd(pdev)) {
+       if (is_rcd(pdev))
                cxlds->rcd = true;
-               cxlds->component_reg_phys = CXL_RESOURCE_NONE;
-       }
 
        rc = cxl_enumerate_cmds(mds);
        if (rc)