[PATCH 3/3] msm: Do not BUG_ON(!spin_is_locked()) on UP

Rob Clark robdclark at gmail.com
Mon Dec 22 04:55:57 PST 2014


On Sun, Dec 21, 2014 at 11:43 AM, Bruno Prémont
<bonbons at 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 at 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
>


More information about the dri-devel mailing list