Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1484133

Re: lockdep: incorrect deadlock warning with two GPIO expanders

From Linus Walleij <linus.walleij@linaro.org>
Newsgroups linux.kernel
Subject Re: lockdep: incorrect deadlock warning with two GPIO expanders
Date 2016-09-15 14:50 +0200
Message-ID <shEh4-75Z-29@gated-at.bofh.it> (permalink)
References (1 earlier) <sgydI-35W-39@gated-at.bofh.it> <sgBbz-50s-3@gated-at.bofh.it> <sgBuW-58A-37@gated-at.bofh.it> <sgV0B-1M6-19@gated-at.bofh.it> <shzKp-4a4-17@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Thu, Sep 15, 2016 at 9:51 AM, Peter Zijlstra <peterz@infradead.org> wrote:
> On Tue, Sep 13, 2016 at 02:29:24PM +0200, Linus Walleij wrote:
>> On Mon, Sep 12, 2016 at 5:33 PM, Peter Zijlstra <peterz@infradead.org> wrote:
>> > On Mon, Sep 12, 2016 at 05:16:14PM +0200, Bartosz Golaszewski wrote:
>>
>> >> AFAIK there is no clean way to tell that a GPIO is used by an I2C
>> >> multiplexer at probe time. Linus, Alexandre could you confirm?
>>
>> Nominally, the GPIO descriptors are just abstract resources such
>> as regulators or clocks, they can be used for a lot but just like
>> a clock, regulator, dma channel etc does not know who is using
>> it and for what, it does not know this, no.
>>
>> > You cannot inspect the device tree while probing?
>>
>> Of course it *can* but we would end up encoding a special
>> case every time something like this happens, tied to just
>> device tree, then another bolt-on for ACPI etc.
>>
>> I have a hard time following the problem really, I'm
>> afraid I'm simply just not smart enough :(
>
> Why would this be DT or ACPI specific? Linux itself has a tree/graph of
> all busses and devices right? That's what all this drivers/base/ stuff
> is on about.
>
> 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?

Yours,
Linus Walleij

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

lockdep: incorrect deadlock warning with two GPIO expanders Bartosz Golaszewski <bgolaszewski@baylibre.com> - 2016-09-12 14:00 +0200
  Re: lockdep: incorrect deadlock warning with two GPIO expanders Peter Zijlstra <peterz@infradead.org> - 2016-09-12 14:10 +0200
    Re: lockdep: incorrect deadlock warning with two GPIO expanders Bartosz Golaszewski <bgolaszewski@baylibre.com> - 2016-09-12 17:20 +0200
      Re: lockdep: incorrect deadlock warning with two GPIO expanders Peter Zijlstra <peterz@infradead.org> - 2016-09-12 17:40 +0200
        Re: lockdep: incorrect deadlock warning with two GPIO expanders Linus Walleij <linus.walleij@linaro.org> - 2016-09-13 14:30 +0200
          Re: lockdep: incorrect deadlock warning with two GPIO expanders Peter Zijlstra <peterz@infradead.org> - 2016-09-15 10:00 +0200
            Re: lockdep: incorrect deadlock warning with two GPIO expanders Linus Walleij <linus.walleij@linaro.org> - 2016-09-15 14:50 +0200
              Re: lockdep: incorrect deadlock warning with two GPIO expanders Bartosz Golaszewski <bgolaszewski@baylibre.com> - 2016-09-15 15:30 +0200
                Re: lockdep: incorrect deadlock warning with two GPIO expanders Peter Zijlstra <peterz@infradead.org> - 2016-09-15 15:40 +0200
                Re: lockdep: incorrect deadlock warning with two GPIO expanders Bartosz Golaszewski <bgolaszewski@baylibre.com> - 2016-09-15 16:20 +0200
                Re: lockdep: incorrect deadlock warning with two GPIO expanders Peter Zijlstra <peterz@infradead.org> - 2016-09-15 16:40 +0200
                Re: lockdep: incorrect deadlock warning with two GPIO expanders Bartosz Golaszewski <bgolaszewski@baylibre.com> - 2016-09-15 17:30 +0200
                Re: lockdep: incorrect deadlock warning with two GPIO expanders Peter Zijlstra <peterz@infradead.org> - 2016-09-16 13:00 +0200
                Re: lockdep: incorrect deadlock warning with two GPIO expanders Bartosz Golaszewski <bgolaszewski@baylibre.com> - 2016-09-16 13:20 +0200
                Re: lockdep: incorrect deadlock warning with two GPIO expanders Bartosz Golaszewski <bgolaszewski@baylibre.com> - 2016-09-16 14:10 +0200
              Re: lockdep: incorrect deadlock warning with two GPIO expanders Bartosz Golaszewski <bgolaszewski@baylibre.com> - 2016-09-16 16:30 +0200

csiph-web