Skip to content

Commit f611d98

Browse files
Robert Richterdjbw
authored andcommitted
cxl/pci: Remove Component Register base address from struct cxl_dev_state
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>
1 parent 8ce520f commit f611d98

File tree

3 files changed

+1
-8
lines changed

3 files changed

+1
-8
lines changed

drivers/cxl/cxlmem.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -405,7 +405,6 @@ enum cxl_devtype {
405405
* @dpa_res: Overall DPA resource tree for the device
406406
* @pmem_res: Active Persistent memory capacity configuration
407407
* @ram_res: Active Volatile memory capacity configuration
408-
* @component_reg_phys: register base of component registers
409408
* @serial: PCIe Device Serial Number
410409
* @type: Generic Memory Class device or Vendor Specific Memory device
411410
*/
@@ -420,7 +419,6 @@ struct cxl_dev_state {
420419
struct resource dpa_res;
421420
struct resource pmem_res;
422421
struct resource ram_res;
423-
resource_size_t component_reg_phys;
424422
u64 serial;
425423
enum cxl_devtype type;
426424
};

drivers/cxl/pci.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -834,16 +834,13 @@ static int cxl_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id)
834834
* If the component registers can't be found, the cxl_pci driver may
835835
* still be useful for management functions so don't return an error.
836836
*/
837-
cxlds->component_reg_phys = CXL_RESOURCE_NONE;
838837
rc = cxl_pci_setup_regs(pdev, CXL_REGLOC_RBI_COMPONENT,
839838
&cxlds->reg_map);
840839
if (rc)
841840
dev_warn(&pdev->dev, "No component registers (%d)\n", rc);
842841
else if (!cxlds->reg_map.component_map.ras.valid)
843842
dev_dbg(&pdev->dev, "RAS registers not found\n");
844843

845-
cxlds->component_reg_phys = cxlds->reg_map.resource;
846-
847844
rc = cxl_map_component_regs(&cxlds->reg_map, &cxlds->regs.component,
848845
BIT(CXL_CM_CAP_CAP_ID_RAS));
849846
if (rc)

tools/testing/cxl/test/mem.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1421,10 +1421,8 @@ static int cxl_mock_mem_probe(struct platform_device *pdev)
14211421

14221422
cxlds = &mds->cxlds;
14231423
cxlds->serial = pdev->id;
1424-
if (is_rcd(pdev)) {
1424+
if (is_rcd(pdev))
14251425
cxlds->rcd = true;
1426-
cxlds->component_reg_phys = CXL_RESOURCE_NONE;
1427-
}
14281426

14291427
rc = cxl_enumerate_cmds(mds);
14301428
if (rc)

0 commit comments

Comments
 (0)