Skip to contentSkip to conversation

Rust xarray for v6.16

GIT PULL Applied Andreas Hindborg 2 participants 2 messages May 6, 2025 – May 18, 2025 Rust

lore
Share & tools
lore

Andreas Hindborg

author reviewer
#0 lore raw

Hi Miguel,

Please pull these changes to enable access to the xarray data structure from rust.

The following changes since commit 9c32cda43eb78f78c73aee4aa344b777714e259b:

Linux 6.15-rc3 (2025-04-20 13:43:47 -0700)

are available in the Git repository at:

https://github.com/rust-for-linux/linux.git tags/rust-xarray-for-v6.16

for you to fetch changes up to fa616196fbea12462107774fb6a1908c95f71cf0:

MAINTAINERS: add entry for Rust XArray API (2025-05-01 11:37:59 +0200)

Best regards,
Andreas Hindborg

----------------------------------------------------------------
Rust xarray API for v6.16

Introduce Rust support for the xarray data structure:

- Add a rust abstraction for the xarray data structure. This abstraction allows rust code to leverage the xarray to store types that implement ForeignOwnable. This support is a dependency for memory backing feature of the rust null block driver, which is waiting to be merged.

- Set up an entry in MAINTAINERS for the xarray rust support. Patches will go to the new rust xarray tree and then via the rust subsystem tree for now.

kernel crate:

- Allow ForeignOwnable to carry information about the pointed-to type. This helps asserting alignment requirements for the pointer passed to the foreign language.

----------------------------------------------------------------
Tamir Duberstein (3):
rust: types: add ForeignOwnable::PointedTo
rust: xarray: Add an abstraction for XArray
MAINTAINERS: add entry for Rust XArray API

 MAINTAINERS                     |  11 ++
 rust/bindings/bindings_helper.h |   6 +
 rust/helpers/helpers.c          |   1 +
 rust/helpers/xarray.c           |  28 ++++
 rust/kernel/alloc/kbox.rs       |  38 +++---
 rust/kernel/lib.rs              |   1 +
 rust/kernel/miscdevice.rs       |  10 +-
 rust/kernel/pci.rs              |   2 +-
 rust/kernel/platform.rs         |   2 +-
 rust/kernel/sync/arc.rs         |  21 +--
 rust/kernel/types.rs            |  46 ++++---
 rust/kernel/xarray.rs           | 275 ++++++++++++++++++++++++++++++++++++++++
 12 files changed, 392 insertions(+), 49 deletions(-)
 create mode 100644 rust/helpers/xarray.c
 create mode 100644 rust/kernel/xarray.rs