diff options
author | Danilo Krummrich <dakr@kernel.org> | 2024-10-15 17:14:39 +0200 |
---|---|---|
committer | Danilo Krummrich <dakr@kernel.org> | 2024-10-22 22:55:10 +0200 |
commit | d363355ef700a27cc71604ccdeb0891cb0272cc0 (patch) | |
tree | 9e194c93ce83a030267884c5f24038e24ba2fa82 /.clippy.toml | |
parent | 055b27567937f504bfde460fb8b3353b5fe0277c (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@kernel.org>
Diffstat (limited to '.clippy.toml')
0 files changed, 0 insertions, 0 deletions