summaryrefslogtreecommitdiff
path: root/rust/uapi/uapi_helper.h
diff options
context:
space:
mode:
authorDanilo Krummrich <dakr@redhat.com>2024-06-15 00:50:57 +0200
committerDanilo Krummrich <dakr@kernel.org>2024-08-13 15:54:19 +0200
commit9f4f8ef5245321d5d6e83201c3f13cd4b7f135d0 (patch)
treed68296030e663fc7434df4726abee93aebf9d507 /rust/uapi/uapi_helper.h
parent5fe45c3184ce8a9ae5b8f70e298aa56a60d80b36 (diff)
rust: pci: implement I/O mappable `pci::Bar`
Implement `pci::Bar`, `pci::Device::iomap_region` and `pci::Device::iomap_region_sized` to allow for I/O mappings of PCI BARs. To ensure that a `pci::Bar`, and hence the I/O memory mapping, can't out-live the PCI device, the `pci::Bar` type is always embedded into a `Devres` container, such that the `pci::Bar` is revoked once the device is unbound and hence the I/O mapped memory is unmapped. A `pci::Bar` can be requested with (`pci::Device::iomap_region_sized`) or without (`pci::Device::iomap_region`) a const generic representing the minimal requested size of the I/O mapped memory region. In case of the latter only runtime checked I/O reads / writes are possible. Co-developed-by: Philipp Stanner <pstanner@redhat.com> Signed-off-by: Philipp Stanner <pstanner@redhat.com> Signed-off-by: Danilo Krummrich <dakr@redhat.com>
Diffstat (limited to 'rust/uapi/uapi_helper.h')
0 files changed, 0 insertions, 0 deletions