|
Revision tags: v6.15, v6.15-rc7, v6.15-rc6, v6.15-rc5, v6.15-rc4, v6.15-rc3, v6.15-rc2, v6.15-rc1, v6.14, v6.14-rc7 |
|
| #
4d032779 |
| 14-Mar-2025 |
Danilo Krummrich <[email protected]> |
rust: device: implement device context marker
Some bus device functions should only be called from bus callbacks, such as probe(), remove(), resume(), suspend(), etc.
To ensure this add device cont
rust: device: implement device context marker
Some bus device functions should only be called from bus callbacks, such as probe(), remove(), resume(), suspend(), etc.
To ensure this add device context marker structs, that can be used as generics for bus device implementations.
Reviewed-by: Benno Lossin <[email protected]> Suggested-by: Benno Lossin <[email protected]> Signed-off-by: Danilo Krummrich <[email protected]> Acked-by: Boqun Feng <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
show more ...
|
|
Revision tags: v6.14-rc6, v6.14-rc5, v6.14-rc4, v6.14-rc3, v6.14-rc2, v6.14-rc1, v6.13 |
|
| #
01b3cb62 |
| 16-Jan-2025 |
Viresh Kumar <[email protected]> |
rust: device: Use as_char_ptr() to avoid explicit cast
Use as_char_ptr() to avoid explicit cast.
Suggested-by: Alice Ryhl <[email protected]> Signed-off-by: Viresh Kumar <[email protected]
rust: device: Use as_char_ptr() to avoid explicit cast
Use as_char_ptr() to avoid explicit cast.
Suggested-by: Alice Ryhl <[email protected]> Signed-off-by: Viresh Kumar <[email protected]> Reviewed-by: Alice Ryhl <[email protected]> Link: https://lore.kernel.org/r/a88cd29bf01c8fbafd5c2608357f54ea10f6e492.1737016320.git.viresh.kumar@linaro.org Signed-off-by: Greg Kroah-Hartman <[email protected]>
show more ...
|
| #
e1cd24af |
| 16-Jan-2025 |
Viresh Kumar <[email protected]> |
rust: device: Replace CString with CStr in property_present()
The property_present() method expects a &CString currently and will work only with heap allocated C strings.
In order to make it work w
rust: device: Replace CString with CStr in property_present()
The property_present() method expects a &CString currently and will work only with heap allocated C strings.
In order to make it work with compile-time string constants too, change the argument type to &CStr.
Signed-off-by: Viresh Kumar <[email protected]> Reviewed-by: Alice Ryhl <[email protected]> Link: https://lore.kernel.org/r/e97dcbe0418cc1053fb4bcfac65cc02a0afcdf78.1737005078.git.viresh.kumar@linaro.org Signed-off-by: Greg Kroah-Hartman <[email protected]>
show more ...
|
| #
e3a89cc2 |
| 13-Jan-2025 |
Viresh Kumar <[email protected]> |
rust: device: Add property_present()
This implements Device::property_present(), which calls C APIs device_property_present() helper.
The new helper will be used by Rust based cpufreq drivers.
Sig
rust: device: Add property_present()
This implements Device::property_present(), which calls C APIs device_property_present() helper.
The new helper will be used by Rust based cpufreq drivers.
Signed-off-by: Viresh Kumar <[email protected]> Link: https://lore.kernel.org/r/f43fe3f7b3151a89c261ad728b0f3bb2fc24caef.1736766672.git.viresh.kumar@linaro.org Signed-off-by: Greg Kroah-Hartman <[email protected]>
show more ...
|
|
Revision tags: v6.13-rc7, v6.13-rc6, v6.13-rc5, v6.13-rc4, v6.13-rc3 |
|
| #
27c7518e |
| 15-Dec-2024 |
Miguel Ojeda <[email protected]> |
rust: finish using custom FFI integer types
In the last kernel cycle we migrated most of the `core::ffi` cases in commit d072acda4862 ("rust: use custom FFI integer types"):
Currently FFI integ
rust: finish using custom FFI integer types
In the last kernel cycle we migrated most of the `core::ffi` cases in commit d072acda4862 ("rust: use custom FFI integer types"):
Currently FFI integer types are defined in libcore. This commit creates the `ffi` crate and asks bindgen to use that crate for FFI integer types instead of `core::ffi`.
This commit is preparatory and no type changes are made in this commit yet.
Finish now the few remaining/new cases so that we perform the actual remapping in the next commit as planned.
Acked-by: Jocelyn Falempe <[email protected]> # drm Link: https://lore.kernel.org/rust-for-linux/CANiq72m_rg42SvZK=bF2f0yEoBLVA33UBhiAsv8THhVu=G2dPA@mail.gmail.com/ Link: https://lore.kernel.org/all/[email protected]/ Signed-off-by: Miguel Ojeda <[email protected]>
show more ...
|
|
Revision tags: v6.13-rc2, v6.13-rc1, v6.12, v6.12-rc7, v6.12-rc6, v6.12-rc5 |
|
| #
5c7ca6fa |
| 22-Oct-2024 |
Wedson Almeida Filho <[email protected]> |
rust: add `dev_*` print macros.
Implement `dev_*` print macros for `device::Device`.
They behave like the macros with the same names in C, i.e., they print messages to the kernel ring buffer with t
rust: add `dev_*` print macros.
Implement `dev_*` print macros for `device::Device`.
They behave like the macros with the same names in C, i.e., they print messages to the kernel ring buffer with the given level, prefixing the messages with corresponding device information.
Signed-off-by: Wedson Almeida Filho <[email protected]> Signed-off-by: Danilo Krummrich <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
show more ...
|
|
Revision tags: v6.12-rc4, v6.12-rc3, v6.12-rc2 |
|
| #
cc4332af |
| 01-Oct-2024 |
Guilherme Giacomo Simoes <[email protected]> |
rust: device: change the from_raw() function
The function Device::from_raw() increments a refcount by a call to bindings::get_device(ptr). This can be confused because usually from_raw() functions d
rust: device: change the from_raw() function
The function Device::from_raw() increments a refcount by a call to bindings::get_device(ptr). This can be confused because usually from_raw() functions don't increment a refcount. Hence, rename Device::from_raw() to avoid confuion with other "from_raw" semantics.
The new name of function should be "get_device" to be consistent with the function get_device() already exist in .c files.
This function body also changed, because the `into()` will convert the `&'a Device` into `ARef<Device>` and also call `inc_ref` from the `AlwaysRefCounted` trait implemented for Device.
Signed-off-by: Guilherme Giacomo Simoes <[email protected]> Acked-by: Danilo Krummrich <[email protected]> Closes: https://github.com/Rust-for-Linux/linux/issues/1088 Reviewed-by: Boqun Feng <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
show more ...
|
|
Revision tags: v6.12-rc1, v6.11, v6.11-rc7, v6.11-rc6, v6.11-rc5, v6.11-rc4, v6.11-rc3, v6.11-rc2, v6.11-rc1, v6.10, v6.10-rc7, v6.10-rc6, v6.10-rc5 |
|
| #
4ead6c37 |
| 19-Jun-2024 |
Danilo Krummrich <[email protected]> |
device: rust: improve safety comments
Improve the wording of safety comments to be more explicit about what exactly is guaranteed to be valid.
Suggested-by: Benno Lossin <[email protected]> Si
device: rust: improve safety comments
Improve the wording of safety comments to be more explicit about what exactly is guaranteed to be valid.
Suggested-by: Benno Lossin <[email protected]> Signed-off-by: Danilo Krummrich <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
show more ...
|
| #
a674fefd |
| 18-Jun-2024 |
Danilo Krummrich <[email protected]> |
rust: add abstraction for struct device
Add an (always) reference-counted abstraction for a generic C `struct device`. This abstraction encapsulates existing `struct device` instances and manages it
rust: add abstraction for struct device
Add an (always) reference-counted abstraction for a generic C `struct device`. This abstraction encapsulates existing `struct device` instances and manages its reference count.
Subsystems may use this abstraction as a base to abstract subsystem specific device instances based on a generic `struct device`, such as `struct pci_dev`.
Co-developed-by: Wedson Almeida Filho <[email protected]> Signed-off-by: Wedson Almeida Filho <[email protected]> Signed-off-by: Danilo Krummrich <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
show more ...
|