Skip to content

Commit

Permalink
perf arm-spe: Only warn once for each unsupported address packet
Browse files Browse the repository at this point in the history
Unknown address packet indexes are not an error as the Arm architecture
can (and has with SPEv1.2) define new ones and implementation defined
ones are also allowed. The error message for every occurrence of the
packet is needlessly noisy as well. Change the message to print just
once for each unknown index.

Reviewed-by: Leo Yan <leo.yan@linaro.org>
Signed-off-by: Rob Herring <robh@kernel.org>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: James Clark <james.clark@arm.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Will Deacon <will@kernel.org>
Link: https://lore.kernel.org/r/20230127205546.667740-1-robh@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
  • Loading branch information
Rob Herring authored and Arnaldo Carvalho de Melo committed Feb 2, 2023
1 parent 1c24956 commit 2889959
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion tools/perf/util/arm-spe-decoder/arm-spe-decoder.c
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,11 @@ static u64 arm_spe_calc_ip(int index, u64 payload)
/* Clean highest byte */
payload = SPE_ADDR_PKT_ADDR_GET_BYTES_0_6(payload);
} else {
pr_err("unsupported address packet index: 0x%x\n", index);
static u32 seen_idx = 0;
if (!(seen_idx & BIT(index))) {
seen_idx |= BIT(index);
pr_warning("ignoring unsupported address packet index: 0x%x\n", index);
}
}

return payload;
Expand Down

0 comments on commit 2889959

Please sign in to comment.