Merged a few days ago for the Linux 7.0 kernel were all of the driver core enhancements. As has been the common theme in recent kernel releases, a lot of the driver core code churn revolves around additions for allowing more Rust kernel driver usage.
The driver core pull was slated to include the new revocable synchronization primitive for Linux 7.0, but they ended up being reverted. More time is needed to refine the revocable synchronization primitive so as such it will end up landing in a future Linux kernel cycle.
With the driver core changes each cycle there continues to be a lot of churn around Rust kernel driver support. The Rust code in driver core now supports dev_printk on all device types, allowing Rust drivers to tune the maximum DMA segment size via dma_set_max_seg_size(), and introducing the concept of generic I/O back-ends.
These Rust generic I/O back-ends are for handling different kinds of device shared memory through a common interface. This generic I/O back-end support makes it easier to build concepts like I/O slices and register abstractions for Rust drivers.
The driver code also adds the __rust_helper annotations to C helpers to aide in inlining more Rust code and ultimately helping Rust + LTO kernel builds.
There is also using more “kernel vertical” style code for Rust imports — addressing an earlier critique by Linus Torvalds over how Rust imports were structured.
Also included is a sample Rust SoC driver for soc::Device demonstration purposes that go with new Rust SoC device structures.
More details on the many driver core changes merged for Linux 7.0 via this pull.
