public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
To: Bartosz Golaszewski <bgolaszewski@baylibre.com>
Cc: Linus Walleij <linus.walleij@linaro.org>,
	Alexandre Courbot <gnurou@gmail.com>,
	Ingo Molnar <mingo@redhat.com>,
	LKML <linux-kernel@vger.kernel.org>,
	linux-gpio <linux-gpio@vger.kernel.org>
Subject: Re: lockdep: incorrect deadlock warning with two GPIO expanders
Date: Thu, 15 Sep 2016 15:39:22 +0200	[thread overview]
Message-ID: <20160915133922.GE5016@twins.programming.kicks-ass.net> (raw)
In-Reply-To: <CAMpxmJV+qBF4OL2WejqhdR3StmU-yOWDXVN8jJPWVTiMOJQxjg@mail.gmail.com>

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@linaro.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.

  reply	other threads:[~2016-09-15 13:39 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-12 11:51 lockdep: incorrect deadlock warning with two GPIO expanders Bartosz Golaszewski
2016-09-12 12:09 ` Peter Zijlstra
2016-09-12 15:16   ` Bartosz Golaszewski
2016-09-12 15:33     ` Peter Zijlstra
2016-09-13 12:29       ` Linus Walleij
2016-09-15  7:51         ` Peter Zijlstra
2016-09-15 12:41           ` Linus Walleij
2016-09-15 13:20             ` Bartosz Golaszewski
2016-09-15 13:39               ` Peter Zijlstra [this message]
2016-09-15 14:08                 ` Bartosz Golaszewski
2016-09-15 14:38                   ` Peter Zijlstra
2016-09-15 15:23                     ` Bartosz Golaszewski
2016-09-16 10:56                 ` Peter Zijlstra
2016-09-16 11:14                   ` Bartosz Golaszewski
2016-09-16 12:00                     ` Bartosz Golaszewski
2016-09-16 14:21             ` Bartosz Golaszewski

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=20160915133922.GE5016@twins.programming.kicks-ass.net \
    --to=peterz@infradead.org \
    --cc=bgolaszewski@baylibre.com \
    --cc=gnurou@gmail.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.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