From mboxrd@z Thu Jan 1 00:00:00 1970 From: Grygorii Strashko Subject: Re: [PATCH 1/3] pinctrl: single: Use a separate lockdep class Date: Tue, 8 Mar 2016 18:32:10 +0700 Message-ID: <56DEB83A.9070901@ti.com> References: <1454351299-27440-1-git-send-email-sudeep.holla@arm.com> <1454351299-27440-2-git-send-email-sudeep.holla@arm.com> Mime-Version: 1.0 Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: 7bit Return-path: Received: from bear.ext.ti.com ([192.94.94.41]:33047 "EHLO bear.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933148AbcCHLcx (ORCPT ); Tue, 8 Mar 2016 06:32:53 -0500 In-Reply-To: <1454351299-27440-2-git-send-email-sudeep.holla@arm.com> Sender: linux-gpio-owner@vger.kernel.org List-Id: linux-gpio@vger.kernel.org To: Sudeep Holla , linux-arm-kernel@lists.infradead.org, Tony Lindgren Cc: linux-omap@vger.kernel.org, linux-gpio@vger.kernel.org, Linus Walleij On 02/02/2016 01:28 AM, Sudeep Holla wrote: > The single pinmux controller can be cascaded to the other interrupt > controllers. Hence when propagating wake-up settings to its parent > interrupt controller, there's possiblity of detecting possible recursive > locking and getting lockdep warning. > > This patch avoids this false positive by using a separate lockdep class > for this single pinctrl interrupts. > > Cc: Linus Walleij > Cc: linux-gpio@vger.kernel.org > Suggested-by: Thomas Gleixner > Signed-off-by: Sudeep Holla > --- > drivers/pinctrl/pinctrl-single.c | 8 ++++++++ > 1 file changed, 8 insertions(+) > > diff --git a/drivers/pinctrl/pinctrl-single.c b/drivers/pinctrl/pinctrl-single.c > index d24e5f1d1525..fb126d56ad40 100644 > --- a/drivers/pinctrl/pinctrl-single.c > +++ b/drivers/pinctrl/pinctrl-single.c > @@ -255,6 +255,13 @@ static enum pin_config_param pcs_bias[] = { > }; > > /* > + * This lock class tells lockdep that irqchip core that this single > + * pinctrl can be in a different category than its parents, so it won't > + * report false recursion. > + */ > +static struct lock_class_key pcs_lock_class; > + > +/* > * REVISIT: Reads and writes could eventually use regmap or something > * generic. But at least on omaps, some mux registers are performance > * critical as they may need to be remuxed every time before and after > @@ -1713,6 +1720,7 @@ static int pcs_irqdomain_map(struct irq_domain *d, unsigned int irq, > irq_set_chip_data(irq, pcs_soc); > irq_set_chip_and_handler(irq, &pcs->chip, > handle_level_irq); > + irq_set_lockdep_class(irq, &pcs_lock_class); > irq_set_noprobe(irq); > > return 0; > I have no objection to this patch and it's independent from other patches in this series. Reviewed-by: Grygorii Strashko -- regards, -grygorii From mboxrd@z Thu Jan 1 00:00:00 1970 From: grygorii.strashko@ti.com (Grygorii Strashko) Date: Tue, 8 Mar 2016 18:32:10 +0700 Subject: [PATCH 1/3] pinctrl: single: Use a separate lockdep class In-Reply-To: <1454351299-27440-2-git-send-email-sudeep.holla@arm.com> References: <1454351299-27440-1-git-send-email-sudeep.holla@arm.com> <1454351299-27440-2-git-send-email-sudeep.holla@arm.com> Message-ID: <56DEB83A.9070901@ti.com> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org On 02/02/2016 01:28 AM, Sudeep Holla wrote: > The single pinmux controller can be cascaded to the other interrupt > controllers. Hence when propagating wake-up settings to its parent > interrupt controller, there's possiblity of detecting possible recursive > locking and getting lockdep warning. > > This patch avoids this false positive by using a separate lockdep class > for this single pinctrl interrupts. > > Cc: Linus Walleij > Cc: linux-gpio at vger.kernel.org > Suggested-by: Thomas Gleixner > Signed-off-by: Sudeep Holla > --- > drivers/pinctrl/pinctrl-single.c | 8 ++++++++ > 1 file changed, 8 insertions(+) > > diff --git a/drivers/pinctrl/pinctrl-single.c b/drivers/pinctrl/pinctrl-single.c > index d24e5f1d1525..fb126d56ad40 100644 > --- a/drivers/pinctrl/pinctrl-single.c > +++ b/drivers/pinctrl/pinctrl-single.c > @@ -255,6 +255,13 @@ static enum pin_config_param pcs_bias[] = { > }; > > /* > + * This lock class tells lockdep that irqchip core that this single > + * pinctrl can be in a different category than its parents, so it won't > + * report false recursion. > + */ > +static struct lock_class_key pcs_lock_class; > + > +/* > * REVISIT: Reads and writes could eventually use regmap or something > * generic. But at least on omaps, some mux registers are performance > * critical as they may need to be remuxed every time before and after > @@ -1713,6 +1720,7 @@ static int pcs_irqdomain_map(struct irq_domain *d, unsigned int irq, > irq_set_chip_data(irq, pcs_soc); > irq_set_chip_and_handler(irq, &pcs->chip, > handle_level_irq); > + irq_set_lockdep_class(irq, &pcs_lock_class); > irq_set_noprobe(irq); > > return 0; > I have no objection to this patch and it's independent from other patches in this series. Reviewed-by: Grygorii Strashko -- regards, -grygorii