From: leo.yan@linaro.org (Leo Yan)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v4 4/7] coresight: add support for CPU debug module
Date: Mon, 20 Mar 2017 20:10:46 +0800 [thread overview]
Message-ID: <20170320121046.GB19581@leoy-linaro> (raw)
In-Reply-To: <74d6fd19-89f0-7edf-ace3-8b07f13e9569@arm.com>
On Fri, Mar 17, 2017 at 06:44:03PM +0000, Suzuki K Poulose wrote:
> On 17/03/17 15:02, Leo Yan wrote:
> >Coresight includes debug module and usually the module connects with CPU
> >debug logic. ARMv8 architecture reference manual (ARM DDI 0487A.k) has
> >description for related info in "Part H: External Debug".
> >
> >Chapter H7 "The Sample-based Profiling Extension" introduces several
> >sampling registers, e.g. we can check program counter value with
> >combined CPU exception level, secure state, etc. So this is helpful for
> >analysis CPU lockup scenarios, e.g. if one CPU has run into infinite
> >loop with IRQ disabled. In this case the CPU cannot switch context and
> >handle any interrupt (including IPIs), as the result it cannot handle
> >SMP call for stack dump.
> >
> >This patch is to enable coresight debug module, so firstly this driver
> >is to bind apb clock for debug module and this is to ensure the debug
> >module can be accessed from program or external debugger. And the driver
> >uses sample-based registers for debug purpose, e.g. when system detects
> >the CPU lockup and trigger panic, the driver will dump program counter
>
> Do we dump it when the CPU lockup is detected with this change ? If not,
> we shouldn't claim that here.
Right, the mainline kernel missed Colin Cross's patch to trigger panic
when detect CPU lockup which used by Android common kernel:
http://people.linaro.org/~leo.yan/0001-hardlockup-detect-hard-lockups-without-NMIs-using-se.patch
Will fix it.
[...]
> >+ pr_emerg("\tEDPCSR: [<%p>] %pS\n", (void *)pc, (void *)pc);
>
> Are we safe calling %pS on the PC, when the PC offset in implementation defined ?
I did some quick testing, if cannot find proper kernel symbol for PC
value, then %pS will directly output pc value rather than symbol value.
Other suggestions are good for me; I will fix for all for them.
[...]
Thanks,
Leo Yan
next prev parent reply other threads:[~2017-03-20 12:10 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-17 15:02 [PATCH v4 0/7] coresight: enable debug module Leo Yan
2017-03-17 15:02 ` [PATCH v4 1/7] coresight: bindings for CPU " Leo Yan
2017-03-17 16:13 ` Mathieu Poirier
2017-03-20 11:49 ` Leo Yan
2017-03-20 15:32 ` Mathieu Poirier
2017-03-24 14:54 ` Rob Herring
2017-03-17 15:02 ` [PATCH v4 2/7] coresight: of_get_coresight_platform_data: Add missing of_node_put Leo Yan
2017-03-17 15:09 ` Suzuki K Poulose
2017-03-17 15:25 ` Leo Yan
2017-03-17 15:02 ` [PATCH v4 3/7] coresight: refactor with function of_coresight_get_cpu Leo Yan
2017-03-24 18:14 ` Stephen Boyd
2017-03-17 15:02 ` [PATCH v4 4/7] coresight: add support for CPU debug module Leo Yan
2017-03-17 18:44 ` Suzuki K Poulose
2017-03-20 12:10 ` Leo Yan [this message]
2017-03-17 15:02 ` [PATCH v4 5/7] clk: hi6220: add debug APB clock Leo Yan
2017-03-17 15:02 ` [PATCH v4 6/7] arm64: dts: hi6220: register debug module Leo Yan
2017-03-17 15:02 ` [PATCH v4 7/7] arm64: dts: qcom: msm8916: Add debug unit Leo Yan
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=20170320121046.GB19581@leoy-linaro \
--to=leo.yan@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
/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;
as well as URLs for NNTP newsgroup(s).