Hi,
Ensure that you have disabled core power down on idle when using sysfs to manipulate etm devices. The ETM devices are on the same power/clock as the CPUs, so if the CPU powers down on idle then the ETM will be powered down too. Writing to a device that is unpowered will usually kill your system.
Regards
Mike
-----Original Message----- From: CoreSight coresight-bounces@lists.linaro.org On Behalf Of Mike Bazov Sent: 09 April 2018 14:24 To: coresight@lists.linaro.org Subject: Using coresight via sysfs freezes my entire system.
Greetings,
I'm enabling a sink(ETR) via sysfs:
$ echo "1"> /sys/bus/coresight/devices/826000.etr/enable_sink
And the sink is enabled successfully.
Now, i try to turn on a random ETMv4 source, so i just choose this one:
$ echo "1" > /sys/bus/coresight/devices/85c000.etm/enable_source
And this freezes my entire system. This ETMv4 is for CPU 0.. So i tried to turn on(after a reboot, and enabling a sink again) the next ETMv4(for CPU 1):
$ echo "1" > /sys/bus/coresight/devices/85d000.etm/enable_source
And i can see the kernel logs are happy, and tracing is(assuming the logs are true) enabled:
[ 61.495119] coresight-tmc 826000.etr: TMC-ETR enabled [ 61.495150] coresight-dynamic-replicator 824000.replicator: REPLICATOR enabled [ 61.499261] coresight-tmc 825000.etf: TMC-ETF enabled [ 61.506468] coresight-funnel 821000.funnel: FUNNEL inport 4 enabled [ 61.511438] coresight-funnel 841000.funnel: FUNNEL inport 1 enabled [ 61.517635] coresight-etm4x 85d000.etm: ETM tracing enabled
But when i try to turn it off:
$ echo "0" > /sys/bus/coresight/devices/85d000.etm/enable_source
This freezes my entire system.. again.
I'm using the perf-opencsd-master kernel(https://github.com/Linaro/perf-opencsd https://github.com/Linaro/perf-opencsd ), and the Dragonboard 410c.
Any ideas, hints?
Thank you.
IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.