rust: alloc: cleanup imports and use "kernel vertical" styleChange all imports in the alloc module to use the "kernel vertical"import style [1].While at it, drop unnecessary imports covered by p
rust: alloc: cleanup imports and use "kernel vertical" styleChange all imports in the alloc module to use the "kernel vertical"import style [1].While at it, drop unnecessary imports covered by prelude::*.Link: https://docs.kernel.org/rust/coding-guidelines.html#imports [1]Reviewed-by: Eliot Courtney <ecourtney@nvidia.com>Link: https://patch.msgid.link/20260513190946.619810-1-dakr@kernel.orgSigned-off-by: Danilo Krummrich <dakr@kernel.org>
show more ...
rust: alloc: simplify with `NonNull::add()` now that it is stableCurrently, we need to go through raw pointers and then re-create the`NonNull` from the result of offsetting the raw pointer.`feat
rust: alloc: simplify with `NonNull::add()` now that it is stableCurrently, we need to go through raw pointers and then re-create the`NonNull` from the result of offsetting the raw pointer.`feature(non_null_convenience)` [1] has been stabilized in Rust1.80.0 [2], which is older than our new minimum Rust version(Rust 1.85.0).Thus, now that we bump the Rust minimum version, simplify using`NonNull::add()` and clean the TODO note.Link: https://github.com/rust-lang/rust/issues/117691 [1]Link: https://github.com/rust-lang/rust/pull/124498 [2]Reviewed-by: Tamir Duberstein <tamird@kernel.org>Reviewed-by: Gary Guo <gary@garyguo.net>Acked-by: Danilo Krummrich <dakr@kernel.org>Link: https://patch.msgid.link/20260405235309.418950-15-ojeda@kernel.orgSigned-off-by: Miguel Ojeda <ojeda@kernel.org>
rust: alloc: implement VmallocPageIterIntroduce the VmallocPageIter type; an instance of VmallocPageIter maybe exposed by owners of vmalloc allocations to provide borrowed accessto its backing pa
rust: alloc: implement VmallocPageIterIntroduce the VmallocPageIter type; an instance of VmallocPageIter maybe exposed by owners of vmalloc allocations to provide borrowed accessto its backing pages.For instance, this is useful to access and borrow the backing pages ofallocation primitives, such as Box and Vec, backing a scatterlist.Reviewed-by: Daniel Almeida <daniel.almeida@collabora.com>Reviewed-by: Alexandre Courbot <acourbot@nvidia.com>Tested-by: Alexandre Courbot <acourbot@nvidia.com>Reviewed-by: Alice Ryhl <aliceryhl@google.com>Suggested-by: Alice Ryhl <aliceryhl@google.com>Link: https://lore.kernel.org/r/20250820145434.94745-4-dakr@kernel.org[ Drop VmallocPageIter::base_address(), move to allocator/iter.rs and stub VmallocPageIter for allocator_test.rs. - Danilo ]Signed-off-by: Danilo Krummrich <dakr@kernel.org>