]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit
cxl/pci: Reserve individual register block regions
authorIra Weiny <ira.weiny@intel.com>
Fri, 4 Jun 2021 00:53:16 +0000 (17:53 -0700)
committerDan Williams <dan.j.williams@intel.com>
Sun, 6 Jun 2021 00:38:45 +0000 (17:38 -0700)
commit9a016527dcb71e2ecadfeacf52122a79b428790c
treee5ac0fc2ca3323e9a6ae003ec91bbd530e2e3cbd
parent30af97296f48d84bc4a6abbaabb92c796a84ca57
cxl/pci: Reserve individual register block regions

Some hardware implementations mix component and device registers into
the same BAR and the driver stack is going to need independent mapping
implementations for those 2 cases.  Furthermore, it will be nice to have
finer grained mappings should user space want to map some register
blocks.

Now that individual register blocks are mapped; those blocks regions
should be reserved individually to fully separate the register blocks.

Release the 'global' memory reservation and create individual register
block region reservations through devm.

NOTE: pci_release_mem_regions() is still compatible with
pcim_enable_device() because it removes the automatic region release
when called.  So preserve the pcim_enable_device() so that the pcim
interface can be called if needed.

Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Ira Weiny <ira.weiny@intel.com>
Link: https://lore.kernel.org/r/20210604005316.4187340-1-ira.weiny@intel.com
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
drivers/cxl/core.c
drivers/cxl/pci.c