irqchip/renesas-intc-irqpin: Use a separate lockdep class
The renesas-intc-irqpin interrupt controller is cascaded to the GIC.
Hence when propagating wake-up settings to its parent interrupt
controller, the following lockdep warning is printed:
=============================================
[ INFO: possible recursive locking detected ]
4.2.0-armadillo-10725-g50fcd7643c034198 #781 Not tainted
---------------------------------------------
s2ram/1179 is trying to acquire lock:
(&irq_desc_lock_class){-.-...}, at: [<
c005bb54>] __irq_get_desc_lock+0x78/0x94
but task is already holding lock:
(&irq_desc_lock_class){-.-...}, at: [<
c005bb54>] __irq_get_desc_lock+0x78/0x94
other info that might help us debug this:
Possible unsafe locking scenario:
CPU0
----
lock(&irq_desc_lock_class);
lock(&irq_desc_lock_class);
*** DEADLOCK ***
May be due to missing lock nesting notation
7 locks held by s2ram/1179:
#0: (sb_writers#7){.+.+.+}, at: [<
c00c9708>] __sb_start_write+0x64/0xb8
#1: (&of->mutex){+.+.+.}, at: [<
c0125a00>] kernfs_fop_write+0x78/0x1a0
#2: (s_active#23){.+.+.+}, at: [<
c0125a08>] kernfs_fop_write+0x80/0x1a0
#3: (autosleep_lock){+.+.+.}, at: [<
c0058244>] pm_autosleep_lock+0x18/0x20
#4: (pm_mutex){+.+.+.}, at: [<
c0057e50>] pm_suspend+0x54/0x248
#5: (&dev->mutex){......}, at: [<
c0243a20>] __device_suspend+0xdc/0x240
#6: (&irq_desc_lock_class){-.-...}, at: [<
c005bb54>] __irq_get_desc_lock+0x78/0x94
stack backtrace:
CPU: 0 PID: 1179 Comm: s2ram Not tainted 4.2.0-armadillo-10725-g50fcd7643c034198
Hardware name: Generic R8A7740 (Flattened Device Tree)
[<
c00129f4>] (dump_backtrace) from [<
c0012bec>] (show_stack+0x18/0x1c)
[<
c0012bd4>] (show_stack) from [<
c03f5d94>] (dump_stack+0x20/0x28)
[<
c03f5d74>] (dump_stack) from [<
c00514d4>] (__lock_acquire+0x67c/0x1b88)
[<
c0050e58>] (__lock_acquire) from [<
c0052df8>] (lock_acquire+0x9c/0xbc)
[<
c0052d5c>] (lock_acquire) from [<
c03fb068>] (_raw_spin_lock_irqsave+0x44/0x58)
[<
c03fb024>] (_raw_spin_lock_irqsave) from [<
c005bb54>] (__irq_get_desc_lock+0x78/0x94
[<
c005badc>] (__irq_get_desc_lock) from [<
c005c3d8>] (irq_set_irq_wake+0x28/0x100)
[<
c005c3b0>] (irq_set_irq_wake) from [<
c01e50d0>] (intc_irqpin_irq_set_wake+0x24/0x4c)
[<
c01e50ac>] (intc_irqpin_irq_set_wake) from [<
c005c17c>] (set_irq_wake_real+0x3c/0x50
[<
c005c140>] (set_irq_wake_real) from [<
c005c414>] (irq_set_irq_wake+0x64/0x100)
[<
c005c3b0>] (irq_set_irq_wake) from [<
c02a19b4>] (gpio_keys_suspend+0x60/0xa0)
[<
c02a1954>] (gpio_keys_suspend) from [<
c023b750>] (platform_pm_suspend+0x3c/0x5c)
Avoid this false positive by using a separate lockdep class for INTC
External IRQ Pin interrupts.
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Cc: Grygorii Strashko <grygorii.strashko@ti.com>
Cc: Magnus Damm <magnus.damm@gmail.com>
Cc: Jason Cooper <jason@lakedaemon.net>
Link: http://lkml.kernel.org/r/1441798974-25716-3-git-send-email-geert%2Brenesas@glider.be
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>