linux/drivers/irqchip
Geert Uytterhoeven 769b5cf78e 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>
2015-09-15 17:06:29 +02:00
..
exynos-combiner.c drivers/irqchip: Replace pr_warning by pr_warn 2015-07-22 18:37:42 +02:00
irq-armada-370-xp.c irqchip: Use irq_desc_get_xxx() to avoid redundant lookup of irq_desc 2015-07-11 23:14:27 +02:00
irq-atmel-aic5.c irqchip: Appropriate __init annotation for const data 2015-07-27 08:09:38 +02:00
irq-atmel-aic-common.c irqchip: atmel-aic-common: Prevent clobbering of priority when changing IRQ type 2015-01-07 12:41:45 +00:00
irq-atmel-aic-common.h irqchip: atmel-aic: Add irq fixup for RTT block 2014-11-09 04:36:38 +00:00
irq-atmel-aic.c irqchip: Appropriate __init annotation for const data 2015-07-27 08:09:38 +02:00
irq-bcm2835.c irqchip/bcm2835: Add support for being used as a second level controller 2015-08-20 22:38:41 +02:00
irq-bcm2836.c irqchip: Add bcm2836 interrupt controller for Raspberry Pi 2 2015-08-20 22:38:42 +02:00
irq-bcm7038-l1.c irqchip/bcm7038-l1: Consolidate chained IRQ handler install/remove 2015-07-11 23:14:25 +02:00
irq-bcm7120-l2.c irqchip/bcm7120-l2: Fix interrupt status for multiple parent IRQs 2015-07-27 08:09:38 +02:00
irq-brcmstb-l2.c irqchip/brcmstb-l2: Prepare brcmstb_l2_intc_irq_handle for irq argument removal 2015-07-16 22:53:22 +02:00
irq-clps711x.c irqchip: Prepare for local stub header removal 2015-07-11 23:14:23 +02:00
irq-crossbar.c Merge branch 'irq-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2015-09-01 14:33:35 -07:00
irq-digicolor.c irqchip: Prepare for local stub header removal 2015-07-11 23:14:23 +02:00
irq-dw-apb-ictl.c irqchip: Prepare for local stub header removal 2015-07-11 23:14:23 +02:00
irq-gic-common.c irqchip: gic: Simplify gic_configure_irq by using IRQCHIP_SET_TYPE_MASKED 2015-06-05 22:26:33 +02:00
irq-gic-common.h irqchip: gic: Allow interrupt level to be set for PPIs 2015-01-26 11:38:23 +01:00
irq-gic-v2m.c irqchip/GICv2m: Fix GICv2m build warning on 32 bits 2015-09-15 17:06:29 +02:00
irq-gic-v3-its-pci-msi.c irqchip/gicv3-its: Make the PCI/MSI code standalone 2015-07-30 00:14:38 +02:00
irq-gic-v3-its-platform-msi.c irqchip/gicv3-its: Add platform MSI support 2015-07-30 00:14:38 +02:00
irq-gic-v3-its.c irqchip/gic-v3-its: Add missing cache flushes 2015-09-15 17:06:29 +02:00
irq-gic-v3.c irqchip/GICv3: Don't deactivate interrupts forwarded to a guest 2015-08-27 17:13:49 +02:00
irq-gic.c irqchip/GIC: Add workaround for aliased GIC400 2015-09-15 17:06:29 +02:00
irq-hip04.c irqchip/gic: Enable SKIP_SET_WAKE and MASK_ON_SUSPEND 2015-07-27 08:09:37 +02:00
irq-i8259.c irqchip/i8259: Prepare i8259_irq_dispatch for irq argument removal 2015-07-31 22:20:04 +02:00
irq-imgpdc.c irqchip/imgpdc: Prepare pdc_intc_perip_isr for irq argument removal 2015-07-16 22:53:22 +02:00
irq-imx-gpcv2.c irqchip/imx-gpcv2: IMX GPCv2 driver for wakeup sources 2015-08-24 21:49:34 +02:00
irq-ingenic.c irqchip: Prepare for local stub header removal 2015-07-11 23:14:23 +02:00
irq-keystone.c irqchip/keystone: Prepare keystone_irq_handler for irq argument removal 2015-07-16 22:53:22 +02:00
irq-metag-ext.c irqchip/metag-ext: Use irq_set_chip_handler_name_locked() 2015-07-12 09:39:11 +02:00
irq-metag.c irqchip/metag: Consolidate chained IRQ handler install/remove 2015-07-11 23:14:26 +02:00
irq-mips-cpu.c irqchip: Prepare for local stub header removal 2015-07-11 23:14:23 +02:00
irq-mips-gic.c Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus 2015-09-03 16:55:55 -07:00
irq-mmp.c irqchip/mmp: Prepare icu_mux_irq_demux for irq argument removal 2015-07-16 22:53:22 +02:00
irq-moxart.c irqchip: Prepare for local stub header removal 2015-07-11 23:14:23 +02:00
irq-mtk-sysirq.c irqchip: Prepare for local stub header removal 2015-07-11 23:14:23 +02:00
irq-mxs.c irqchip: Prepare for local stub header removal 2015-07-11 23:14:23 +02:00
irq-nvic.c irqchip: Prepare for local stub header removal 2015-07-11 23:14:23 +02:00
irq-omap-intc.c irqchip: omap-intc: Improve IRQ handler 2015-07-22 18:37:42 +02:00
irq-or1k-pic.c irqchip: Prepare for local stub header removal 2015-07-11 23:14:23 +02:00
irq-orion.c irqchip: Use irq_desc_get_xxx() to avoid redundant lookup of irq_desc 2015-07-11 23:14:27 +02:00
irq-renesas-h8s.c irqchip: Prepare for local stub header removal 2015-07-11 23:14:23 +02:00
irq-renesas-h8300h.c irqchip: Prepare for local stub header removal 2015-07-11 23:14:23 +02:00
irq-renesas-intc-irqpin.c irqchip/renesas-intc-irqpin: Use a separate lockdep class 2015-09-15 17:06:29 +02:00
irq-renesas-irqc.c irqchip/renesas-irqc: Use a separate lockdep class 2015-09-15 17:06:29 +02:00
irq-s3c24xx.c irqchip/s3c24xx: Prepare s3c_irq_demux for irq argument removal 2015-07-16 22:53:22 +02:00
irq-sa11x0.c ARM: kill off set_irq_flags usage 2015-07-28 13:58:13 +02:00
irq-sirfsoc.c irqchip: Prepare for local stub header removal 2015-07-11 23:14:23 +02:00
irq-st.c irqchip: st: Supply new driver for STi based devices 2015-03-03 19:48:53 +00:00
irq-sun4i.c irqchip: Prepare for local stub header removal 2015-07-11 23:14:23 +02:00
irq-sunxi-nmi.c irqchip: Use irq_desc_get_xxx() to avoid redundant lookup of irq_desc 2015-07-11 23:14:27 +02:00
irq-tb10x.c irqchip/tb10x: Prepare tb10x_irq_cascade for irq argument removal 2015-07-16 22:53:22 +02:00
irq-tegra.c irqchip: Prepare for local stub header removal 2015-07-11 23:14:23 +02:00
irq-versatile-fpga.c irqchip/versatile-fpga: Prepare fpga_irq_handle for irq argument removal 2015-07-16 22:53:23 +02:00
irq-vf610-mscm-ir.c irqchip: Prepare for local stub header removal 2015-07-11 23:14:23 +02:00
irq-vic.c irqchip/vic: Consolidate chained IRQ handler install/remove 2015-07-11 23:14:27 +02:00
irq-vt8500.c irqchip/vt8500: Use irq_set_handler_locked() 2015-07-12 09:37:47 +02:00
irq-xtensa-mx.c irqchip: Prepare for local stub header removal 2015-07-11 23:14:23 +02:00
irq-xtensa-pic.c irqchip: Prepare for local stub header removal 2015-07-11 23:14:23 +02:00
irq-zevio.c irqchip: Prepare for local stub header removal 2015-07-11 23:14:23 +02:00
irqchip.c irqchip: Add GICv2 specific ACPI boot support 2015-03-26 15:13:07 +00:00
Kconfig irqchip/imx-gpcv2: IMX GPCv2 driver for wakeup sources 2015-08-24 21:49:34 +02:00
Makefile irqchip/imx-gpcv2: IMX GPCv2 driver for wakeup sources 2015-08-24 21:49:34 +02:00
spear-shirq.c Merge branch 'linus' into irq/core 2015-07-30 00:13:24 +02:00