<p dir="ltr">On 23 Dec 2014 00:27, "Bruno Prémont" <<a href="mailto:bonbons@linux-vserver.org">bonbons@linux-vserver.org</a>> wrote:<br>
><br>
> On Mon, 22 Dec 2014 08:46:48 -0500 Rob Clark wrote:<br>
> > On Sun, Dec 21, 2014 at 11:43 AM, Bruno Prémont wrote:<br>
> > > On !SMP systems spinlocks do not exist. Thus checking of they<br>
> > > are active will always fail.<br>
> > ><br>
> > > Use<br>
> > >   assert_spin_locked(lock);<br>
> > > instead of<br>
> > >   BUG_ON(!spin_is_locked(lock));<br>
> > > to not BUG() on all UP systems.<br>
> > ><br>
> > > Signed-off-by: Bruno Prémont <<a href="mailto:bonbons@linux-vserver.org">bonbons@linux-vserver.org</a>><br>
> > > ---<br>
> > >  drivers/gpu/drm/omapdrm/omap_irq.c | 2 +-<br>
> > >  1 file changed, 1 insertion(+), 1 deletion(-)<br>
> > ><br>
> > > diff --git a/drivers/gpu/drm/omapdrm/omap_irq.c b/drivers/gpu/drm/omapdrm/omap_irq.c<br>
> > > index f035d2b..6ca9253 100644<br>
> > > --- a/drivers/gpu/drm/omapdrm/omap_irq.c<br>
> > > +++ b/drivers/gpu/drm/omapdrm/omap_irq.c<br>
> > > @@ -34,7 +34,7 @@ static void omap_irq_update(struct drm_device *dev)<br>
> > >         struct omap_drm_irq *irq;<br>
> > >         uint32_t irqmask = priv->vblank_mask;<br>
> > ><br>
> > > -       BUG_ON(!spin_is_locked(&list_lock));<br>
> > > +       assert_spin_locked(&list_lock));<br>
> ><br>
> > btw, one too many ')' there...  I've fixed up the same issue w/ msm<br>
> > patch as I applied it<br>
><br>
> Oops.<br>
><br>
> I got it right for the nouveau patch, so I was probably too quick<br>
> doing the manual replace for the other occurrences in drivers/gpu/.<br>
><br>
><br>
> I didn't check how far back these BUG_ON() go though they might be worth<br>
> applying to stable trees as well (could be the assert_spin_locked()<br>
> macro appeared only after the introduction of some of these BUG_ON()s though).<br>
><br>
> I've hit them on nouveau on 3.18 and 3.19-rc1.<br>
I've taken the nouveau patch locally fwiw, and forwarded it on to Dave for - fixes. </p>
<p dir="ltr">Ben. <br>
><br>
> Bruno<br>
><br>
> > BR,<br>
> > -R<br>
> ><br>
> ><br>
> > ><br>
> > >         list_for_each_entry(irq, &priv->irq_list, node)<br>
> > >                 irqmask |= irq->irqmask;<br>
> > > --<br>
> > > 1.8.1.5<br>
> _______________________________________________<br>
> dri-devel mailing list<br>
> <a href="mailto:dri-devel@lists.freedesktop.org">dri-devel@lists.freedesktop.org</a><br>
> <a href="http://lists.freedesktop.org/mailman/listinfo/dri-devel">http://lists.freedesktop.org/mailman/listinfo/dri-devel</a><br>
</p>