Files
linux/rust/kernel
Danilo Krummrich bf9651f84b 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>
Tested-by: Dirk Behme <dirk.behme@de.bosch.com>
Link: https://lore.kernel.org/r/20241219170425.12036-11-dakr@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-12-20 17:19:26 +01:00
..
2024-12-20 17:19:26 +01:00
2023-05-31 17:35:03 +02:00
2024-09-30 13:02:29 +02:00
2024-11-05 05:33:46 +01:00
2024-12-20 17:19:26 +01:00
2024-11-10 23:58:00 +01:00
2024-11-10 23:58:00 +01:00
2024-12-20 17:19:26 +01:00
2024-10-08 15:44:36 +02:00
2024-12-20 17:19:26 +01:00
2024-10-08 14:32:39 +02:00
2024-11-10 23:58:00 +01:00
2024-12-20 17:19:26 +01:00
2024-11-26 17:54:58 -08:00
2024-11-10 23:58:00 +01:00
2024-11-04 16:21:44 -05:00
2024-12-20 17:19:26 +01:00
2024-11-10 23:58:00 +01:00