Skip to content

RFC Rust device / driver abstractions

Danilo Krummrich rust-for-linux 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest8 patches 44 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/8arch: x86: tools: increase symbol name sizearch/x86/tools/insn_decoder_test.c+1 -13 replies
2/8rust: device: Add a minimal RawDevice traitrust/bindings/bindings_helper.h rust/kernel/device.rs rust/kernel/lib.rs+25 -05 replies
3/8rust: device: Add a stub abstraction for devicesrust/helpers.c rust/kernel/device.rs+88 -113 replies
4/8rust: add driver abstractionrust/kernel/driver.rs rust/kernel/lib.rs rust/macros/module.rs +2 more+499 -410 replies
5/8rust: add rcu abstractionrust/helpers.c rust/kernel/sync.rs rust/kernel/sync/rcu.rs+68 -00 replies
6/8rust: add revocable mutexrust/kernel/sync.rs rust/kernel/sync/revocable.rs+100 -04 replies
7/8rust: add revocable objectsrust/kernel/lib.rs rust/kernel/revocable.rs+439 -05 replies
8/8rust: add device::Datarust/kernel/device.rs+119 -14 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/8] [RFC] Rust device / driver abstractions

Hi,

This patch series provides some initial Rust abstractions around the device / driver model, including an abstraction for device private data.

This patch series is sent in the context of [1] and is also available at [2].

- Danilo

[1] https://lore.kernel.org/dri-devel/Zfsj0_tb-0-tNrJy@cassiopeiae/T/#u
[2] https://github.com/Rust-for-Linux/linux/tree/staging/rust-device

Danilo Krummrich (1):
arch: x86: tools: increase symbol name size

Wedson Almeida Filho (7):
rust: device: Add a minimal RawDevice trait
rust: device: Add a stub abstraction for devices
rust: add driver abstraction
rust: add rcu abstraction
rust: add revocable mutex
rust: add revocable objects
rust: add device::Data

 arch/x86/tools/insn_decoder_test.c |   2 +-
 rust/bindings/bindings_helper.h    |   1 +
 rust/helpers.c                     |  28 ++
 rust/kernel/device.rs              | 215 +++++++++++++
 rust/kernel/driver.rs              | 493 +++++++++++++++++++++++++++++
 rust/kernel/lib.rs                 |   6 +-
 rust/kernel/revocable.rs           | 438 +++++++++++++++++++++++++
 rust/kernel/sync.rs                |   3 +
 rust/kernel/sync/rcu.rs            |  52 +++
 rust/kernel/sync/revocable.rs      |  98 ++++++
 rust/macros/module.rs              |   2 +-
 samples/rust/rust_minimal.rs       |   2 +-
 samples/rust/rust_print.rs         |   2 +-
 13 files changed, 1337 insertions(+), 5 deletions(-)
 create mode 100644 rust/kernel/device.rs
 create mode 100644 rust/kernel/driver.rs
 create mode 100644 rust/kernel/revocable.rs
 create mode 100644 rust/kernel/sync/rcu.rs
 create mode 100644 rust/kernel/sync/revocable.rs

base-commit: e8f897f4afef0031fe618a8e94127a0934896aba

Signature · 1 line
2.44.0