[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20250624130240.GN794930@e132581.arm.com>
Date: Tue, 24 Jun 2025 14:02:40 +0100
From: Leo Yan <leo.yan@....com>
To: James Clark <james.clark@...aro.org>
Cc: Keita Morisaki <keyz@...gle.com>, suzuki.poulose@....com,
alexander.shishkin@...ux.intel.com, coresight@...ts.linaro.org,
ericchancf@...gle.com, linux-kernel@...r.kernel.org,
mike.leach@...aro.org, yimingtseng@...gle.com
Subject: Re: [BUG] CoreSight: WARN_ON in coresight_disclaim_device_unlocked
due to register reset on CPU power-cycle
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
Powered by blists - more mailing lists