On Thu, Jul 09, 2026 at 02:36:44PM -0700, Deborah Brouwer wrote:
> From: Boris Brezillon <[email protected]>
> 
> Add GPU virtual address space management using the DRM GPUVM framework.
> Each virtual memory (VM) space is backed by ARM64 LPAE Stage 1 page tables
> and can be mapped into hardware address space (AS) slots for GPU execution.
> 
> The implementation provides memory isolation and virtual address
> allocation. VMs support mapping GEM buffer objects with configurable
> protection flags (readonly, noexec, uncached) and handle both 4KB and 2MB
> page sizes. A new_dummy_object() helper is provided to create a dummy GEM
> object for use as a GPUVM root.
> 
> The vm module integrates with the MMU for address space activation and
> provides map/unmap/remap operations with page table synchronization.
> 
> Signed-off-by: Boris Brezillon <[email protected]>
> Co-developed-by: Daniel Almeida <[email protected]>
> Signed-off-by: Daniel Almeida <[email protected]>
> Co-developed-by: Deborah Brouwer <[email protected]>
> Signed-off-by: Deborah Brouwer <[email protected]>

I'm seeing some build failures on 32-bit arm:

error[E0308]: mismatched types
   --> /home/runner/work/linux/linux/linux/drivers/gpu/drm/tyr/vm.rs:572:45
    |
572 |             let mut sgt_entry_length: u64 = sgt_entry.dma_len();
    |                                       ---   ^^^^^^^^^^^^^^^^^^^ expected 
`u64`, found `u32`
    |                                       |
    |                                       expected due to this
    |
help: you can convert a `u32` to a `u64`
    |
572 |             let mut sgt_entry_length: u64 = sgt_entry.dma_len().into();
    |                                                                +++++++

error[E0308]: mismatched types
   --> /home/runner/work/linux/linux/linux/drivers/gpu/drm/tyr/vm.rs:581:26
    |
581 |                 paddr += skip;
    |                          ^^^^ expected `u32`, found `u64`

error[E0277]: cannot add-assign `u64` to `u32`
   --> /home/runner/work/linux/linux/linux/drivers/gpu/drm/tyr/vm.rs:581:23
    |
581 |                 paddr += skip;
    |                       ^^ no implementation for `u32 += u64`
    |
    = help: the trait `core::ops::AddAssign<u64>` is not implemented for `u32`
help: `u32` implements trait `core::ops::AddAssign<Rhs>`
   --> 
/home/runner/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/internal_macros.rs:61:9
    |
 61 |           impl const $imp<&$u> for $t {
    |           ^^^^^^^^^^^^^^^^^^^^^^^^^^^ `core::ops::AddAssign<&u32>`
    |
   ::: /home/runner/work/linux/linux/linux/rust/zerocopy/src/byteorder.rs:316:9
    |
316 |           impl<O: ByteOrder> core::ops::$trait_assign<$name<O>> for 
$native {
    |           
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 
`core::ops::AddAssign<zerocopy::byteorder::U32<O>>`
...
720 | / define_type!(
721 | |     A,
722 | |     "A 32-bit unsigned integer",
723 | |     U32,
...   |
735 | |     [U64, U128]
736 | | );
    | |_- in this macro invocation
    |
   ::: 
/home/runner/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ops/arith.rs:786:9
    |
786 |           impl const AddAssign for $t {
    |           ^^^^^^^^^^^^^^^^^^^^^^^^^^^ `core::ops::AddAssign`
  CC      drivers/base/firmware_loader/builtin/main.o
...
799 |   add_assign_impl! { usize u8 u16 u32 u64 u128 isize i8 i16 i32 i64 i128 
f16 f32 f64 f128 }
    |   
-----------------------------------------------------------------------------------------
 in this macro invocation
    = note: this error originates in the macro `impl_ops_traits` which comes 
from the expansion of the macro `add_assign_impl` (in Nightly builds, run with 
-Z macro-backtrace for more info)

error[E0308]: mismatched types
   --> /home/runner/work/linux/linux/linux/drivers/gpu/drm/tyr/vm.rs:596:65
    |
596 |             let segment_mapped = match pt_map(context.pt, iova, paddr, 
len, prot) {
    |                                        ------                   ^^^^^ 
expected `u64`, found `u32`
    |                                        |
    |                                        arguments to this function are 
incorrect
    |
note: function defined here
   --> /home/runner/work/linux/linux/linux/drivers/gpu/drm/tyr/vm.rs:731:4
    |
731 | fn pt_map(
    |    ^^^^^^
...
734 |     paddr: u64,
    |     ----------
help: you can convert a `u32` to a `u64`
    |
596 |             let segment_mapped = match pt_map(context.pt, iova, 
paddr.into(), len, prot) {
    |                                                                      
+++++++

  CC      net/core/tso.o
error: aborting due to 4 previous errors

Reply via email to