Re: [PATCH v1] coresight: add node to reset all coresight devices

From: Suzuki K Poulose
Date: Wed Apr 28 2021 - 06:09:28 EST


On 28/04/2021 10:57, taozha@xxxxxxxxxxxxxx wrote:
On 2021-04-23 21:20, Suzuki K Poulose wrote:
On 23/04/2021 09:29, Tao Zhang wrote:
Add new reset_source_sink node to be able to disable all active
coresight devices.
In this way, we no longer need to manually disable all active
coresight devices one by one. After enabling multiple coresight
paths, users can reset their status more conveniently by this
node.


What is the use case here ? Why would you trigger a reset for all the
sources/sink without gracefully completing any on-going sessions
(including the perf ones, which are driven by the kernel perf layer)

We have a tool needs a command that could reset all active devices.
Since the tool cannot what dvices are activated, we add this new node
to sysFS for our tool could reset all active device by one command.
We hope that this patch can also provide a more convenient option
for the other users with the same needs.

There is sysfs handles to do this already. See the testcase under perf, e.g, that can walk the sysfs and figure out the source devices and the "sinks" that can be reached from the given device.

If some information is missing, to achieve this. we could provide that. But simply because a tool wants to do something without bothering to use the provided ABI, is not a justification to add something to the kernel.

Suzuki