diff options
author | Dan Williams <dan.j.williams@intel.com> | 2022-11-29 18:48:30 +0100 |
---|---|---|
committer | Dan Williams <dan.j.williams@intel.com> | 2022-12-03 22:40:16 +0100 |
commit | 6c7f4f1e51c2a2474e6d4024d2ed32f8965be4a4 (patch) | |
tree | fab8dbde2a002ca811c969744cc7141beb54e104 /drivers/cxl/cxlpci.h | |
parent | cxl/pci: Kill cxl_map_regs() (diff) | |
download | linux-6c7f4f1e51c2a2474e6d4024d2ed32f8965be4a4.tar.xz linux-6c7f4f1e51c2a2474e6d4024d2ed32f8965be4a4.zip |
cxl/core/regs: Make cxl_map_{component, device}_regs() device generic
There is no need to carry the barno and the block offset through the
stack, just convert them to a resource base immediately.
Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Dave Jiang <dave.jiang@intel.com>
Link: https://lore.kernel.org/r/166974411035.1608150.8605988708101648442.stgit@djiang5-desk3.ch.intel.com
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to 'drivers/cxl/cxlpci.h')
-rw-r--r-- | drivers/cxl/cxlpci.h | 9 |
1 files changed, 0 insertions, 9 deletions
diff --git a/drivers/cxl/cxlpci.h b/drivers/cxl/cxlpci.h index eec597dbe763..920909791bb9 100644 --- a/drivers/cxl/cxlpci.h +++ b/drivers/cxl/cxlpci.h @@ -62,15 +62,6 @@ enum cxl_regloc_type { CXL_REGLOC_RBI_TYPES }; -static inline resource_size_t cxl_regmap_to_base(struct pci_dev *pdev, - struct cxl_register_map *map) -{ - if (map->block_offset == U64_MAX) - return CXL_RESOURCE_NONE; - - return pci_resource_start(pdev, map->barno) + map->block_offset; -} - int devm_cxl_port_enumerate_dports(struct cxl_port *port); struct cxl_dev_state; int cxl_hdm_decode_init(struct cxl_dev_state *cxlds, struct cxl_hdm *cxlhdm); |