[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAMpxmJWTyv=7GAN2KZH2yShG=0U6i8KaLd8dT71ROwE19EoCTQ@mail.gmail.com>
Date: Thu, 15 Sep 2016 16:08:52 +0200
From: Bartosz Golaszewski <bgolaszewski@...libre.com>
To: Peter Zijlstra <peterz@...radead.org>
Cc: Linus Walleij <linus.walleij@...aro.org>,
Alexandre Courbot <gnurou@...il.com>,
Ingo Molnar <mingo@...hat.com>,
LKML <linux-kernel@...r.kernel.org>,
linux-gpio <linux-gpio@...r.kernel.org>
Subject: Re: lockdep: incorrect deadlock warning with two GPIO expanders
2016-09-15 15:39 GMT+02:00 Peter Zijlstra <peterz@...radead.org>:
> On Thu, Sep 15, 2016 at 03:20:58PM +0200, Bartosz Golaszewski wrote:
>> 2016-09-15 14:41 GMT+02:00 Linus Walleij <linus.walleij@...aro.org>:
>> >> So can't you walk up that and see if you encounter the exact same driver
>> >> again?
>> >>
>> >> Something like:
>> >>
>> >> for (nr = 0, parent = dev->parent; parent; parent = parent->parent) {
>> >> if (parent->device_driver == &pca953x_driver.driver)
>> >> nr++;
>> >> }
>> >
>> > Oh clever. Of course.
>> >
>> > Bartosz can you try out this approach?
>> >
>>
>> I think it may be more complicated than that, depending on the hw
>> topology, but the general idea seems reasonable. I'll try this.
>
> Yeah, I figured there might be more to it.
>
> In any case, if this fails, we can always punt and simply count the
> total number of instances of this driver on the system and go with that.
>
But for __mutex_init() to work with the key argument you need to know
it at compile time, right?
Powered by blists - more mailing lists