linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Suzuki K Poulose <suzuki.poulose@arm.com>
To: Yeoreum Yun <yeoreum.yun@arm.com>
Cc: mike.leach@linaro.org, james.clark@linaro.org,
	alexander.shishkin@linux.intel.com, coresight@lists.linaro.org,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/4] coresight/etm4x: disallow altering config via sysfs while enabled
Date: Thu, 9 Jan 2025 12:21:11 +0000	[thread overview]
Message-ID: <4f9d2bed-7ce0-429e-83cc-ad6cbcc6085e@arm.com> (raw)
In-Reply-To: <Z3+6kL7OGDX/pNul@e129823.arm.com>

On 09/01/2025 12:01, Yeoreum Yun wrote:
> Hi Suzuki,
> 
>> Is it not better to have separate "configs" for perf and sysfs ?
>> And etmX driver can populate the "running" config, based on the
>> mode specific config. That way, the configs can be updated
>> independently without affecting the running config or the perf one.
>>
> 
> That was i've tried but I've accepted Mike's opinion that
> it's enough to check whether CS_MODE_DISABLED via coresight_get_mode()
> in *_store().
> 
> "the .._store functions in sysfs should use coresight_get_mode() to ensure
> this is set to CS_MODE_DISABLED before altering the config,
> which ensures that the trace system is inactive.
> We don't' really care about reading the config if trace is running."

There are two issues with that :

1. Sprinkling the get_mode call in each sysfs stor function doesn't look 
good to me.

2. Someone preparing for a sysfs session must not be prevented from 
doing so just because there is a perf session running.


Suzuki


> Thanks.
> 


  reply	other threads:[~2025-01-09 12:21 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-21 16:59 [PATCH 0/4] small fix for configuaring etm csdev via sysfs Yeoreum Yun
2024-12-21 16:59 ` [PATCH 1/4] coresight/etm4x: disallow altering config via sysfs while enabled Yeoreum Yun
2025-01-09 11:46   ` Suzuki K Poulose
2025-01-09 12:01     ` Yeoreum Yun
2025-01-09 12:21       ` Suzuki K Poulose [this message]
2025-01-09 12:27         ` Yeoreum Yun
2025-01-09 17:39         ` Yeoreum Yun
2025-01-09 17:48           ` Yeo Reum Yun
2025-03-12  6:45             ` Yeo Reum Yun
2024-12-21 16:59 ` [PATCH 2/4] coresight/etm4x: remove redundant usage of drvdata->spinlock Yeoreum Yun
2024-12-21 16:59 ` [PATCH 3/4] coresight/etm3x: disallow altering config via sysfs while enabled Yeoreum Yun
2024-12-21 16:59 ` [PATCH 4/4] coresight/etm3x: remove redundant usage of drvdata->spinlock Yeoreum Yun
2024-12-31 14:39 ` [PATCH 0/4] small fix for configuaring etm csdev via sysfs Yeo Reum Yun
2025-05-02 10:53 ` Yeoreum Yun

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=4f9d2bed-7ce0-429e-83cc-ad6cbcc6085e@arm.com \
    --to=suzuki.poulose@arm.com \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=coresight@lists.linaro.org \
    --cc=james.clark@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mike.leach@linaro.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;
as well as URLs for NNTP newsgroup(s).