linux-stable/drivers/cxl
Ira Weiny f8a7e8c29b cxl/pci: Reserve all device regions at once
In order to remap individual register sets each bar region must be
reserved prior to mapping.  Because the details of individual register
sets are contained within the BARs themselves, the bar must be mapped 2
times, once to extract this information and a second time for each
register set.

Rather than attempt to reserve each BAR individually and track if that
bar has been reserved.  Open code pcim_iomap_regions() by first
reserving all memory regions on the device and then mapping the bars
individually as needed.

NOTE pci_request_mem_regions() does not need a corresponding
pci_release_mem_regions() because the pci device is managed via
pcim_enable_device().

Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Ira Weiny <ira.weiny@intel.com>
Link: https://lore.kernel.org/r/20210528004922.3980613-3-ira.weiny@intel.com
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
2021-06-05 17:37:05 -07:00
..
core.c cxl/mem: Demarcate vendor specific capability IDs 2021-05-26 11:20:17 -07:00
cxl.h cxl/core: Refactor CXL register lookup for bridge reuse 2021-05-14 16:13:19 -07:00
Kconfig cxl: Rename mem to pci 2021-05-26 11:19:05 -07:00
Makefile cxl: Rename mem to pci 2021-05-26 11:19:05 -07:00
mem.h cxl/mem: Get rid of @cxlm.base 2021-05-26 11:20:18 -07:00
pci.c cxl/pci: Reserve all device regions at once 2021-06-05 17:37:05 -07:00
pci.h