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."
Thanks.