mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-01-22 07:53:11 -05:00
9860370c21
irq_chip functions may be called in raw spinlock context. Therefore, we
must also use a raw spinlock for our own internal locking.
This fixes the following lockdep splat:
[ 5.349336] =============================
[ 5.353349] [ BUG: Invalid wait context ]
[ 5.357361] 6.13.0-rc5+ #69 Tainted: G W
[ 5.363031] -----------------------------
[ 5.367045] kworker/u17:1/44 is trying to lock:
[ 5.371587] ffffff88018b02c0 (&chip->gpio_lock){....}-{3:3}, at: xgpio_irq_unmask (drivers/gpio/gpio-xilinx.c:433 (discriminator 8))
[ 5.380079] other info that might help us debug this:
[ 5.385138] context-{5:5}
[ 5.387762] 5 locks held by kworker/u17:1/44:
[ 5.392123] #0: ffffff8800014958 ((wq_completion)events_unbound){+.+.}-{0:0}, at: process_one_work (kernel/workqueue.c:3204)
[ 5.402260] #1: ffffffc082fcbdd8 (deferred_probe_work){+.+.}-{0:0}, at: process_one_work (kernel/workqueue.c:3205)
[ 5.411528] #2: ffffff880172c900 (&dev->mutex){....}-{4:4}, at: __device_attach (drivers/base/dd.c:1006)
[ 5.419929] #3: ffffff88039c8268 (request_class#2){+.+.}-{4:4}, at: __setup_irq (kernel/irq/internals.h:156 kernel/irq/manage.c:1596)
[ 5.428331] #4: ffffff88039c80c8 (lock_class#2){....}-{2:2}, at: __setup_irq (kernel/irq/manage.c:1614)
[ 5.436472] stack backtrace:
[ 5.439359] CPU: 2 UID: 0 PID: 44 Comm: kworker/u17:1 Tainted: G W 6.13.0-rc5+ #69
[ 5.448690] Tainted: [W]=WARN
[ 5.451656] Hardware name: xlnx,zynqmp (DT)
[ 5.455845] Workqueue: events_unbound deferred_probe_work_func
[ 5.461699] Call trace:
[ 5.464147] show_stack+0x18/0x24 C
[ 5.467821] dump_stack_lvl (lib/dump_stack.c:123)
[ 5.471501] dump_stack (lib/dump_stack.c:130)
[ 5.474824] __lock_acquire (kernel/locking/lockdep.c:4828 kernel/locking/lockdep.c:4898 kernel/locking/lockdep.c:5176)
[ 5.478758] lock_acquire (arch/arm64/include/asm/percpu.h:40 kernel/locking/lockdep.c:467 kernel/locking/lockdep.c:5851 kernel/locking/lockdep.c:5814)
[ 5.482429] _raw_spin_lock_irqsave (include/linux/spinlock_api_smp.h:111 kernel/locking/spinlock.c:162)
[ 5.486797] xgpio_irq_unmask (drivers/gpio/gpio-xilinx.c:433 (discriminator 8))
[ 5.490737] irq_enable (kernel/irq/internals.h:236 kernel/irq/chip.c:170 kernel/irq/chip.c:439 kernel/irq/chip.c:432 kernel/irq/chip.c:345)
[ 5.494060] __irq_startup (kernel/irq/internals.h:241 kernel/irq/chip.c:180 kernel/irq/chip.c:250)
[ 5.497645] irq_startup (kernel/irq/chip.c:270)
[ 5.501143] __setup_irq (kernel/irq/manage.c:1807)
[ 5.504728] request_threaded_irq (kernel/irq/manage.c:2208)
Fixes:
|
||
---|---|---|
.. | ||
gpio-74x164.c | ||
gpio-74xx-mmio.c | ||
gpio-104-dio-48e.c | ||
gpio-104-idi-48.c | ||
gpio-104-idio-16.c | ||
gpio-adnp.c | ||
gpio-adp5520.c | ||
gpio-adp5585.c | ||
gpio-aggregator.c | ||
gpio-altera-a10sr.c | ||
gpio-altera.c | ||
gpio-amd-fch.c | ||
gpio-amd8111.c | ||
gpio-amdpt.c | ||
gpio-arizona.c | ||
gpio-aspeed-sgpio.c | ||
gpio-aspeed.c | ||
gpio-ath79.c | ||
gpio-bcm-kona.c | ||
gpio-bd9571mwv.c | ||
gpio-bd71815.c | ||
gpio-bd71828.c | ||
gpio-brcmstb.c | ||
gpio-bt8xx.c | ||
gpio-cadence.c | ||
gpio-cgbc.c | ||
gpio-clps711x.c | ||
gpio-creg-snps.c | ||
gpio-cros-ec.c | ||
gpio-crystalcove.c | ||
gpio-cs5535.c | ||
gpio-da9052.c | ||
gpio-da9055.c | ||
gpio-davinci.c | ||
gpio-dln2.c | ||
gpio-ds4520.c | ||
gpio-dwapb.c | ||
gpio-eic-sprd.c | ||
gpio-elkhartlake.c | ||
gpio-em.c | ||
gpio-en7523.c | ||
gpio-ep93xx.c | ||
gpio-exar.c | ||
gpio-f7188x.c | ||
gpio-ftgpio010.c | ||
gpio-fxl6408.c | ||
gpio-ge.c | ||
gpio-gpio-mm.c | ||
gpio-graniterapids.c | ||
gpio-grgpio.c | ||
gpio-gw-pld.c | ||
gpio-hisi.c | ||
gpio-hlwd.c | ||
gpio-htc-egpio.c | ||
gpio-i8255.c | ||
gpio-i8255.h | ||
gpio-ich.c | ||
gpio-idio-16.c | ||
gpio-idio-16.h | ||
gpio-idt3243x.c | ||
gpio-imx-scu.c | ||
gpio-it87.c | ||
gpio-ixp4xx.c | ||
gpio-janz-ttl.c | ||
gpio-kempld.c | ||
gpio-latch.c | ||
gpio-ljca.c | ||
gpio-logicvc.c | ||
gpio-loongson-64bit.c | ||
gpio-loongson.c | ||
gpio-loongson1.c | ||
gpio-lp873x.c | ||
gpio-lp3943.c | ||
gpio-lp87565.c | ||
gpio-lpc18xx.c | ||
gpio-lpc32xx.c | ||
gpio-madera.c | ||
gpio-max730x.c | ||
gpio-max732x.c | ||
gpio-max3191x.c | ||
gpio-max7300.c | ||
gpio-max7301.c | ||
gpio-max77620.c | ||
gpio-max77650.c | ||
gpio-mb86s7x.c | ||
gpio-mc33880.c | ||
gpio-menz127.c | ||
gpio-merrifield.c | ||
gpio-ml-ioh.c | ||
gpio-mlxbf.c | ||
gpio-mlxbf2.c | ||
gpio-mlxbf3.c | ||
gpio-mm-lantiq.c | ||
gpio-mmio.c | ||
gpio-mockup.c | ||
gpio-moxtet.c | ||
gpio-mpc8xxx.c | ||
gpio-mpc5200.c | ||
gpio-mpfs.c | ||
gpio-mpsse.c | ||
gpio-msc313.c | ||
gpio-mt7621.c | ||
gpio-mvebu.c | ||
gpio-mxc.c | ||
gpio-mxs.c | ||
gpio-nomadik.c | ||
gpio-npcm-sgpio.c | ||
gpio-octeon.c | ||
gpio-omap.c | ||
gpio-palmas.c | ||
gpio-pca953x.c | ||
gpio-pca9570.c | ||
gpio-pcf857x.c | ||
gpio-pch.c | ||
gpio-pci-idio-16.c | ||
gpio-pcie-idio-24.c | ||
gpio-pisosr.c | ||
gpio-pl061.c | ||
gpio-pmic-eic-sprd.c | ||
gpio-pxa.c | ||
gpio-raspberrypi-exp.c | ||
gpio-rc5t583.c | ||
gpio-rcar.c | ||
gpio-rda.c | ||
gpio-rdc321x.c | ||
gpio-realtek-otto.c | ||
gpio-reg.c | ||
gpio-regmap.c | ||
gpio-rockchip.c | ||
gpio-rtd.c | ||
gpio-sa1100.c | ||
gpio-sama5d2-piobu.c | ||
gpio-sch.c | ||
gpio-sch311x.c | ||
gpio-sifive.c | ||
gpio-sim.c | ||
gpio-siox.c | ||
gpio-sl28cpld.c | ||
gpio-sloppy-logic-analyzer.c | ||
gpio-sodaville.c | ||
gpio-spear-spics.c | ||
gpio-sprd.c | ||
gpio-stmpe.c | ||
gpio-stp-xway.c | ||
gpio-syscon.c | ||
gpio-tangier.c | ||
gpio-tangier.h | ||
gpio-tb10x.c | ||
gpio-tc3589x.c | ||
gpio-tegra.c | ||
gpio-tegra186.c | ||
gpio-thunderx.c | ||
gpio-timberdale.c | ||
gpio-tn48m.c | ||
gpio-tpic2810.c | ||
gpio-tps6586x.c | ||
gpio-tps65086.c | ||
gpio-tps65218.c | ||
gpio-tps65219.c | ||
gpio-tps65910.c | ||
gpio-tps65912.c | ||
gpio-tps68470.c | ||
gpio-tqmx86.c | ||
gpio-ts4800.c | ||
gpio-ts4900.c | ||
gpio-ts5500.c | ||
gpio-twl4030.c | ||
gpio-twl6040.c | ||
gpio-uniphier.c | ||
gpio-vf610.c | ||
gpio-viperboard.c | ||
gpio-virtio.c | ||
gpio-virtuser.c | ||
gpio-visconti.c | ||
gpio-vx855.c | ||
gpio-wcd934x.c | ||
gpio-wcove.c | ||
gpio-winbond.c | ||
gpio-wm831x.c | ||
gpio-wm8350.c | ||
gpio-wm8994.c | ||
gpio-ws16c48.c | ||
gpio-xgene-sb.c | ||
gpio-xgene.c | ||
gpio-xgs-iproc.c | ||
gpio-xilinx.c | ||
gpio-xlp.c | ||
gpio-xra1403.c | ||
gpio-xtensa.c | ||
gpio-zevio.c | ||
gpio-zynq.c | ||
gpio-zynqmp-modepin.c | ||
gpiolib-acpi.c | ||
gpiolib-acpi.h | ||
gpiolib-cdev.c | ||
gpiolib-cdev.h | ||
gpiolib-devres.c | ||
gpiolib-legacy.c | ||
gpiolib-of.c | ||
gpiolib-of.h | ||
gpiolib-swnode.c | ||
gpiolib-swnode.h | ||
gpiolib-sysfs.c | ||
gpiolib-sysfs.h | ||
gpiolib.c | ||
gpiolib.h | ||
Kconfig | ||
Makefile | ||
TODO |