Skip to content

Rust abstractions for Device & Firmware

Danilo Krummrich lkml rust-for-linux 5 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 posting 2/210 patches 37 repliesIn review
  2. v4 Latest2 patches 10 repliesIn review
  3. v32 patches 10 repliesSuperseded
Earlier versions · 2
VersionPostedPatchesRepliesStatus
v2 posting 1/22 patches19 repliesSuperseded
v1 RFC11 patches39 repliesSuperseded

Changes in v4 from the cover letter

=============
- add invariant of unmodified backing buffer to Firmware (Boqun)

Patches in v4 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2rust: add abstraction for struct devicerust/helpers.c rust/kernel/device.rs rust/kernel/lib.rs+104 -02 replies
2/2rust: add firmware abstractionsdrivers/base/firmware_loader/Kconfig rust/bindings/bindings_helper.h rust/kernel/firmware.rs +1 more+111 -08 replies

Reviews trailers per patch

All 2 patches have a Reviewed-by or Acked-by.

PatchBoqun FengGary Guo
1/2R-b
2/2A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v4 thread

Cover letter [PATCH v4 0/2] Rust abstractions for Device & Firmware

Hi,

as agreed in [1] this is the separate series for the device and firmware abstractions to unblock the inclusion of Fujita's PHY driver.

Originally, those patches were part of the patch series [2][3].

Changes in v4
=============
- add invariant of unmodified backing buffer to Firmware (Boqun)

Changes in v3
=============
- fix safety comments for Send and Sync for Device (Boqun)
- add corresponding invariant and safety requirement for Device::from_raw (Boqun)
- drop Firmware::request_platform and Firmware::request_direct (Greg)
- fix missing Kconfig entry for Firmware (Greg)
- fix doctest compilation for Firmware

Changes in v2
=============
- use the 'srctree/' notation
- expand the existing documentation and make it more unambiguous
- use NonNull in Firmware
- generalize the Firmware request functions
- add missing safety comments to Firmware

[1] https://lore.kernel.org/rust-for-linux/2024060745-palatable-dragging-32d1@gregkh/
[2] https://lore.kernel.org/rust-for-linux/[email protected]/
[3] https://lore.kernel.org/rust-for-linux/[email protected]/

Danilo Krummrich (2):
rust: add abstraction for struct device
rust: add firmware abstractions

 drivers/base/firmware_loader/Kconfig |   7 ++
 rust/bindings/bindings_helper.h      |   1 +
 rust/helpers.c                       |   1 +
 rust/kernel/device.rs                | 102 +++++++++++++++++++++++++++
 rust/kernel/firmware.rs              | 101 ++++++++++++++++++++++++++
 rust/kernel/lib.rs                   |   3 +
 6 files changed, 215 insertions(+)
 create mode 100644 rust/kernel/device.rs
 create mode 100644 rust/kernel/firmware.rs

base-commit: 1613e604df0cd359cf2a7fbd9be7a0bcfacfabd0

Signature · 1 line
2.45.1