mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Suzuki K Poulose <suzuki.poulose@arm.com>
To: Yeoreum Yun <yeoreum.yun@arm.com>,
	Mike Leach <mike.leach@arm.com>,
	James Clark <james.clark@linaro.org>, Leo Yan <leo.yan@arm.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Mathieu Poirier <mathieu.poirier@linaro.org>,
	coresight@lists.linaro.org, linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, linux-rt-devel@lists.linux.dev
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>,
	Sebastian Andrzej Siewior <bigeasy@linutronix.de>,
	Clark Williams <clrkwllms@kernel.org>,
	Steven Rostedt <rostedt@goodmis.org>
Subject: Re: [PATCH RESEND v13 03/14] coresight: etm3x: prohibit modifying cntr_val and reset while session is enabled
Date: Sat, 3 Oct 2026 07:10:01 +0100	[thread overview]
Message-ID: <ed658964-bdf2-4258-946e-0fc115d33975@arm.com> (raw)
In-Reply-To: <20261003-separate_etm_cfg_v2-v13-3-5d8a29aead95@arm.com>

On 03/10/2026 03:52, Yeoreum Yun wrote:
> cntr_val are overwritten with the values read from the corresponding
> registers by etm_disable_hw() when the session is disabled.
> 
> This means that any changes to this value made while the session is
> enabled would be lost when the session is disabled.
> 
> Also, reset shouldn't be called while session is enabled.
> 
> Therefore, prohibit modifying cntr_val and reset while the session is enabled.
> 

Same as the other one, fixed subject and the above line

Cheers
Suzuki

> Reviewed-by: Mike Leach <mike.leach@arm.com>
> Tested-by: Leo Yan <leo.yan@arm.com>
> Signed-off-by: Yeoreum Yun <yeoreum.yun@arm.com>
> ---
>   drivers/hwtracing/coresight/coresight-etm3x-sysfs.c | 7 +++++++
>   1 file changed, 7 insertions(+)
> 
> diff --git a/drivers/hwtracing/coresight/coresight-etm3x-sysfs.c b/drivers/hwtracing/coresight/coresight-etm3x-sysfs.c
> index b3c67e96a82a..cdb70a4382eb 100644
> --- a/drivers/hwtracing/coresight/coresight-etm3x-sysfs.c
> +++ b/drivers/hwtracing/coresight/coresight-etm3x-sysfs.c
> @@ -75,6 +75,10 @@ static ssize_t reset_store(struct device *dev,
>   	if (ret)
>   		return ret;
>   
> +	if (IS_ERR_OR_NULL(drvdata->csdev) ||
> +	    coresight_get_mode(drvdata->csdev))
> +		return -EBUSY;
> +
>   	if (val) {
>   		spin_lock(&drvdata->spinlock);
>   		memset(config, 0, sizeof(struct etm_config));
> @@ -744,6 +748,9 @@ static ssize_t cntr_val_store(struct device *dev,
>   	ret = kstrtoul(buf, 16, &val);
>   	if (ret)
>   		return ret;
> +	if (IS_ERR_OR_NULL(drvdata->csdev) ||
> +	    coresight_get_mode(drvdata->csdev))
> +		return -EBUSY;
>   
>   	spin_lock(&drvdata->spinlock);
>   	config->cntr_val[config->cntr_idx] = val;
> 


  parent reply	other threads:[~2026-10-03  6:10 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-03  2:52 [PATCH RESEND v13 00/14] fix several inconsistencies with sysfs configuration in etmX Yeoreum Yun
2026-10-03  2:52 ` [PATCH RESEND v13 01/14] coresight: etm4x: read-back TRCSEQSTR at disabling and prohibit modifying seq_state while enabling Yeoreum Yun
2026-10-03  3:08   ` sashiko-bot
2026-10-03  3:44     ` Yeoreum Yun
2026-10-03  6:07   ` Suzuki K Poulose
2026-10-03  2:52 ` [PATCH RESEND v13 02/14] coresight: etm4x: prohibit modifying cntr_val while session is enabled Yeoreum Yun
2026-10-03  3:06   ` sashiko-bot
2026-10-03  4:29     ` Yeoreum Yun
2026-10-03  2:52 ` [PATCH RESEND v13 03/14] coresight: etm3x: prohibit modifying cntr_val and reset " Yeoreum Yun
2026-10-03  3:06   ` sashiko-bot
2026-10-03  4:34     ` Yeoreum Yun
2026-10-03  6:10   ` Suzuki K Poulose [this message]
2026-10-03  2:52 ` [PATCH RESEND v13 04/14] coresight: etm4x: fix inconsistencies with sysfs configuration Yeoreum Yun
2026-10-03  3:06   ` sashiko-bot
2026-10-03  4:40     ` Yeoreum Yun
2026-10-03  2:52 ` [PATCH RESEND v13 05/14] coresight: etm3x: " Yeoreum Yun
2026-10-03  2:52 ` [PATCH RESEND v13 06/14] coresight: etm3x: remove redundant cpu online check on etm_enable_sysfs() Yeoreum Yun
2026-10-03  2:52 ` [PATCH RESEND v13 07/14] coresight: etm4x: introduce struct etm4_caps Yeoreum Yun
2026-10-03  2:52 ` [PATCH RESEND v13 08/14] coresight: etm4x: exclude ss_status from drvdata->config Yeoreum Yun
2026-10-03  2:52 ` [PATCH RESEND v13 09/14] coresight: etm4x: remove s_ex_level from config Yeoreum Yun
2026-10-03  6:14   ` Suzuki K Poulose
2026-10-03  2:52 ` [PATCH RESEND v13 10/14] coresight: etm4x: rename local config as curr_config referring drvdata->curr_config Yeoreum Yun
2026-10-03  2:52 ` [PATCH RESEND v13 11/14] coresight: etm4x: rename drvdata->config to sysfs_config Yeoreum Yun
2026-10-03  2:52 ` [PATCH RESEND v13 12/14] coresight: etm3x: introduce struct etm_caps Yeoreum Yun
2026-10-03  2:52 ` [PATCH RESEND v13 13/14] coresight: etm3x: rename local config as curr_config referring drvdata->curr_config Yeoreum Yun
2026-10-03  2:52 ` [PATCH RESEND v13 14/14] coresight: etm3x: rename drvdata->config to sysfs_config Yeoreum Yun
2026-10-03  6:56 ` [PATCH RESEND v13 00/14] fix several inconsistencies with sysfs configuration in etmX Suzuki K Poulose

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=ed658964-bdf2-4258-946e-0fc115d33975@arm.com \
    --to=suzuki.poulose@arm.com \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=bigeasy@linutronix.de \
    --cc=clrkwllms@kernel.org \
    --cc=coresight@lists.linaro.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=james.clark@linaro.org \
    --cc=leo.yan@arm.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rt-devel@lists.linux.dev \
    --cc=mathieu.poirier@linaro.org \
    --cc=mike.leach@arm.com \
    --cc=rostedt@goodmis.org \
    --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

all inboxes | Powered by JetHome®