Message ID | 20141221174344.4bbb3818@neptune.home (mailing list archive) |
---|---|
State | Accepted |
Headers | show |
On Sun, Dec 21, 2014 at 11:43 AM, Bruno Prémont <bonbons@linux-vserver.org> wrote: > On !SMP systems spinlocks do not exist. Thus checking of they > are active will always fail. > > Use > assert_spin_locked(lock); > instead of > BUG_ON(!spin_is_locked(lock)); > to not BUG() on all UP systems. > Thanks, I have this queued up locally for 3.20 (or will send earlier if I have another -fixes pull for 3.19, but at this point I don't think I will) BR, -R > Signed-off-by: Bruno Prémont <bonbons@linux-vserver.org> > --- > drivers/gpu/drm/msm/mdp/mdp_kms.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/msm/mdp/mdp_kms.c b/drivers/gpu/drm/msm/mdp/mdp_kms.c > index 03455b6..f5e2173 100644 > --- a/drivers/gpu/drm/msm/mdp/mdp_kms.c > +++ b/drivers/gpu/drm/msm/mdp/mdp_kms.c > @@ -34,7 +34,7 @@ static void update_irq(struct mdp_kms *mdp_kms) > struct mdp_irq *irq; > uint32_t irqmask = mdp_kms->vblank_mask; > > - BUG_ON(!spin_is_locked(&list_lock)); > + assert_spin_locked(&list_lock)); > > list_for_each_entry(irq, &mdp_kms->irq_list, node) > irqmask |= irq->irqmask; > -- > 1.8.1.5 >
diff --git a/drivers/gpu/drm/msm/mdp/mdp_kms.c b/drivers/gpu/drm/msm/mdp/mdp_kms.c index 03455b6..f5e2173 100644 --- a/drivers/gpu/drm/msm/mdp/mdp_kms.c +++ b/drivers/gpu/drm/msm/mdp/mdp_kms.c @@ -34,7 +34,7 @@ static void update_irq(struct mdp_kms *mdp_kms) struct mdp_irq *irq; uint32_t irqmask = mdp_kms->vblank_mask; - BUG_ON(!spin_is_locked(&list_lock)); + assert_spin_locked(&list_lock)); list_for_each_entry(irq, &mdp_kms->irq_list, node) irqmask |= irq->irqmask;
On !SMP systems spinlocks do not exist. Thus checking of they are active will always fail. Use assert_spin_locked(lock); instead of BUG_ON(!spin_is_locked(lock)); to not BUG() on all UP systems. Signed-off-by: Bruno Prémont <bonbons@linux-vserver.org> --- drivers/gpu/drm/msm/mdp/mdp_kms.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)