Message ID | 20241022213221.2383-1-dakr@kernel.org (mailing list archive) |
---|---|
Headers | show |
Series | Device / Driver PCI / Platform Rust abstractions | expand |
On Tue, Oct 22, 2024 at 11:31:37PM +0200, Danilo Krummrich wrote: > This patch series implements the necessary Rust abstractions to implement > device drivers in Rust. > > This includes some basic generalizations for driver registration, handling of ID > tables, MMIO operations and device resource handling. > > Those generalizations are used to implement device driver support for two > busses, the PCI and platfrom bus (with OF IDs) in order to provide some evidence > that the generalizations work as intended. > > The patch series also includes two patches adding two driver samples, one PCI > driver and one platform driver. > > The PCI bits are motivated by the Nova driver project [1], but are used by at > least one more OOT driver (rnvme [2]). > > The platform bits, besides adding some more evidence to the base abstractions, > are required by a few more OOT drivers aiming at going upstream, i.e. rvkms [3], > cpufreq-dt [4], asahi [5] and the i2c work from Fabien [6]. > > The patches of this series can also be [7], [8] and [9]. Nice! Thanks for redoing this, at first glance it's much better. It will be a few days before I can dive into this, It's conference season and the travel is rough, so be patient but I will get to this... thanks, greg k-h
On Wed, Oct 23, 2024 at 07:13:37AM +0200, Greg KH wrote: > On Tue, Oct 22, 2024 at 11:31:37PM +0200, Danilo Krummrich wrote: > > This patch series implements the necessary Rust abstractions to implement > > device drivers in Rust. > > > > This includes some basic generalizations for driver registration, handling of ID > > tables, MMIO operations and device resource handling. > > > > Those generalizations are used to implement device driver support for two > > busses, the PCI and platfrom bus (with OF IDs) in order to provide some evidence > > that the generalizations work as intended. > > > > The patch series also includes two patches adding two driver samples, one PCI > > driver and one platform driver. > > > > The PCI bits are motivated by the Nova driver project [1], but are used by at > > least one more OOT driver (rnvme [2]). > > > > The platform bits, besides adding some more evidence to the base abstractions, > > are required by a few more OOT drivers aiming at going upstream, i.e. rvkms [3], > > cpufreq-dt [4], asahi [5] and the i2c work from Fabien [6]. > > > > The patches of this series can also be [7], [8] and [9]. > > Nice! > > Thanks for redoing this, at first glance it's much better. It will be a > few days before I can dive into this, It's conference season and the > travel is rough, so be patient but I will get to this... No worries, I'll be also a bit less responsive than usual in the next weeks. > > thanks, > > greg k-h >
Hi Danilo, On 22.10.2024 23:31, Danilo Krummrich wrote: > This patch series implements the necessary Rust abstractions to implement > device drivers in Rust. > > This includes some basic generalizations for driver registration, handling of ID > tables, MMIO operations and device resource handling. > > Those generalizations are used to implement device driver support for two > busses, the PCI and platfrom bus (with OF IDs) in order to provide some evidence > that the generalizations work as intended. > > The patch series also includes two patches adding two driver samples, one PCI > driver and one platform driver. > > The PCI bits are motivated by the Nova driver project [1], but are used by at > least one more OOT driver (rnvme [2]). > > The platform bits, besides adding some more evidence to the base abstractions, > are required by a few more OOT drivers aiming at going upstream, i.e. rvkms [3], > cpufreq-dt [4], asahi [5] and the i2c work from Fabien [6]. > > The patches of this series can also be [7], [8] and [9]. Just some minor typos: ----------------------------------------------------- 0004_rust_implement_generic_driver_registration.patch ----------------------------------------------------- WARNING: 'privide' may be misspelled - perhaps 'provide'? #63: FILE: rust/kernel/driver.rs:14: +/// Amba, etc.) to privide the corresponding subsystem specific implementation to register / ^^^^^^^ --------------------------------------------------------- 0005_rust_implement_idarray_idtable_and_rawdeviceid.patch --------------------------------------------------------- WARNING: 'offest' may be misspelled - perhaps 'offset'? #84: FILE: rust/kernel/device_id.rs:39: + /// The offest to the context/data field. ^^^^^^ ----------------------------------- 0009_rust_add_io_io_base_type.patch ----------------------------------- WARNING: 'embedd' may be misspelled - perhaps 'embed'? #27: bound to, subsystems should embedd the corresponding I/O memory type ^^^^^^ Best regards Dirk
On Tue, Oct 22, 2024 at 11:31:37PM +0200, Danilo Krummrich wrote: > This patch series implements the necessary Rust abstractions to implement > device drivers in Rust. > > This includes some basic generalizations for driver registration, handling of ID > tables, MMIO operations and device resource handling. > > Those generalizations are used to implement device driver support for two > busses, the PCI and platfrom bus (with OF IDs) in order to provide some evidence > that the generalizations work as intended. > > The patch series also includes two patches adding two driver samples, one PCI > driver and one platform driver. > > The PCI bits are motivated by the Nova driver project [1], but are used by at > least one more OOT driver (rnvme [2]). > > The platform bits, besides adding some more evidence to the base abstractions, > are required by a few more OOT drivers aiming at going upstream, i.e. rvkms [3], > cpufreq-dt [4], asahi [5] and the i2c work from Fabien [6]. A rebase of the asahi driver onto this series still probes the platform device and the driver works as expected. Feel free to add Tested-by: Janne Grunau <j@jannau> We plan to import this series for the Asahi Linux downstream kernel starting with v6.12 and replace the old rust-for-linux Device/Driver abstractions with this. Janne
On Sat, Nov 16, 2024 at 03:32:40PM +0100, Janne Grunau wrote: > On Tue, Oct 22, 2024 at 11:31:37PM +0200, Danilo Krummrich wrote: > > This patch series implements the necessary Rust abstractions to implement > > device drivers in Rust. > > > > This includes some basic generalizations for driver registration, handling of ID > > tables, MMIO operations and device resource handling. > > > > Those generalizations are used to implement device driver support for two > > busses, the PCI and platfrom bus (with OF IDs) in order to provide some evidence > > that the generalizations work as intended. > > > > The patch series also includes two patches adding two driver samples, one PCI > > driver and one platform driver. > > > > The PCI bits are motivated by the Nova driver project [1], but are used by at > > least one more OOT driver (rnvme [2]). > > > > The platform bits, besides adding some more evidence to the base abstractions, > > are required by a few more OOT drivers aiming at going upstream, i.e. rvkms [3], > > cpufreq-dt [4], asahi [5] and the i2c work from Fabien [6]. > > A rebase of the asahi driver onto this series still probes the platform > device and the driver works as expected. > > Feel free to add > Tested-by: Janne Grunau <j@jannau> > > We plan to import this series for the Asahi Linux downstream kernel > starting with v6.12 and replace the old rust-for-linux Device/Driver > abstractions with this. Great! I'll wait for the next respin of this as it seems there's been a lot of review already, and I've taken some of the patches already, so odds are after 6.13-rc1 is out the series can get a lot smaller. thanks, greg k-h