Message ID | 20231030012814.1208972-1-airlied@gmail.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | [1/2] nouveau: fix r535 build on 32-bit arm. | expand |
On 10/30/23 02:28, Dave Airlie wrote: > From: Dave Airlie <airlied@redhat.com> > > This needs the proper division macros. > > Signed-off-by: Dave Airlie <airlied@redhat.com> Reviewed-by: Danilo Krummrich <dakr@redhat.com> > --- > drivers/gpu/drm/nouveau/nvkm/engine/fifo/r535.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/fifo/r535.c b/drivers/gpu/drm/nouveau/nvkm/engine/fifo/r535.c > index 14a67cf96204..0f9b8087d5e6 100644 > --- a/drivers/gpu/drm/nouveau/nvkm/engine/fifo/r535.c > +++ b/drivers/gpu/drm/nouveau/nvkm/engine/fifo/r535.c > @@ -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) {
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/fifo/r535.c b/drivers/gpu/drm/nouveau/nvkm/engine/fifo/r535.c index 14a67cf96204..0f9b8087d5e6 100644 --- a/drivers/gpu/drm/nouveau/nvkm/engine/fifo/r535.c +++ b/drivers/gpu/drm/nouveau/nvkm/engine/fifo/r535.c @@ -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) {