[PATCH v2 0/2] Add dma coherent allocator abstraction

From: Abdiel Janulgue
Date: Fri Nov 01 2024 - 07:35:44 EST


This series adds support for the dma coherent allocator. This is based
on code developed by Andreas Hindborg for the rnvme driver. We adapted
this for basic use in the Nova driver to access the GSP via DMA [0].

Changes since v1:
- Fix missing info in commit log where EOVERFLOW is used
- Restrict the dma coherent allocator to numeric types for now for valid
behaviour. [1]
- Build slice dynamically [1]


[0] https://gitlab.freedesktop.org/abj/nova-drm
[1] https://lore.kernel.org/all/6CF29D3D-C930-4274-9BAC-365C0F32DF56@xxxxxxxxxxxxx/


Abdiel Janulgue (2):
rust: error: Add EOVERFLOW
rust: add dma coherent allocator abstraction.

rust/kernel/dma.rs | 165 +++++++++++++++++++++++++++++++++++++++++++
rust/kernel/error.rs | 1 +
rust/kernel/lib.rs | 1 +
3 files changed, 167 insertions(+)
create mode 100644 rust/kernel/dma.rs


base-commit: 718c4069896cabba5c39b637cbb7205927f16ae0
--
2.43.0