From: Suzuki K Poulose <suzuki.poulose@arm.com>
To: Leo Yan <leo.yan@arm.com>, 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>,
Yuanfang Zhang <quic_yuanfang@quicinc.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: coresight@lists.linaro.org, linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH v7 01/20] coresight: Populate CPU ID into coresight_device
Date: Mon, 23 Mar 2026 09:39:05 +0000 [thread overview]
Message-ID: <ba936584-54f9-4e72-9bf0-94ea98499df5@arm.com> (raw)
In-Reply-To: <20260320-arm_coresight_path_power_management_improvement-v7-1-327ddd36b58b@arm.com>
On 20/03/2026 17:42, Leo Yan wrote:
> Add a new flag CORESIGHT_DESC_CPU_BOUND to indicate components that
> are CPU bound. Populate CPU ID into the coresight_device structure;
> otherwise, set CPU ID to -1 for non CPU bound devices.
>
> Use the {0} initializer to clear coresight_desc structures to avoid
> uninitialized values.
>
> Signed-off-by: Leo Yan <leo.yan@arm.com>
> ---
> drivers/hwtracing/coresight/coresight-catu.c | 2 +-
> drivers/hwtracing/coresight/coresight-core.c | 5 +++++
> drivers/hwtracing/coresight/coresight-cti-core.c | 9 ++++++---
> drivers/hwtracing/coresight/coresight-etm3x-core.c | 2 ++
> drivers/hwtracing/coresight/coresight-etm4x-core.c | 2 ++
> drivers/hwtracing/coresight/coresight-trbe.c | 2 ++
> include/linux/coresight.h | 8 ++++++++
> 7 files changed, 26 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/hwtracing/coresight/coresight-catu.c b/drivers/hwtracing/coresight/coresight-catu.c
> index ce71dcddfca2558eddd625de58a709b151f2e07e..43abe13995cf3c96e70dcf97856872d70f71345a 100644
> --- a/drivers/hwtracing/coresight/coresight-catu.c
> +++ b/drivers/hwtracing/coresight/coresight-catu.c
> @@ -514,7 +514,7 @@ static int __catu_probe(struct device *dev, struct resource *res)
> int ret = 0;
> u32 dma_mask;
> struct catu_drvdata *drvdata;
> - struct coresight_desc catu_desc;
> + struct coresight_desc catu_desc = { 0 };
> struct coresight_platform_data *pdata = NULL;
> void __iomem *base;
>
> diff --git a/drivers/hwtracing/coresight/coresight-core.c b/drivers/hwtracing/coresight/coresight-core.c
> index 46f247f73cf64a97b9353b84ba5b76b991676f5f..4a246fb6bff0a75cf12995bd00a9adefb93839ec 100644
> --- a/drivers/hwtracing/coresight/coresight-core.c
> +++ b/drivers/hwtracing/coresight/coresight-core.c
> @@ -1342,6 +1342,11 @@ struct coresight_device *coresight_register(struct coresight_desc *desc)
> csdev->access = desc->access;
> csdev->orphan = true;
>
> + if (desc->flags & CORESIGHT_DESC_CPU_BOUND)
> + csdev->cpu = desc->cpu;
> + else
> + csdev->cpu = -1;
> +
Additionally it may be a good idea to reject drivers that do not set CPU
for per_cpu_source/per_cpu_sink ? That can be added a separate patch.
Suzuki
next prev parent reply other threads:[~2026-03-23 9:40 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-20 17:42 [PATCH v7 00/20] CoreSight: Refactor power management for CoreSight path Leo Yan
2026-03-20 17:42 ` [PATCH v7 01/20] coresight: Populate CPU ID into coresight_device Leo Yan
2026-03-23 9:35 ` Suzuki K Poulose
2026-03-23 9:39 ` Suzuki K Poulose [this message]
2026-03-20 17:42 ` [PATCH v7 02/20] coresight: Remove .cpu_id() callback from source ops Leo Yan
2026-03-20 17:42 ` [PATCH v7 03/20] coresight: sysfs: Validate CPU online status for per-CPU sources Leo Yan
2026-03-20 17:42 ` [PATCH v7 04/20] coresight: Move per-CPU source pointer to core layer Leo Yan
2026-03-20 17:42 ` [PATCH v7 05/20] coresight: Register CPU PM notifier in " Leo Yan
2026-03-20 17:42 ` [PATCH v7 06/20] coresight: etm4x: Hook CPU PM callbacks Leo Yan
2026-03-20 17:42 ` [PATCH v7 07/20] coresight: etm4x: Remove redundant condition checks in save and restore Leo Yan
2026-03-20 17:42 ` [PATCH v7 08/20] coresight: syscfg: Use spinlock to protect active variables Leo Yan
2026-03-23 9:47 ` Suzuki K Poulose
2026-03-20 17:42 ` [PATCH v7 09/20] coresight: Introduce coresight_enable_source() helper Leo Yan
2026-03-20 17:42 ` [PATCH v7 10/20] coresight: Save active path for system tracers Leo Yan
2026-03-20 17:42 ` [PATCH v7 11/20] coresight: etm4x: Set active path on target CPU Leo Yan
2026-03-20 17:42 ` [PATCH v7 12/20] coresight: etm3x: " Leo Yan
2026-03-20 17:42 ` [PATCH v7 13/20] coresight: sysfs: Use source's path pointer for path control Leo Yan
2026-03-20 17:42 ` [PATCH v7 14/20] coresight: Control path with range Leo Yan
2026-03-23 10:01 ` Suzuki K Poulose
2026-03-24 7:48 ` Leo Yan
2026-03-20 17:42 ` [PATCH v7 15/20] coresight: Control path during CPU idle Leo Yan
2026-03-20 17:42 ` [PATCH v7 16/20] coresight: Add PM callbacks for sink device Leo Yan
2026-03-20 17:42 ` [PATCH v7 17/20] coresight: trbe: Save and restore state across CPU low power state Leo Yan
2026-03-20 17:43 ` [PATCH v7 18/20] coresight: sysfs: Increment refcount only for system tracers Leo Yan
2026-03-20 17:43 ` [PATCH v7 19/20] coresight: Take hotplug lock in enable_source_store() for Sysfs mode Leo Yan
2026-03-20 17:43 ` [PATCH v7 20/20] coresight: Move CPU hotplug callbacks to core layer 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=ba936584-54f9-4e72-9bf0-94ea98499df5@arm.com \
--to=suzuki.poulose@arm.com \
--cc=alexander.shishkin@linux.intel.com \
--cc=coresight@lists.linaro.org \
--cc=gregkh@linuxfoundation.org \
--cc=james.clark@linaro.org \
--cc=keyz@google.com \
--cc=leo.yan@arm.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=mark.rutland@arm.com \
--cc=mike.leach@arm.com \
--cc=quic_yuanfang@quicinc.com \
--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