Hi Eric,
On Mon, Jun 15, 2020 at 10:44:52AM +0800, H MJ wrote:
# ls /sys/bus/coresight/devices/
[...]
coresight-funnel-dl-center coresight-tmc-etr
To be honest, I am a bit confused why the CoreSight device names have prefix 'coresight-', on my side, three platforms (Juno-r2/DB410c/Hikey620) don't output the device name with this format. On the other hand, the device name will be used the establish the hardware connection path from CoreSight source (e.g. etm) to sink (etf/etb/etr, etc). I prefer to firstly get clear why the CoreSight device naming has unexpected prefix 'coresight-' (and this might relevant with your current issue if it fails to find correct sink device).
Another way to move forward to dig into code (e.g. using printk) in the function etm_setup_aux() [1], one possibility is CoreSight perf drive fails to find corresponding, so at the line 299 in coresight-etm-perf.c (in function etm_setup_aux()) the pointer '*sink' is NULL and directly bail out. The failure might be caused by mismatching between user space passing sink name and in drive it fails to find corresponding sink device.
Thanks, Leo
[1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/driv...