From: Leo Yan <leo.yan@arm.com>
To: Igor Velkov <iav@iav.lv>
Cc: Suzuki K Poulose <suzuki.poulose@arm.com>,
Mike Leach <mike.leach@arm.com>,
James Clark <james.clark@linaro.org>,
coresight@lists.linaro.org, linux-arm-kernel@lists.infradead.org
Subject: Re: coresight: cpu-debug: PC sampling via PMPCSR (FEAT_PCSRv8p2)?
Date: Tue, 17 Nov 2026 18:32:41 +0000 [thread overview]
Message-ID: <20261117183241.GV9176@e132581.arm.com> (raw)
In-Reply-To: <20261114-coresight-pmpcsr-reply-leo-1@iav.lv>
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:
> 1. 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).
> 2. 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
next prev parent reply other threads:[~2026-11-17 18:32 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-13 5:46 coresight: cpu-debug: PC sampling via PMPCSR (FEAT_PCSRv8p2)? Igor Velkov
2026-11-13 9:25 ` Suzuki K Poulose
2026-11-13 14:46 ` Leo Yan
2026-11-14 0:08 ` Igor Velkov
2026-11-17 18:32 ` Leo Yan [this message]
2026-11-17 18:50 ` Igor Velkov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261117183241.GV9176@e132581.arm.com \
--to=leo.yan@arm.com \
--cc=coresight@lists.linaro.org \
--cc=iav@iav.lv \
--cc=james.clark@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=mike.leach@arm.com \
--cc=suzuki.poulose@arm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox