From: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
To: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Cc: dri-devel@lists.freedesktop.org, David Airlie <airlied@linux.ie>,
intel-gfx@lists.freedesktop.org, kbuild-all@01.org,
Rodrigo Vivi <rodrigo.vivi@intel.com>,
Thomas Gleixner <tglx@linutronix.de>,
kbuild test robot <fengguang.wu@intel.com>
Subject: Re: [PATCH] drm/i915: properly init lockdep class
Date: Wed, 13 Dec 2017 17:37:21 +0200 [thread overview]
Message-ID: <1513179441.5228.50.camel@linux.intel.com> (raw)
In-Reply-To: <20171213150635.2savpqd7urhyrnyl@linutronix.de>
On Wed, 2017-12-13 at 16:06 +0100, Sebastian Andrzej Siewior wrote:
> On 2017-12-13 16:00:49 [+0200], Joonas Lahtinen wrote:
> > On Thu, 2017-11-30 at 16:19 +0100, Sebastian Andrzej Siewior wrote:
> > > The code has an ifdef and uses two functions to either init the bare
> > > spinlock or init it and set a lock-class. It is possible to do the same
> > > thing without an ifdef.
> > > With this patch (in debug case) we first use the "default" lock class
> > > which is later overwritten to the supplied one. Without lockdep the set
> > > name/class function vanishes.
> > >
> > > Reported-by: kbuild test robot <fengguang.wu@intel.com>
> >
> > How exactly did kbuild test robot figure this out?
>
> I fixed it up for RT, then robot found a way to complain about it. Then
> I slapped myself for not submitting this patch in the first place.
Right, I was kinda wondering if the robot has gained consciuousness and
is developing new checks...
> > At least according to the source there doesn't seem to be clarity about
> > what is the right thing to do, this being just one option.
>
> I don' think `ifdef CONFIG_DEBUG_SPINLOCK' is an option. Especially
> since the i915 driver here is the only user in tree doing this kind of
> thing.
> Then we have lockdep_set_class_and_name() (which I promote here). This
> looks like the official way of doing lockdep related things and it has
> even more than ten users in tree.
I think it be worthwhile to suggest would be the addition of
__spin_lock_init where you can pass in the the lockclass and name.
Regards, Joonas
--
Joonas Lahtinen
Open Source Technology Center
Intel Corporation
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
next prev parent reply other threads:[~2017-12-13 15:37 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <201711250649.n1NUHo79%fengguang.wu@intel.com>
2017-11-30 15:19 ` [PATCH] drm/i915: properly init lockdep class Sebastian Andrzej Siewior
2017-12-13 14:00 ` Joonas Lahtinen
2017-12-13 15:06 ` Sebastian Andrzej Siewior
2017-12-13 15:37 ` Joonas Lahtinen [this message]
2017-12-13 17:36 ` Sebastian Andrzej Siewior
2017-12-13 18:40 ` Peter Zijlstra
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=1513179441.5228.50.camel@linux.intel.com \
--to=joonas.lahtinen@linux.intel.com \
--cc=airlied@linux.ie \
--cc=bigeasy@linutronix.de \
--cc=dri-devel@lists.freedesktop.org \
--cc=fengguang.wu@intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=kbuild-all@01.org \
--cc=rodrigo.vivi@intel.com \
--cc=tglx@linutronix.de \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.