From: Leo Yan <leo.yan@arm.com>
To: Suzuki K Poulose <suzuki.poulose@arm.com>
Cc: Mike Leach <mike.leach@arm.com>,
James Clark <james.clark@linaro.org>,
Yeoreum Yun <yeoreum.yun@arm.com>,
Mark Rutland <mark.rutland@arm.com>,
Will Deacon <will@kernel.org>, Yabin Cui <yabinc@google.com>,
Keita Morisaki <keyz@google.com>,
Jie Gan <jie.gan@oss.qualcomm.com>,
Yuanfang Zhang <quic_yuanfang@quicinc.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Alexander Shishkin <alexander.shishkin@linux.intel.com>,
Tamas Petz <tamas.petz@arm.com>,
Thomas Gleixner <tglx@kernel.org>,
Peter Zijlstra <peterz@infradead.org>,
coresight@lists.linaro.org, linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH v12 19/28] coresight: Save active path for system tracers
Date: Fri, 15 May 2026 12:18:00 +0100 [thread overview]
Message-ID: <20260515111800.GM34802@e132581.arm.com> (raw)
In-Reply-To: <a40b0d0f-bbf8-4ba4-9370-2b5be71bdc44@arm.com>
On Fri, May 15, 2026 at 11:54:22AM +0100, Suzuki K Poulose wrote:
[...]
> > + /*
> > + * Update the path pointer until after the source is enabled to avoid
> > + * races where multiple paths attempt to enable the same source.
> > + *
> > + * Do not set the path pointer here for per-CPU sources; set it locally
> > + * on the CPU instead. Otherwise, there is a window where the path is
> > + * enabled but the pointer is not yet set, causing CPU PM notifiers to
> > + * miss PM operations due to reading a NULL pointer.
> > + */
> > + if (!coresight_is_percpu_source(csdev))
> > + csdev->path = path;
>
> Do we need to specail case this for non-percpu sources ? We could always let
> the driver save/clear the path leaving the core out of it. We can fix it
> separately from this series in a follow up patch.
This patch has a big reason is for patch 22. After saving csdev->path,
then patch 22 can totally remove IDR cache related things.
Otherwise, we can drop this patch and patch 22, this wouldn't impact
CPU PM stuffs.
Thanks,
Leo
next prev parent reply other threads:[~2026-05-15 11:18 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-11 11:10 [PATCH v12 00/28] CoreSight: Refactor power management for CoreSight path Leo Yan
2026-05-11 11:10 ` [PATCH v12 01/28] coresight: Fix source not disabled on idr_alloc_u32 failure Leo Yan
2026-05-11 11:10 ` [PATCH v12 02/28] coresight: Handle helper enable failure properly Leo Yan
2026-05-11 11:10 ` [PATCH v12 03/28] coresight: Extract device init into coresight_init_device() Leo Yan
2026-05-11 11:10 ` [PATCH v12 04/28] coresight: Populate CPU ID into coresight_device Leo Yan
2026-05-11 11:10 ` [PATCH v12 05/28] coresight: Remove .cpu_id() callback from source ops Leo Yan
2026-05-11 11:10 ` [PATCH v12 06/28] coresight: Take hotplug lock in enable_source_store() for Sysfs mode Leo Yan
2026-05-11 11:10 ` [PATCH v12 07/28] coresight: perf: Retrieve path and source from event data Leo Yan
2026-05-11 11:10 ` [PATCH v12 08/28] coresight: Take a reference on csdev Leo Yan
2026-05-11 11:10 ` [PATCH v12 09/28] coresight: Move per-CPU source pointer to core layer Leo Yan
2026-05-11 11:10 ` [PATCH v12 10/28] coresight: Take per-CPU source reference during AUX setup Leo Yan
2026-05-11 11:10 ` [PATCH v12 11/28] coresight: Register CPU PM notifier in core layer Leo Yan
2026-05-11 11:10 ` [PATCH v12 12/28] coresight: etm4x: Hook CPU PM callbacks Leo Yan
2026-05-11 11:10 ` [PATCH v12 13/28] coresight: etm4x: Remove redundant checks in PM save and restore Leo Yan
2026-05-11 11:10 ` [PATCH v12 14/28] coresight: syscfg: Use IRQ-safe spinlock to protect active variables Leo Yan
2026-05-11 11:10 ` [PATCH v12 15/28] coresight: Disable source helpers in coresight_disable_path() Leo Yan
2026-05-11 11:11 ` [PATCH v12 16/28] coresight: Control path with range Leo Yan
2026-05-11 11:11 ` [PATCH v12 17/28] coresight: Use helpers to fetch first and last nodes Leo Yan
2026-05-11 11:11 ` [PATCH v12 18/28] coresight: Introduce coresight_enable_source() helper Leo Yan
2026-05-11 11:11 ` [PATCH v12 19/28] coresight: Save active path for system tracers Leo Yan
2026-05-15 10:54 ` Suzuki K Poulose
2026-05-15 11:18 ` Leo Yan [this message]
2026-05-11 11:11 ` [PATCH v12 20/28] coresight: etm4x: Set active path on target CPU Leo Yan
2026-05-11 11:11 ` [PATCH v12 21/28] coresight: etm3x: " Leo Yan
2026-05-11 11:11 ` [PATCH v12 22/28] coresight: sysfs: Use source's path pointer for path control Leo Yan
2026-05-11 11:11 ` [PATCH v12 23/28] coresight: Control path during CPU idle Leo Yan
2026-05-11 11:11 ` [PATCH v12 24/28] coresight: Add PM callbacks for sink device Leo Yan
2026-05-11 11:11 ` [PATCH v12 25/28] coresight: trbe: Save and restore state across CPU low power state Leo Yan
2026-05-11 11:11 ` [PATCH v12 26/28] coresight: sysfs: Increment refcount only for software source Leo Yan
2026-05-11 11:11 ` [PATCH v12 27/28] coresight: Move CPU hotplug callbacks to core layer Leo Yan
2026-05-11 11:11 ` [PATCH v12 28/28] coresight: sysfs: Validate CPU online status for per-CPU sources 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=20260515111800.GM34802@e132581.arm.com \
--to=leo.yan@arm.com \
--cc=alexander.shishkin@linux.intel.com \
--cc=coresight@lists.linaro.org \
--cc=gregkh@linuxfoundation.org \
--cc=james.clark@linaro.org \
--cc=jie.gan@oss.qualcomm.com \
--cc=keyz@google.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=mark.rutland@arm.com \
--cc=mike.leach@arm.com \
--cc=peterz@infradead.org \
--cc=quic_yuanfang@quicinc.com \
--cc=suzuki.poulose@arm.com \
--cc=tamas.petz@arm.com \
--cc=tglx@kernel.org \
--cc=will@kernel.org \
--cc=yabinc@google.com \
--cc=yeoreum.yun@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