On Sat, Nov 14, 2026 at 02:08:16AM +0200, Igor Velkov wrote:
The cpu-debug panic notifier reads every possible CPU after COREPURQ; on RK3399 on the crash path without pseudo-NMI it hit an SError on the first CPU that was off.
Seems the SoC does not honor COREPURQ. The current driver relies on an accessible debug interface; these platform limitations are already documented in [1].
So I would send:
- cpu-debug notifier: online CPUs other than the panic CPU, read only with PU=1, R=0 and DLK=0, no COREPURQ;
Sampling only CPUs still online after the stop request may help, but the online mask does not guarantee register accessibility. A late stop acknowledgement can race with that check, and an offline CPU may still be running (or stuck) in firmware - the driver is also helpful for CPU stuck not in kernel.
We also need to consider FEAT_DoPD: EDPRCR and EDPRSR move from debug power domain into the Core power domain, and COREPURQ is absent. We then need another mechanism before accessing PCSR register.
I would check a bit if any suggestions for safely access registers. Otherwise, we may need to explore kernel states as you suggested (not only cpu online but also idle states).
- PMPCSR when EDDEVID.PCSample is 0 and PMDEVID.PCSample is not.
This is fine for me.
Panic notifiers run after the stop only with crash_kexec_post_notifiers; with a crash kernel loaded and without it, they do not run at all. Is that acceptable, or would you rather see a hook in the crash stop path?
I agree that the notifier need improvement.
Could we explore a hook in the CPU hard lockup detector? Seems this module is more relevant to hard lockup rather than panic.
Thanks, Leo
[1] Documentation/trace/coresight/coresight-cpu-debug.rst