Commit bb350847 authored by Ruidong Tian's avatar Ruidong Tian Committed by Arnaldo Carvalho de Melo

perf test: Update cs_etm testcase for Arm ETE

Add ETE as one of the supported device types in perf cs_etm testcase.
Reviewed-by: default avatarJames Clark <james.clark@arm.com>
Signed-off-by: default avatarRuidong Tian <tianruidong@linux.alibaba.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Mike Leach <mike.leach@linaro.org>
Cc: Suzuki Poulouse <suzuki.poulose@arm.com>
Cc: coresight@lists.linaro.org
Cc: linux-arm-kernel@lists.infradead.org
Link: https://lore.kernel.org/r/20230911065541.91293-1-tianruidong@linux.alibaba.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
parent 5cdb51ba
......@@ -11,6 +11,19 @@
glb_err=0
cs_etm_dev_name() {
cs_etm_path=$(find /sys/bus/event_source/devices/cs_etm/ -name cpu* -print -quit)
trcdevarch=$(cat ${cs_etm_path}/mgmt/trcdevarch)
archhver=$((($trcdevarch >> 12) & 0xf))
archpart=$(($trcdevarch & 0xfff))
if [ $archhver -eq 5 -a "$(printf "0x%X\n" $archpart)" = "0xA13" ] ; then
echo "ete"
else
echo "etm"
fi
}
skip_if_no_cs_etm_event() {
perf list | grep -q 'cs_etm//' && return 0
......@@ -136,7 +149,7 @@ arm_cs_iterate_devices() {
arm_cs_etm_traverse_path_test() {
# Iterate for every ETM device
for dev in /sys/bus/coresight/devices/etm*; do
for dev in /sys/bus/coresight/devices/$(cs_etm_dev_name)*; do
# Find the ETM device belonging to which CPU
cpu=`cat $dev/cpu`
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment