tmp_suning_uos_patched/drivers/soc
Stephan Gerhold 17830b0415 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>
2021-09-15 09:50:37 +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 2021-08-12 13:22:18 +02:00
kendryte
lantiq
mediatek soc / drm: mediatek: Move DDP component defines into mtk-mmsys.h 2021-08-26 08:35:42 -04:00
qcom soc: qcom: smsm: Fix missed interrupts if state changes while masked 2021-09-15 09:50:37 +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 2021-09-15 09:50:31 +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
Makefile