cxl/pci: Add @base to cxl_register_map
authorDan Williams <dan.j.williams@intel.com>
Fri, 15 Oct 2021 21:57:27 +0000 (14:57 -0700)
committerDan Williams <dan.j.williams@intel.com>
Fri, 29 Oct 2021 18:53:51 +0000 (11:53 -0700)
commita261e9a1576ab32966be907e73786282d52afb61
tree923f5efb64eae2082e037930175239579f109215
parent7dc7a64de2bb3daf613f4c2e809e49678c579148
cxl/pci: Add @base to cxl_register_map

In addition to carrying @barno, @block_offset, and @reg_type, add @base
to keep all map/unmap parameters in one object. The helpers
cxl_{map,unmap}_regblock() handle adjusting @base to the @block_offset
at map and unmap time.

Document that @base incorporates @block_offset so that downstream
consumers of a mapped cxl_register_map instance do not need perform any
fixups / can use @base directly.

Cc: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Reviewed-by: Ira Weiny <ira.weiny@intel.com>
Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Link: https://lore.kernel.org/r/163433497228.889435.11271988238496181536.stgit@dwillia2-desk3.amr.corp.intel.com
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
drivers/cxl/cxl.h
drivers/cxl/pci.c