linux/sound/soc/sof/intel
Peter Ujfalusi 3b2f36068c ASoC: SOF: Intel: hda-dsp: Make sure that no irq handler is pending before suspend
[ Upstream commit 576a0b71b5 ]

In the existing IPC support, the reply to each IPC message is handled in
an IRQ thread. The assumption is that the IRQ thread is scheduled without
significant delays.

On an experimental (iow, buggy) kernel, the IRQ thread dealing with the
reply to the last IPC message before powering-down the DSP can be delayed
by several seconds. The IRQ thread will proceed with register accesses
after the DSP is powered-down which results in a kernel crash.

While the bug which causes the delay is not in the audio stack, we must
handle such cases with defensive programming to avoid such crashes.

Call synchronize_irq() before proceeding to power down the DSP to make
sure that no irq thread is pending execution.

Closes: https://github.com/thesofproject/linux/issues/4608
Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20231012191850.147140-3-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
History 2024-08-29 17:33:28 +02:00
..
apl.c ASoC: SOF: Intel: Split the set_power_op for IPC3 and IPC4 2023-04-20 12:52:02 +01:00
atom.c ASoC: SOF: Intel: atom: don't keep a temporary string in fixup_tplg_name 2022-07-15 20:11:35 +01:00
atom.h ASoC: SOF: avoid casting "const" attribute away 2021-12-17 11:06:16 +00:00
bdw.c ASoC: SOF: Intel: use mmio fallback for all platforms 2022-10-26 14:17:53 +01:00
byt.c ASoC: SOF: Intel: use mmio fallback for all platforms 2022-10-26 14:17:53 +01:00
cnl.c ASoC: SOF: Intel: add abstraction for SoundWire wake-ups 2023-08-07 23:09:45 +01:00
ext_manifest.h ASoC: SOF: ext_manifest: parse cavs extra config data elem 2020-11-27 17:23:05 +00:00
hda-bus.c ASoC: SOF: Intel: clarify initialization when HDA_AUDIO_CODEC is not used 2023-05-15 20:14:00 +09:00
hda-codec.c ASoC: SOF: Intel: hda-codec: Delay the codec device registration 2024-01-20 11:51:47 +01:00
hda-common-ops.c ASoC: SOF: Intel: Split the set_power_op for IPC3 and IPC4 2023-04-20 12:52:02 +01:00
hda-ctrl.c ASoC: SOF: Intel: hda-mlink: move to a dedicated module 2023-04-06 16:45:37 +01:00
hda-dai-ops.c ASoC: Merge up fixes 2023-08-10 00:19:02 +01:00
hda-dai.c ASoC: SOF: Intel: hda: fix null deref on system suspend entry 2024-07-18 13:21:15 +02:00
hda-dsp.c ASoC: SOF: Intel: hda-dsp: Make sure that no irq handler is pending before suspend 2024-08-29 17:33:28 +02:00
hda-ipc.c ASoC: SOF: Intel: hda: make DSPless mode work with DSP disabled in BIOS 2023-04-04 12:42:37 +01:00
hda-ipc.h ASoC: SOF: Intel: cnl: Add separate ops for ipc_dump for IPC4 2022-09-23 14:53:17 +01:00
hda-loader-skl.c ASoC: do not include pm_runtime.h if not used 2023-05-23 13:55:55 +01:00
hda-loader.c ASoC: SOF: Use no_reply calls for TX 2023-04-20 12:51:45 +01:00
hda-mlink.c ASoC: SOF: Intel: hda-mlink: add sublink to dev_dbg() log 2023-08-07 23:09:48 +01:00
hda-pcm.c ASoC: SOF: Intel: hda-pcm: Limit the maximum number of periods by MAX_BDL_ENTRIES 2024-07-25 09:50:55 +02:00
hda-probes.c ASoC: SOF: probes: rename assign/free callbacks as startup/shutdown 2022-07-15 20:11:38 +01:00
hda-stream.c ASoC: SOF: Intel: Refactor code for HDA stream creation 2023-08-15 13:54:56 +01:00
hda-trace.c ASoC: SOF: Modify the host trace_init parameter list to include dmab 2022-05-19 16:44:17 +01:00
hda.c ASoC: SOF: Intel: Initialize chip in hda_sdw_check_wakeen_irq() 2023-08-10 00:27:23 +01:00
hda.h ASoC: SOF: Intel: pci-mtl: fix ARL-S definitions 2024-06-12 11:11:59 +02:00
icl.c ASoC: SOF: Intel: add abstraction for SoundWire wake-ups 2023-08-07 23:09:45 +01:00
Kconfig ASoC: SOF: Intel: LNL: Add support for Lunarlake platform 2023-08-07 23:09:35 +01:00
lnl.c ASoC: SOF: Intel: lnl: Correct rom_status_reg 2024-06-12 11:11:59 +02:00
lnl.h ASoC: SOF: Intel: lnl: Correct rom_status_reg 2024-06-12 11:11:59 +02:00
Makefile ASoC: SOF: Intel: LNL: Add support for Lunarlake platform 2023-08-07 23:09:35 +01:00
mtl.c ASoC: SOF: Intel: mtl: Implement firmware boot state check 2024-06-12 11:12:00 +02:00
mtl.h ASoC: SOF: Intel: mtl: Correct rom_status_reg 2024-06-12 11:11:59 +02:00
pci-apl.c ASoC: SOF: Intel: Convert to PCI device IDs defines 2023-07-18 14:22:24 +02:00
pci-cnl.c ASoC: SOF: Intel: Convert to PCI device IDs defines 2023-07-18 14:22:24 +02:00
pci-icl.c ASoC: SOF: Intel: Convert to PCI device IDs defines 2023-07-18 14:22:24 +02:00
pci-lnl.c ASoC: SOF: Intel: add default firmware library path for LNL 2024-05-17 12:01:59 +02:00
pci-mtl.c ASoC: SOF: Intel: pci-mtl: fix ARL-S definitions 2024-06-12 11:11:59 +02:00
pci-skl.c ASoC: SOF: Intel: Convert to PCI device IDs defines 2023-07-18 14:22:24 +02:00
pci-tgl.c ASoC: SOF: Intel: Convert to PCI device IDs defines 2023-07-18 14:22:24 +02:00
pci-tng.c ASoC: SOF: Intel: Convert to PCI device IDs defines 2023-07-18 14:22:24 +02:00
shim.h ASoC: SOF: Intel: add abstraction for SoundWire wake-ups 2023-08-07 23:09:45 +01:00
skl.c ASoC: do not include pm_runtime.h if not used 2023-05-23 13:55:55 +01:00
tgl.c ASoC: SOF: Intel: add abstraction for SoundWire wake-ups 2023-08-07 23:09:45 +01:00