Re: [PATCH] drm/i915: properly init lockdep class

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



+peterz
context: http://www.spinics.net/lists/intel-gfx/msg149011.html

On 2017-12-13 17:37:21 [+0200], Joonas Lahtinen wrote:
> 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.
…
> > > 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.

I don't due to the existing interface. However I don't call the shots
here and added peterz instead :)

> Regards, Joonas

Sebastian
_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/dri-devel




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux