nouveau: fix r535 build on 32-bit arm.
authorDave Airlie <airlied@redhat.com>
Mon, 30 Oct 2023 01:26:17 +0000 (11:26 +1000)
committerDave Airlie <airlied@redhat.com>
Tue, 31 Oct 2023 05:11:14 +0000 (15:11 +1000)
This needs the proper division macros.

Reviewed-by: Danilo Krummrich <dakr@redhat.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20231030012814.1208972-1-airlied@gmail.com
drivers/gpu/drm/nouveau/nvkm/engine/fifo/r535.c

index 14a67cf..0f9b808 100644 (file)
@@ -267,7 +267,7 @@ r535_chan_id_get_locked(struct nvkm_chan *chan, struct nvkm_memory *muserd, u64
                return -EINVAL;
        }
 
-       chid = ouserd / chan->func->userd->size;
+       chid = div_u64(ouserd, chan->func->userd->size);
 
        list_for_each_entry(userd, &fifo->userd.list, head) {
                if (userd->mem == muserd) {