diff options
| author | Mark Brown <broonie@kernel.org> | 2026-07-06 14:39:25 +0100 |
|---|---|---|
| committer | Mark Brown <broonie@kernel.org> | 2026-07-06 14:39:25 +0100 |
| commit | 8e5a6599a38e5515cd2b5f34fe8a8ac476f8b127 (patch) | |
| tree | d61c0ceb288dc158a8cebfc601e86c0dcf06ac96 /scripts | |
| parent | a118fea777a2c04da7c5ccf1141d317838a79a46 (diff) | |
| parent | 4105a4c0678b2808fc8046b60321b4f1cc7dae75 (diff) | |
ASoC: cs35l3x: drain threaded IRQs before runtime suspend
Runyu Xiao <runyu.xiao@seu.edu.cn> says:
Both cs35l33 and cs35l34 can enter runtime suspend while their threaded
IRQ handlers are still reachable. The suspend path then switches the
driver into regcache cache-only mode and powers the codec down, while
the IRQ thread still expects live status-register access.
This issue was found by our static analysis tool and manually audited on
Linux v6.18.21. Directed QEMU no-device validation further showed that,
after runtime_suspend() completed, the real threaded handlers could
still be injected and would continue past volatile regmap read failures
into their release/update paths.
This series keeps the fix on the suspend actor and applies the same
runtime-suspend/threaded-IRQ ordering repair boundary to both drivers:
- track whether request_threaded_irq() actually succeeded
- disable_irq() before cache_only/power-off in runtime suspend
- enable_irq() only after regcache_sync() in runtime resume
That drains any in-flight threaded handler and blocks new IRQ handling
while the codec is suspended, without mixing in larger IRQ-thread
defensive cleanups.
Build-tested by compiling cs35l33.o and cs35l34.o.
No cs35l33/cs35l34 hardware was available for end-to-end runtime
testing.
Link: https://patch.msgid.link/20260611161553.3378721-1-runyu.xiao@seu.edu.cn
Diffstat (limited to 'scripts')
| -rw-r--r-- | scripts/sorttable.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/scripts/sorttable.c b/scripts/sorttable.c index e8ed11c680c6..d8dc2a1b7c31 100644 --- a/scripts/sorttable.c +++ b/scripts/sorttable.c @@ -891,17 +891,22 @@ static int do_file(char const *const fname, void *addr) table_sort_t custom_sort = NULL; switch (elf_map_machine(ehdr)) { - case EM_AARCH64: #ifdef MCOUNT_SORT_ENABLED + case EM_AARCH64: + /* arm64 also needs RELA-based weak-function fixups. */ sort_reloc = true; rela_type = 0x403; - /* arm64 uses patchable function entry placing before function */ + /* fallthrough */ + case EM_RISCV: + /* arm64 and RISC-V place patchable entries before the function. */ before_func = 8; +#else + case EM_AARCH64: + case EM_RISCV: #endif /* fallthrough */ case EM_386: case EM_LOONGARCH: - case EM_RISCV: case EM_S390: case EM_X86_64: custom_sort = sort_relative_table_with_data; |
