msm: Do not BUG_ON(!spin_is_locked()) on UP
Subsystems (2)
PATCH 3/3 msm: Do not BUG_ON(!spin_is_locked()) on UP
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 <[email protected]>
--- drivers/gpu/drm/msm/mdp/mdp_kms.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/msm/mdp/mdp_kms.c +1 -1
@@ -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;
Signature · 6 lines
1.8.1.5 _______________________________________________ dri-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/dri-devel
Quoted 9 lines · Bruno Prémont
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 notBUG()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
Quoted 19 lines
Signed-off-by Bruno Prémont <[email protected]>--- drivers/gpu/drm/msm/mdp/mdp_kms.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/gpu/drm/msm/mdp/mdp_kms.c +1
-2@@ -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; --
Quoted 2 lines
1.8.1.5
_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel