1
0
Fork 0
alistair23-linux/drivers/mailbox
Daniel Baluta 99472d43f4 mailbox: imx: Fix Tx doorbell shutdown path
[ Upstream commit bf159d151a ]

Tx doorbell is handled by txdb_tasklet and doesn't
have an associated IRQ.

Anyhow, imx_mu_shutdown ignores this and tries to
free an IRQ that wasn't requested for Tx DB resulting
in the following warning:

[    1.967644] Trying to free already-free IRQ 26
[    1.972108] WARNING: CPU: 2 PID: 157 at kernel/irq/manage.c:1708 __free_irq+0xc0/0x358
[    1.980024] Modules linked in:
[    1.983088] CPU: 2 PID: 157 Comm: kworker/2:1 Tainted: G
[    1.993524] Hardware name: Freescale i.MX8QXP MEK (DT)
[    1.998668] Workqueue: events deferred_probe_work_func
[    2.003812] pstate: 60000085 (nZCv daIf -PAN -UAO)
[    2.008607] pc : __free_irq+0xc0/0x358
[    2.012364] lr : __free_irq+0xc0/0x358
[    2.016111] sp : ffff00001179b7e0
[    2.019422] x29: ffff00001179b7e0 x28: 0000000000000018
[    2.024736] x27: ffff000011233000 x26: 0000000000000004
[    2.030053] x25: 000000000000001a x24: ffff80083bec74d4
[    2.035369] x23: 0000000000000000 x22: ffff80083bec7588
[    2.040686] x21: ffff80083b1fe8d8 x20: ffff80083bec7400
[    2.046003] x19: 0000000000000000 x18: ffffffffffffffff
[    2.051320] x17: 0000000000000000 x16: 0000000000000000
[    2.056637] x15: ffff0000111296c8 x14: ffff00009179b517
[    2.061953] x13: ffff00001179b525 x12: ffff000011142000
[    2.067270] x11: ffff000011129f20 x10: ffff0000105da970
[    2.072587] x9 : 00000000ffffffd0 x8 : 0000000000000194
[    2.077903] x7 : 612065657266206f x6 : ffff0000111e7b09
[    2.083220] x5 : 0000000000000003 x4 : 0000000000000000
[    2.088537] x3 : 0000000000000000 x2 : 00000000ffffffff
[    2.093854] x1 : 28b70f0a2b60a500 x0 : 0000000000000000
[    2.099173] Call trace:
[    2.101618]  __free_irq+0xc0/0x358
[    2.105021]  free_irq+0x38/0x98
[    2.108170]  imx_mu_shutdown+0x90/0xb0
[    2.111921]  mbox_free_channel.part.2+0x24/0xb8
[    2.116453]  mbox_free_channel+0x18/0x28

This bug is present from the beginning of times.

Cc: Oleksij Rempel <o.rempel@pengutronix.de>
Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
Signed-off-by: Richard Zhu <hongxing.zhu@nxp.com>
Reviewed-by: Dong Aisheng <aisheng.dong@nxp.com>
Signed-off-by: Jassi Brar <jaswinder.singh@linaro.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-01-04 19:18:30 +01:00
..
Kconfig mailbox: omap: Add support for TI K3 SoCs 2019-07-10 23:08:44 -05:00
Makefile mailbox: Add support for Armada 37xx rWTM mailbox 2019-05-09 00:41:00 -05:00
arm_mhu.c mailbox: arm_mhu: reorder header inclusion and drop unneeded ones 2019-07-10 23:08:43 -05:00
armada-37xx-rwtm-mailbox.c mailbox: armada-37xx-rwtm: Use device-managed registration API 2019-09-17 00:38:43 -05:00
bcm-flexrm-mailbox.c - stm32: race fix by adding a spinlock 2019-07-14 16:36:51 -07:00
bcm-pdc-mailbox.c Driver Core and debugfs changes for 5.3-rc1 2019-07-12 12:24:03 -07:00
bcm2835-mailbox.c mailbox: bcm2835: Use device-managed registration API 2018-12-21 16:49:25 -06:00
hi3660-mailbox.c mailbox: hi3660: Use device-managed registration API 2018-12-21 16:49:25 -06:00
hi6220-mailbox.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 285 2019-06-05 17:36:37 +02:00
imx-mailbox.c mailbox: imx: Fix Tx doorbell shutdown path 2020-01-04 19:18:30 +01:00
mailbox-altera.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 201 2019-05-30 11:29:52 -07:00
mailbox-sti.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
mailbox-test.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
mailbox-xgene-slimpro.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 13 2019-05-21 11:28:45 +02:00
mailbox.c mailbox: handle failed named mailbox channel request 2019-07-11 10:19:00 -05:00
mailbox.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
mtk-cmdq-mailbox.c mailbox: mediatek: cmdq: clear the event in cmdq initial flow 2019-09-17 00:40:05 -05:00
omap-mailbox.c mailbox: omap: Add support for TI K3 SoCs 2019-07-10 23:08:44 -05:00
pcc.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 157 2019-05-30 11:26:37 -07:00
pl320-ipc.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 201 2019-05-30 11:29:52 -07:00
platform_mhu.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 285 2019-06-05 17:36:37 +02:00
qcom-apcs-ipc-mailbox.c mailbox: qcom-apcs: fix max_register value 2019-09-17 00:54:29 -05:00
rockchip-mailbox.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 288 2019-06-05 17:36:37 +02:00
stm32-ipcc.c mailbox: stm32_ipcc: add spinlock to fix channels concurrent access 2019-07-10 23:08:43 -05:00
tegra-hsp.c mailbox: tegra: Fix superfluous IRQ error message 2019-12-13 08:42:19 +01:00
ti-msgmgr.c mailbox: ti-msgmgr: Use device-managed registration API 2018-12-21 16:49:26 -06:00
zynqmp-ipi-mailbox.c mailbox: ZynqMP IPI mailbox controller 2019-03-06 20:34:20 -06:00