[PATCH 0/4] rust: Add helper functions and constants for Tyr driver

Alvin Sun
2026-04-17T01:11:35Z

This patchset provides helper functions and constants that will be used
by the Tyr driver's VM and BO related ioctl implementations.

These patches add:
- SZ_4G constant for VA layout calculations
- A task_size() method to Mm for determining process VA space size
- Updated StoreError comments for alloc() usage
- Guard::find() helper for finding the first present entry in XArray

This patchset depends on Onur's xa_alloc implementation [1].

The complete patchset, including the Tyr driver ioctl implementations
can be found at [2].

Link: https://lore.kernel.org/rust-for-linux/20251006163024.18473-1-work@onurozkan.dev/ [1]
Link: https://gitlab.freedesktop.org/panfrost/linux/-/merge_requests/64 [2]
Signed-off-by: Alvin Sun <alvin.sun@linux.dev>
---
Alvin Sun (4):
rust: sizes: add SZ_4G constant
rust: mm: Add task_size() method to Mm
rust: xarray: Update StoreError comments for alloc()
rust: xarray: Add Guard::find() helper

rust/kernel/mm.rs | 7 +++++++
rust/kernel/sizes.rs | 2 ++
rust/kernel/xarray.rs | 28 +++++++++++++++++++++++++---
3 files changed, 34 insertions(+), 3 deletions(-)
---
base-commit: d1d81e9d1a4dd846aee9ae77ff9ecc2800d72148
change-id: 20260416-tyr-ioctls-deps-25805eedf332
prerequisite-message-id: <20251006163024.18473-1-work@onurozkan.dev>
prerequisite-patch-id: c472a9548969ac774d36fead73378961a0d0489c
prerequisite-patch-id: 63890b91e911cf96cb42308c056d639580ac0fa0
prerequisite-patch-id: 337eb93db35359c611abe9cba299e6ab0525a2b5

Best regards,
--
Alvin Sun <alvin.sun@linux.dev>