I/O type generalization and projection
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest8 patches 27 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/8 | rust: io: generalize `MmioRaw` to pointer to arbitrary typerust/ rust/ rust/ +1 more | +74 | 2 replies | |
| 2/8 | rust: io: generalize `Mmio` to arbitrary typerust/ rust/ rust/ +4 more | +64 | 8 replies | |
| 3/8 | rust: io: use pointer types instead of addressrust/ rust/ rust/ +1 more | +111 | 6 replies | |
| 4/8 | rust: io: add view typerust/ | +146 | 2 replies | |
| 5/8 | rust: dma: add methods to unsafely create reference from subviewrust/ | +56 | 2 replies | |
| 6/8 | rust: io: add `read_val` and `write_val` function on I/O viewrust/ rust/ | +135 | 2 replies | |
| 7/8 | gpu: nova-core: use I/O projection for cleaner encapsulationdrivers/ drivers/ drivers/ | +96 | 0 replies | |
| 8/8 | rust: dma: drop `dma_read!` and `dma_write!` APIrust/ samples/ | +14 | 1 reply |
Reviews trailers per patch
4 of 8 patches have a Reviewed-by or Acked-by.
| Patch | Andreas Hindborg | Miguel Ojeda |
|---|---|---|
| 1/8 | ||
| 2/8 | A-b | |
| 3/8 | R-b | |
| 4/8 | R-b | |
| 5/8 | ||
| 6/8 | ||
| 7/8 | ||
| 8/8 | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH 0/8] I/O type generalization and projection
From: Gary Guo <[email protected]>
This series generalize Mmio/MmioRaw type from just an untyped region to typed representations (so MmioRaw<T> is __iomem *T). This allows us to remove the IoKnownSize trait; the information is sourced from just the pointer from the KnownSize trait instead.
This enables us to implement Io trait for Coherent<T>, enabling unified handling of MMIO and DMA coherent memory. It also paves the way to uniformly support shared system memory, which Tyr will likely need [1].
Built on this generalization, this series also add a io::View type which represents a subview of a bigger I/O region, and a io_project!() macro that provides a safe way to perform this. Some Nova code has been converted in this series to demonstrate cleanups possible with this addition.
This series depend on the Coherent API rework series [2].
Gary Guo (8):
rust: io: generalize MmioRaw to pointer to arbitrary type
rust: io: generalize Mmio to arbitrary type
rust: io: use pointer types instead of address
rust: io: add view type
rust: dma: add methods to unsafely create reference from subview
rust: io: add read_val and write_val function on I/O view
gpu: nova-core: use I/O projection for cleaner encapsulation
rust: dma: drop dma_read! and dma_write! API
drivers/gpu/nova-core/gsp.rs | 42 ++- drivers/gpu/nova-core/gsp/cmdq.rs | 69 +++-- drivers/gpu/nova-core/gsp/fw.rs | 84 ++--- rust/kernel/devres.rs | 11 +- rust/kernel/dma.rs | 217 ++++++------- rust/kernel/io.rs | 498 +++++++++++++++++++++++------- rust/kernel/io/mem.rs | 10 +- rust/kernel/io/poll.rs | 6 +- rust/kernel/io/register.rs | 19 +- rust/kernel/pci/io.rs | 88 ++++-- rust/kernel/ptr.rs | 7 + samples/rust/rust_dma.rs | 21 +- 12 files changed, 681 insertions(+), 391 deletions(-)
base-commit: 785f0eb2f85decbe7c1ef9ae922931f0194ffc2e
prerequisite-patch-id: 07a5643b01ce7f63ca42f1a322dcbdb5fc7fa9c2
prerequisite-patch-id: abae47bddac0d45e32dd54ce2f935b0675a6ebdf
prerequisite-patch-id: 7779e87914e4be91f0ced6760299ddf603943baf
prerequisite-patch-id: 31c43ae681611b92f24cbd369fac5af5834dd80f
prerequisite-patch-id: 60d56698d6bf30f31bed11375d5dc7eaeb359a0f
prerequisite-patch-id: 013e064c8c9dc0b7b0ff558ef0d9d6e674c629ee
prerequisite-patch-id: 5c5792a0435bdbdfd2aeb8a3d2dac79aa9ae7d6b
prerequisite-patch-id: 1e8d93ee75c56eecac13859c4024ea13f3cc872c
prerequisite-patch-id: b3a3589264ec10a5c33d4cea3ce69e9c6845d3dc
Signature · 1 line
2.51.2