public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
From: Leo Yan <leo.yan@arm.com>
To: James Clark <james.clark@linaro.org>
Cc: Suzuki K Poulose <suzuki.poulose@arm.com>,
	coresight@lists.linaro.org, linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, Mike Leach <mike.leach@arm.com>,
	Alexander Shishkin <alexander.shishkin@linux.intel.com>,
	Mathieu Poirier <mathieu.poirier@linaro.org>
Subject: Re: [PATCH 1/2] coresight: ete: Always save state on power down
Date: Fri, 1 May 2026 14:50:53 +0100	[thread overview]
Message-ID: <20260501135053.GA2674113@e132581.arm.com> (raw)
In-Reply-To: <be6bbfe1-cd51-43d8-84c7-34de929118f4@linaro.org>

On Fri, May 01, 2026 at 10:43:09AM +0100, James Clark wrote:

[...]

> > > +static int etm4_init_pm_save(struct device *dev, struct
> > > etmv4_drvdata *drvdata)
> > > +{
> > > +    if (etm4x_is_ete(drvdata)) {
> > > +        /*
> > > +         * Always do PM save for ETE. It always uses system registers
> > > +         * which will be lost on CPU power down.
> > > +         */
> > > +        pm_save_enable = PARAM_PM_SAVE_SELF_HOSTED;
> > 
> > Should we do this instead based on if the ETM/ETE is accessed via sys
> > instructions ? That would cover all implementations?
> > 
> > 
> > Suzuki
> > 
> 
> I did discuss that with Leo but we thought it might be a riskier change as
> ETM is older and nobody has reported any issues, and there is already the DT
> option to fix it that way. Turning it on by default could cause some
> performance regressions. Although it's only if the ETM is in use, so the
> impact is minimal.
> 
> In reality it probably does make sense as it's highly unlikely that sysreg
> ETM wouldn't need saving, so it might make some platforms with misconfigured
> DTs more stable.
> 
> I can send another version if you think it makes sense, what do you think
> Leo?

If extend a bit for ACPI context, it is fine for save / restore based on
sys reg implemenation. This is most nature way for support ACPI?

We can limit "arm,coresight-loses-context-with-cpu" for only ETM +
MMIO mode.

BTW, when respin, could you consider the approach for not changing
pm_save_enable. We simply take it as a global parameter, and calculate PM
mode for each CPU. But it is not necessary to write the PM mode back to
pm_save_enable.

Thanks,
Leo


  reply	other threads:[~2026-05-01 13:51 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-28 12:18 [PATCH 0/2] coresight: ete: Always save state on power down James Clark
2026-04-28 12:18 ` [PATCH 1/2] " James Clark
2026-04-30 16:54   ` Leo Yan
2026-05-01  8:24   ` Suzuki K Poulose
2026-05-01  9:43     ` James Clark
2026-05-01 13:50       ` Leo Yan [this message]
2026-05-01 16:44         ` James Clark
2026-04-28 12:18 ` [PATCH 2/2] coresight: etm4x: Refactor pm_save_enable handling James Clark
2026-04-30 17:24   ` 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=20260501135053.GA2674113@e132581.arm.com \
    --to=leo.yan@arm.com \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=coresight@lists.linaro.org \
    --cc=james.clark@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mathieu.poirier@linaro.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