linux-gpio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] pinctrl: single: Use a separate lockdep class
@ 2015-11-27 17:20 Sudeep Holla
  2015-11-27 17:21 ` [PATCH 2/2] pinctrl: single: remove misuse of IRQF_NO_SUSPEND flag Sudeep Holla
  2015-12-01 14:06 ` [PATCH 1/2] pinctrl: single: Use a separate lockdep class Linus Walleij
  0 siblings, 2 replies; 29+ messages in thread
From: Sudeep Holla @ 2015-11-27 17:20 UTC (permalink / raw)
  To: Linus Walleij, linux-gpio; +Cc: Sudeep Holla, linux-kernel

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 <linus.walleij@linaro.org>
Cc: linux-gpio@vger.kernel.org
Suggested-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
---
 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 ef04b962c3d5..945a7d0f0704 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
@@ -1716,6 +1723,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;
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 29+ messages in thread

end of thread, other threads:[~2015-12-04 17:10 UTC | newest]

Thread overview: 29+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-11-27 17:20 [PATCH 1/2] pinctrl: single: Use a separate lockdep class Sudeep Holla
2015-11-27 17:21 ` [PATCH 2/2] pinctrl: single: remove misuse of IRQF_NO_SUSPEND flag Sudeep Holla
2015-12-01 14:06   ` Linus Walleij
2015-12-03 18:13     ` Tony Lindgren
2015-12-03 18:35       ` Grygorii Strashko
2015-12-03 21:37         ` Tony Lindgren
2015-12-04 10:44           ` Grygorii Strashko
2015-12-04 10:54             ` Sudeep Holla
2015-12-04 11:18               ` Grygorii Strashko
2015-12-04 11:21                 ` Sudeep Holla
2015-12-04 15:35             ` Tony Lindgren
2015-12-04 15:59               ` Grygorii Strashko
2015-12-04 16:11                 ` Sudeep Holla
2015-12-04 16:30                   ` Grygorii Strashko
2015-12-04 17:07                     ` Tony Lindgren
2015-12-04 17:09                 ` Tony Lindgren
2015-12-03 18:59       ` Sudeep Holla
2015-12-03 21:40         ` Tony Lindgren
2015-12-04 15:40           ` Tony Lindgren
2015-12-04 15:44             ` Sudeep Holla
2015-12-04 16:19               ` Grygorii Strashko
2015-12-04 16:26                 ` Sudeep Holla
2015-12-04 17:06                   ` Tony Lindgren
2015-12-04 16:15             ` Sudeep Holla
2015-12-04 17:10               ` Tony Lindgren
2015-12-01 14:06 ` [PATCH 1/2] pinctrl: single: Use a separate lockdep class Linus Walleij
2015-12-01 14:09   ` Sudeep Holla
2015-12-03 18:07     ` Tony Lindgren
2015-12-03 21:46       ` Tony Lindgren

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).