alistair23-linux/drivers/irqchip
Mark Salter b6dd4d83dc irqchip/gic-v3: Change pr_debug message to pr_devel
The pr_debug() in gic-v3 gic_send_sgi() can trigger a circular locking
warning:

 GICv3: CPU10: ICC_SGI1R_EL1 5000400
 ======================================================
 WARNING: possible circular locking dependency detected
 4.15.0+ #1 Tainted: G        W
 ------------------------------------------------------
 dynamic_debug01/1873 is trying to acquire lock:
  ((console_sem).lock){-...}, at: [<0000000099c891ec>] down_trylock+0x20/0x4c

 but task is already holding lock:
  (&rq->lock){-.-.}, at: [<00000000842e1587>] __task_rq_lock+0x54/0xdc

 which lock already depends on the new lock.

 the existing dependency chain (in reverse order) is:

 -> #2 (&rq->lock){-.-.}:
        __lock_acquire+0x3b4/0x6e0
        lock_acquire+0xf4/0x2a8
        _raw_spin_lock+0x4c/0x60
        task_fork_fair+0x3c/0x148
        sched_fork+0x10c/0x214
        copy_process.isra.32.part.33+0x4e8/0x14f0
        _do_fork+0xe8/0x78c
        kernel_thread+0x48/0x54
        rest_init+0x34/0x2a4
        start_kernel+0x45c/0x488

 -> #1 (&p->pi_lock){-.-.}:
        __lock_acquire+0x3b4/0x6e0
        lock_acquire+0xf4/0x2a8
        _raw_spin_lock_irqsave+0x58/0x70
        try_to_wake_up+0x48/0x600
        wake_up_process+0x28/0x34
        __up.isra.0+0x60/0x6c
        up+0x60/0x68
        __up_console_sem+0x4c/0x7c
        console_unlock+0x328/0x634
        vprintk_emit+0x25c/0x390
        dev_vprintk_emit+0xc4/0x1fc
        dev_printk_emit+0x88/0xa8
        __dev_printk+0x58/0x9c
        _dev_info+0x84/0xa8
        usb_new_device+0x100/0x474
        hub_port_connect+0x280/0x92c
        hub_event+0x740/0xa84
        process_one_work+0x240/0x70c
        worker_thread+0x60/0x400
        kthread+0x110/0x13c
        ret_from_fork+0x10/0x18

 -> #0 ((console_sem).lock){-...}:
        validate_chain.isra.34+0x6e4/0xa20
        __lock_acquire+0x3b4/0x6e0
        lock_acquire+0xf4/0x2a8
        _raw_spin_lock_irqsave+0x58/0x70
        down_trylock+0x20/0x4c
        __down_trylock_console_sem+0x3c/0x9c
        console_trylock+0x20/0xb0
        vprintk_emit+0x254/0x390
        vprintk_default+0x58/0x90
        vprintk_func+0xbc/0x164
        printk+0x80/0xa0
        __dynamic_pr_debug+0x84/0xac
        gic_raise_softirq+0x184/0x18c
        smp_cross_call+0xac/0x218
        smp_send_reschedule+0x3c/0x48
        resched_curr+0x60/0x9c
        check_preempt_curr+0x70/0xdc
        wake_up_new_task+0x310/0x470
        _do_fork+0x188/0x78c
        SyS_clone+0x44/0x50
        __sys_trace_return+0x0/0x4

 other info that might help us debug this:

 Chain exists of:
   (console_sem).lock --> &p->pi_lock --> &rq->lock

  Possible unsafe locking scenario:

        CPU0                    CPU1
        ----                    ----
   lock(&rq->lock);
                                lock(&p->pi_lock);
                                lock(&rq->lock);
   lock((console_sem).lock);

  *** DEADLOCK ***

 2 locks held by dynamic_debug01/1873:
  #0:  (&p->pi_lock){-.-.}, at: [<000000001366df53>] wake_up_new_task+0x40/0x470
  #1:  (&rq->lock){-.-.}, at: [<00000000842e1587>] __task_rq_lock+0x54/0xdc

 stack backtrace:
 CPU: 10 PID: 1873 Comm: dynamic_debug01 Tainted: G        W        4.15.0+ #1
 Hardware name: GIGABYTE R120-T34-00/MT30-GS2-00, BIOS T48 10/02/2017
 Call trace:
  dump_backtrace+0x0/0x188
  show_stack+0x24/0x2c
  dump_stack+0xa4/0xe0
  print_circular_bug.isra.31+0x29c/0x2b8
  check_prev_add.constprop.39+0x6c8/0x6dc
  validate_chain.isra.34+0x6e4/0xa20
  __lock_acquire+0x3b4/0x6e0
  lock_acquire+0xf4/0x2a8
  _raw_spin_lock_irqsave+0x58/0x70
  down_trylock+0x20/0x4c
  __down_trylock_console_sem+0x3c/0x9c
  console_trylock+0x20/0xb0
  vprintk_emit+0x254/0x390
  vprintk_default+0x58/0x90
  vprintk_func+0xbc/0x164
  printk+0x80/0xa0
  __dynamic_pr_debug+0x84/0xac
  gic_raise_softirq+0x184/0x18c
  smp_cross_call+0xac/0x218
  smp_send_reschedule+0x3c/0x48
  resched_curr+0x60/0x9c
  check_preempt_curr+0x70/0xdc
  wake_up_new_task+0x310/0x470
  _do_fork+0x188/0x78c
  SyS_clone+0x44/0x50
  __sys_trace_return+0x0/0x4
 GICv3: CPU0: ICC_SGI1R_EL1 12000

This could be fixed with printk_deferred() but that might lessen its
usefulness for debugging. So change it to pr_devel to keep it out of
production kernels. Developers working on gic-v3 can enable it as
needed in their kernels.

Signed-off-by: Mark Salter <msalter@redhat.com>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
2018-02-16 13:47:58 +00:00
..
alphascale_asm9260-icoll.h
exynos-combiner.c
irq-alpine-msi.c
irq-armada-370-xp.c irqchip updates for 4.14 2017-08-31 20:12:51 +02:00
irq-aspeed-i2c-ic.c irqchip/aspeed-i2c-ic: Fix return value check in aspeed_i2c_ic_of_init() 2017-10-19 11:22:43 +01:00
irq-aspeed-vic.c
irq-ath79-cpu.c
irq-ath79-misc.c
irq-atmel-aic-common.c irqchip/atmel-aic: Remove root argument from ->fixup() prototype 2017-07-04 11:10:37 +01:00
irq-atmel-aic-common.h irqchip/atmel-aic: Remove root argument from ->fixup() prototype 2017-07-04 11:10:37 +01:00
irq-atmel-aic.c irqchip/atmel-aic: Remove root argument from ->fixup() prototype 2017-07-04 11:10:37 +01:00
irq-atmel-aic5.c irqchip/atmel-aic: Remove root argument from ->fixup() prototype 2017-07-04 11:10:37 +01:00
irq-bcm2835.c irqchip: Convert to using %pOF instead of full_name 2017-08-23 10:09:28 +01:00
irq-bcm2836.c irqchip/irq-bcm2836: Add support for DT interrupt polarity 2018-01-04 11:12:39 +00:00
irq-bcm6345-l1.c irqchip/bcm-6345-l1: Report that effective affinity is a single target 2017-08-18 10:54:41 +02:00
irq-bcm7038-l1.c irqchip/bcm-7038-l1: Report that effective affinity is a single target 2017-08-18 10:54:42 +02:00
irq-bcm7120-l2.c irqchip/irq-bcm7120-l2: Use correct I/O accessors for irq_fwd_mask 2017-08-31 15:32:18 +01:00
irq-brcmstb-l2.c irqchip/brcmstb-l2: Add support for the BCM7271 L2 controller 2017-10-19 10:56:36 +01:00
irq-clps711x.c
irq-crossbar.c irqchip: Convert to using %pOF instead of full_name 2017-08-23 10:09:28 +01:00
irq-digicolor.c irqchip: Convert to using %pOF instead of full_name 2017-08-23 10:09:28 +01:00
irq-dw-apb-ictl.c irqchip: Convert to using %pOF instead of full_name 2017-08-23 10:09:28 +01:00
irq-eznps.c
irq-ftintc010.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
irq-gic-common.c irqchip/gic: Make quirks matching conditional on init return value 2017-10-19 11:22:38 +01:00
irq-gic-common.h irqchip/gic: Make quirks matching conditional on init return value 2017-10-19 11:22:38 +01:00
irq-gic-pm.c
irq-gic-realview.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
irq-gic-v2m.c
irq-gic-v3-its-pci-msi.c irqchip: Convert to using %pOF instead of full_name 2017-08-23 10:09:28 +01:00
irq-gic-v3-its-platform-msi.c irqchip/gic-v3-its-platform-msi: Fix msi-parent parsing loop 2017-08-10 16:26:54 +01:00
irq-gic-v3-its.c genirq/irqdomain: Rename early argument of irq_domain_activate_irq() 2017-12-29 21:13:04 +01:00
irq-gic-v3.c irqchip/gic-v3: Change pr_debug message to pr_devel 2018-02-16 13:47:58 +00:00
irq-gic-v4.c irqchip/gic-v4: Clear IRQ_DISABLE_UNLAZY again if mapping fails 2017-11-10 09:50:36 +00:00
irq-gic.c First batch of KVM changes for 4.15 2017-11-16 13:00:24 -08:00
irq-goldfish-pic.c irqchip/irq-goldfish-pic: Add Goldfish PIC driver 2018-01-04 11:14:04 +00:00
irq-hip04.c irqchip/hip04: Report that effective affinity is a single target 2017-08-18 10:54:42 +02:00
irq-i8259.c irqchip/i8259: Set I/O port resource types correctly 2017-12-18 23:07:46 -06:00
irq-imgpdc.c irqchip/imgpdc: Use resource_size function on resource object 2017-11-23 20:09:12 +01:00
irq-imx-gpcv2.c irqchip: Convert to using %pOF instead of full_name 2017-08-23 10:09:28 +01:00
irq-ingenic.c
irq-jcore-aic.c
irq-keystone.c
irq-lpc32xx.c irqchip: Convert to using %pOF instead of full_name 2017-08-23 10:09:28 +01:00
irq-ls-scfg-msi.c irqchip/ls-scfg-msi: Add LS1012a MSI support 2017-10-11 13:48:19 -05:00
irq-mbigen.c
irq-meson-gpio.c irqchip/meson-gpio: add support for Meson8 SoCs 2017-11-02 15:55:45 +00:00
irq-metag-ext.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
irq-metag.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
irq-mips-cpu.c MIPS: Unify checks for sibling CPUs 2017-08-30 00:57:27 +02:00
irq-mips-gic.c irqchip/mips-gic: Avoid spuriously handling masked interrupts 2018-02-16 13:47:58 +00:00
irq-mmp.c irqchip/mmp: Make mmp_intc_conf const 2017-08-31 15:31:43 +01:00
irq-mtk-cirq.c
irq-mtk-sysirq.c irqchip: Convert to using %pOF instead of full_name 2017-08-23 10:09:28 +01:00
irq-mvebu-gicp.c irqchip/irq-mvebu-gicp: Add missing spin_lock init 2017-11-01 00:35:18 +01:00
irq-mvebu-gicp.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
irq-mvebu-icu.c
irq-mvebu-odmi.c
irq-mvebu-pic.c
irq-mxs.c irqchip: Convert to using %pOF instead of full_name 2017-08-23 10:09:28 +01:00
irq-nvic.c
irq-omap-intc.c irqchip/irq-omap-intc: Do not statically initialize variables 2017-10-16 21:05:14 +02:00
irq-ompic.c irqchip/ompic: fix return value check in ompic_of_init() 2018-01-04 11:13:22 +00:00
irq-or1k-pic.c irqchip/or1k-pic: Fix interrupt acknowledgement 2017-06-30 15:33:11 +01:00
irq-orion.c
irq-partition-percpu.c
irq-pic32-evic.c
irq-renesas-h8s.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
irq-renesas-h8300h.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
irq-renesas-intc-irqpin.c kernel/irq: Extend lockdep class for request mutex 2017-12-28 12:26:35 +01:00
irq-renesas-irqc.c
irq-s3c24xx.c irqchip/s3c24xx: pr_err() strings should end with newlines 2017-11-13 14:35:08 +00:00
irq-sa11x0.c
irq-sirfsoc.c
irq-sni-exiu.c irqchip/exiu: Fix return value check in exiu_init() 2017-11-14 11:27:22 +01:00
irq-st.c
irq-stm32-exti.c irqchip/stm32: Fix copyright 2018-01-29 16:24:53 +01:00
irq-sun4i.c irqchip: Convert to using %pOF instead of full_name 2017-08-23 10:09:28 +01:00
irq-sunxi-nmi.c
irq-tango.c irqchip/tango: Use irq_gc_mask_disable_and_ack_set 2017-10-13 16:31:05 +01:00
irq-tb10x.c
irq-tegra.c irqchip: Convert to using %pOF instead of full_name 2017-08-23 10:09:28 +01:00
irq-ts4800.c
irq-uniphier-aidet.c irqchip: Add UniPhier AIDET irqchip driver 2017-08-23 10:08:44 +01:00
irq-versatile-fpga.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
irq-vf610-mscm-ir.c
irq-vic.c
irq-vt8500.c
irq-xilinx-intc.c irqchip: Convert to using %pOF instead of full_name 2017-08-23 10:09:28 +01:00
irq-xtensa-mx.c irqchip/xtensa-mx: Report that effective affinity is a single target 2017-08-18 10:54:43 +02:00
irq-xtensa-pic.c
irq-zevio.c
irqchip.c
Kconfig irqchip/irq-goldfish-pic: Add Goldfish PIC driver 2018-01-04 11:14:04 +00:00
Makefile irqchip/irq-goldfish-pic: Add Goldfish PIC driver 2018-01-04 11:14:04 +00:00
qcom-irq-combiner.c irqchip/qcom: Fix u32 comparison with value less than zero 2017-11-23 20:03:58 +01:00
spear-shirq.c