public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
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:35:18 +0000	[thread overview]
Message-ID: <20d7d795-235e-4074-b3e1-429e2a024a68@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>

...

t-trbe.c b/drivers/hwtracing/coresight/coresight-trbe.c
> index 1511f8eb95afb5b4610b8fbdacc8b174b6b08530..14e35b9660d76e47619cc6026b94929b3bb3e02b 100644
> --- a/drivers/hwtracing/coresight/coresight-trbe.c
> +++ b/drivers/hwtracing/coresight/coresight-trbe.c
> @@ -1289,6 +1289,8 @@ static void arm_trbe_register_coresight_cpu(struct trbe_drvdata *drvdata, int cp
>   	desc.ops = &arm_trbe_cs_ops;
>   	desc.groups = arm_trbe_groups;
>   	desc.dev = dev;
> +	desc.cpu = cpu;
> +	desc.flags = CORESIGHT_DESC_CPU_BOUND;
>   	trbe_csdev = coresight_register(&desc);
>   	if (IS_ERR(trbe_csdev))
>   		goto cpu_clear;
> diff --git a/include/linux/coresight.h b/include/linux/coresight.h
> index 2131febebee93d609df1aea8534a10898b600be2..9d85e15337bc7e339695df18bcd5dac291d44916 100644
> --- a/include/linux/coresight.h
> +++ b/include/linux/coresight.h
> @@ -141,6 +141,8 @@ struct csdev_access {
>   		.base		= (_addr),	\
>   	})
>   
> +#define CORESIGHT_DESC_CPU_BOUND	BIT(0)
> +
>   /**
>    * struct coresight_desc - description of a component required from drivers
>    * @type:	as defined by @coresight_dev_type.
> @@ -153,6 +155,8 @@ struct csdev_access {
>    *		in the component's sysfs sub-directory.
>    * @name:	name for the coresight device, also shown under sysfs.
>    * @access:	Describe access to the device
> + * @flags:	The descritpion flags.
> + * @cpu:	The CPU this component is affined to.
>    */
>   struct coresight_desc {
>   	enum coresight_dev_type type;
> @@ -163,6 +167,8 @@ struct coresight_desc {
>   	const struct attribute_group **groups;
>   	const char *name;
>   	struct csdev_access access;
> +	u32 flags;
> +	int cpu;
>   };
>   
>   /**
> @@ -261,6 +267,7 @@ struct coresight_trace_id_map {
>    *		CS_MODE_SYSFS. Otherwise it must be accessed from inside the
>    *		spinlock.
>    * @orphan:	true if the component has connections that haven't been linked.
> + * @cpu:	The CPU this component is affined to (-1 for not CPU bound).
>    * @sysfs_sink_activated: 'true' when a sink has been selected for use via sysfs
>    *		by writing a 1 to the 'enable_sink' file.  A sink can be
>    *		activated but not yet enabled.  Enabling for a _sink_ happens
> @@ -287,6 +294,7 @@ struct coresight_device {
>   	atomic_t mode;
>   	int refcnt;
>   	bool orphan;
> +	int cpu;

super minor nit: Could we keep the bools closer to better pack the 
structure ? Not that it really matters.


Otherwise looks good to me

Suzuki



  reply	other threads:[~2026-03-23  9:36 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 [this message]
2026-03-23  9:39   ` Suzuki K Poulose
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=20d7d795-235e-4074-b3e1-429e2a024a68@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