[Intel-gfx] linux-next: build failure after merge of the drm-misc tree

Qiang Yu yuq825 at gmail.com
Tue Apr 2 13:33:25 UTC 2019


On Tue, Apr 2, 2019 at 7:21 PM Matthew Wilcox <willy at infradead.org> wrote:
>
> On Tue, Apr 02, 2019 at 10:50:06AM +1100, Stephen Rothwell wrote:
> > +++ b/drivers/gpu/drm/lima/lima_ctx.c
> > @@ -23,7 +23,7 @@ int lima_ctx_create(struct lima_device *dev, struct lima_ctx_mgr *mgr, u32 *id)
> >                       goto err_out0;
> >       }
> >
> > -     err = xa_alloc(&mgr->handles, id, UINT_MAX, ctx, GFP_KERNEL);
> > +     err = xa_alloc(&mgr->handles, id, ctx, XA_LIMIT(*id, UINT_MAX), GFP_KERNEL);
> >       if (err < 0)
> >               goto err_out0;
>
> I agree that this is an exact translation of what the code was doing,
> but I don't think it's what the author intended the code to do.
> They almost certainly meant:
>
>         err = xa_alloc(&mgr->handles, id, ctx, xa_limit_32b, GFP_KERNEL);
>
> I'm basing this on:
>
> +struct drm_lima_ctx_create {
> +       __u32 id;          /* out, context handle */
> +       __u32 _pad;        /* pad, must be zero */
> +};
>
> (and this confusion is exactly why I changed the API ...)

Right, I plan to send out a patch like yours after drm-misc-next merge
5.1 changes, as this is a build fix patch and already applied to somewhere.
I can send out another patch now if merge guys could use the new one
directly.


More information about the Intel-gfx mailing list