linux_dsm_epyc7002/drivers/soc
Stephan Gerhold 8434925cd2 soc: qcom: smsm: Fix missed interrupts if state changes while masked
[ Upstream commit e3d4571955050736bbf3eda0a9538a09d9fcfce8 ]

The SMSM driver detects interrupt edges by tracking the last state
it has seen (and has triggered the interrupt handler for). This works
fine, but only if the interrupt does not change state while masked.

For example, if an interrupt is unmasked while the state is HIGH,
the stored last_value for that interrupt might still be LOW. Then,
when the remote processor triggers smsm_intr() we assume that nothing
has changed, even though the state might have changed from HIGH to LOW.

Attempt to fix this by checking the current remote state before
unmasking an IRQ. Use atomic operations to avoid the interrupt handler
from interfering with the unmask function.

This fixes modem crashes in some edge cases with the BAM-DMUX driver.
Specifically, the BAM-DMUX interrupt handler is not called for the
HIGH -> LOW smsm state transition if the BAM-DMUX driver is loaded
(and therefore unmasks the interrupt) after the modem was already started:

qcom-q6v5-mss 4080000.remoteproc: fatal error received: a2_task.c:3188:
  Assert FALSE failed: A2 DL PER deadlock timer expired waiting for Apps ACK

Fixes: c97c4090ff ("soc: qcom: smsm: Add driver for Qualcomm SMSM")
Signed-off-by: Stephan Gerhold <stephan@gerhold.net>
Link: https://lore.kernel.org/r/20210712135703.324748-2-stephan@gerhold.net
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-07-05 19:11:28 +02:00
..
actions soc: actions: include header to fix missing prototype 2020-09-22 12:45:16 +05:30
amlogic soc: amlogic: canvas: add missing put_device() call in meson_canvas_get() 2020-12-30 11:53:27 +01:00
aspeed soc: aspeed: fix a ternary sign expansion bug 2021-05-14 09:50:21 +02:00
atmel drivers: soc: atmel: add null entry at the end of at91_soc_allowed_list[] 2021-02-03 23:28:40 +01:00
bcm soc: bcm: brcmstb: biuctrl: Change RAC data line prefetching after 4 consecutive lines 2020-09-06 12:43:02 -07:00
dove
fsl soc/fsl: qbman: fix conflicting alignment attributes 2021-04-14 08:42:09 +02:00
gemini
imx ARM: imx: fix imx8m dependencies 2021-02-03 23:28:45 +01:00
ixp4xx soc: ixp4xx/qmgr: fix invalid __iomem access 2024-07-05 18:52:32 +02:00
kendryte riscv: K210: Add a built-in device tree 2020-05-18 11:38:06 -07:00
lantiq
mediatek soc / drm: mediatek: Move DDP component defines into mtk-mmsys.h 2024-07-05 18:55:45 +02:00
qcom soc: qcom: smsm: Fix missed interrupts if state changes while masked 2024-07-05 19:11:28 +02:00
realtek init: add dsm gpl source 2024-07-05 18:00:04 +02:00
renesas soc: renesas: rmobile-sysc: Fix some leaks in rmobile_init_pm_domains() 2020-12-30 11:52:56 +01:00
rockchip soc: rockchip: ROCKCHIP_GRF should not default to y, unconditionally 2024-07-05 19:10:44 +02:00
samsung soc: samsung: exynos-asv: handle reading revision register error 2021-03-04 11:38:32 +01:00
sifive soc: sifive: l2 cache: Mark l2_get_priv_group as static 2020-05-28 15:57:49 -07:00
sunxi soc: sunxi: sram: remove unneeded semicolon 2020-09-11 17:02:39 +02:00
tegra soc/tegra: fuse: Fix Tegra234-only builds 2021-07-25 14:36:15 +02:00
ti soc: ti: omap-prm: Fix occasional abort on reset deassert for dra7 iva 2021-03-30 14:31:56 +02:00
ux500 soc: ux500: Use custom soc attribute group instead of device_create_file 2020-07-06 09:48:06 +01:00
versatile soc: integrator: Drop pointless static qualifier in integrator_soc_init() 2020-08-20 08:57:05 +02:00
xilinx soc: xilinx: Fix error code in zynqmp_pm_probe() 2020-06-18 10:07:17 +02:00
zte
Kconfig init: add dsm gpl source 2024-07-05 18:00:04 +02:00
Makefile init: add dsm gpl source 2024-07-05 18:00:04 +02:00