public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Guenter Roeck <linux@roeck-us.net>
To: David Rientjes <rientjes@google.com>
Cc: David Airlie <airlied@linux.ie>,
	dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] drm: Do not use BUG_ON(!spin_is_locked())
Date: Mon, 11 Aug 2014 07:06:48 -0700	[thread overview]
Message-ID: <53E8CDF8.2060008@roeck-us.net> (raw)
In-Reply-To: <alpine.DEB.2.02.1408110439580.15519@chino.kir.corp.google.com>

On 08/11/2014 04:45 AM, David Rientjes wrote:
> On Sun, 10 Aug 2014, Guenter Roeck wrote:
>
>> spin_is_locked() always returns false in uniprocessor configurations
>> and can therefore not be used with BUG_ON. Replace it with
>> assert_spin_locked(), which exists for that very purpose.
>>
>
> It may be helpful to assess whether any of these sites should be converted
> to lockdep_assert_held() so they have no cost when lockdep isn't enabled
> but still reveal problems when debugging.
>
>

Possibly, but that would need to be done by someone with better knowledge
about locking and the code than me.

Guenter


  reply	other threads:[~2014-08-11 14:06 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-11  4:31 [PATCH] drm: Do not use BUG_ON(!spin_is_locked()) Guenter Roeck
2014-08-11 11:45 ` David Rientjes
2014-08-11 14:06   ` Guenter Roeck [this message]
     [not found]   ` <CAGUYZuS=_rFpukssRebxXBccPrJAen15i8Qf3K+1YyF+feShdQ@mail.gmail.com>
     [not found]     ` <CAGUYZuSk4u5jyPcrYTjwjXmQRyr0kCEvxkgFfjcyP+ex544CLA@mail.gmail.com>
2014-08-11 20:53       ` David Rientjes
2014-08-11 23:09         ` Rob Clark
2014-08-11 23:38           ` David Rientjes
2014-08-12  6:55             ` Daniel Vetter
     [not found]               ` <CAGUYZuRwKXyRuYg1xDB9u1gE4gTRcpV_c_O645N8V-yksSfsNQ@mail.gmail.com>
2014-09-01  6:18                 ` Dave Airlie

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=53E8CDF8.2060008@roeck-us.net \
    --to=linux@roeck-us.net \
    --cc=airlied@linux.ie \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rientjes@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox