All of lore.kernel.org
 help / color / mirror / Atom feed
From: Leo Yan <leo.yan@arm.com>
To: James Clark <james.clark@linaro.org>
Cc: Keita Morisaki <keyz@google.com>,
	suzuki.poulose@arm.com, alexander.shishkin@linux.intel.com,
	coresight@lists.linaro.org, ericchancf@google.com,
	linux-kernel@vger.kernel.org, mike.leach@linaro.org,
	yimingtseng@google.com
Subject: Re: [BUG] CoreSight: WARN_ON in coresight_disclaim_device_unlocked due to register reset on CPU power-cycle
Date: Tue, 24 Jun 2025 14:02:40 +0100	[thread overview]
Message-ID: <20250624130240.GN794930@e132581.arm.com> (raw)
In-Reply-To: <5428619b-db7c-4b5b-964d-1466e516c245@linaro.org>

On Mon, Jun 23, 2025 at 01:05:13PM +0100, James Clark wrote:

[...]

> Hi Keita,
> 
> Thanks for the report. We discussed internally and decided that it would be
> better for the driver to always save the context by default, because this
> mistake is easy to make. Saving when it doesn't need to be saved doesn't do
> any harm, but not saving when it should be causes quite bad bugs.
> 
> So "arm,coresight-loses-context-with-cpu" will be ignored in the future and
> we'll add a new flag like "arm,coresight-save-context" if anyone wants the
> optimization of not saving.

I'm a bit concerned that we might provide information that has not yet
been finalized.

Before landing any changes in the mainline kernel, at this stage, I'd
recommend using the option "coresight_etm4x.pm_save_enable=2" in the
Linux kernel command line. This provides a reliable configuration for
production environment, as it ensures consistency between the current
mainline kernel and any future versions.

Setting coresight_etm4x.pm_save_enable=2 overrides any setting in the
device tree binding and always enables context save and restore for
the ETM / ETE.

If coresight_etm4x.pm_save_enable is set to 1, the ETM driver will
never perform context save and restore. Setting it to 0 (the default
value) allows the device tree or ACPI to determine whether context
save and restore should be performed.

If you are trying to upstream the DT binding for ETE, you need to omit
the property "arm,coresight-loses-context-with-cpu" since it is not
defined in the ETE device tree YAML schema now. As James mentioned, we
need to consolidate this part.

Thanks,
Leo

      reply	other threads:[~2025-06-24 13:02 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CAGo=-X1K1qZ_p9X0yeKy8Wm4QMDs2+4VE08LUNKOCrA15KFLTA@mail.gmail.com>
2025-06-20  8:44 ` [BUG] CoreSight: WARN_ON in coresight_disclaim_device_unlocked due to register reset on CPU power-cycle Suzuki K Poulose
2025-06-20 10:19   ` Keita Morisaki
2025-06-23  8:59     ` Keita Morisaki
2025-06-23 12:05       ` James Clark
2025-06-24 13:02         ` Leo Yan [this message]

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=20250624130240.GN794930@e132581.arm.com \
    --to=leo.yan@arm.com \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=coresight@lists.linaro.org \
    --cc=ericchancf@google.com \
    --cc=james.clark@linaro.org \
    --cc=keyz@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mike.leach@linaro.org \
    --cc=suzuki.poulose@arm.com \
    --cc=yimingtseng@google.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.