Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

perf cs-etm: Copy kernel coresight-pmu.h header

Copy the kernel version of the header to fix the header diff build
warning. Some new definitions were only added to the tools side header,
but these are only used in Perf so move them to a different header.

Signed-off-by: James Clark <james.clark@arm.com>
Reviewed-by: Mike Leach <mike.leach@linaro.org>
Link: https://lore.kernel.org/r/20230522102604.1081416-1-james.clark@arm.com
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Suzuki K Poulose <suzuki.poulose@arm.com>
Cc: Ian Rogers <irogers@google.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: acme@kernel.org
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Will Deacon <will@kernel.org>
Cc: Leo Yan <leo.yan@linaro.org>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: linux-arm-kernel@lists.infradead.org
Cc: coresight@lists.linaro.org
Cc: siyanteng@loongson.cn
Cc: John Garry <john.g.garry@oracle.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: linux-kernel@vger.kernel.org
Cc: linux-perf-users@vger.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>

authored by

James Clark and committed by
Arnaldo Carvalho de Melo
15d4371b 251c01e2

+13 -13
-13
tools/include/linux/coresight-pmu.h
··· 21 21 */ 22 22 #define CORESIGHT_LEGACY_CPU_TRACE_ID(cpu) (0x10 + (cpu * 2)) 23 23 24 - /* CoreSight trace ID is currently the bottom 7 bits of the value */ 25 - #define CORESIGHT_TRACE_ID_VAL_MASK GENMASK(6, 0) 26 - 27 - /* 28 - * perf record will set the legacy meta data values as unused initially. 29 - * This allows perf report to manage the decoders created when dynamic 30 - * allocation in operation. 31 - */ 32 - #define CORESIGHT_TRACE_ID_UNUSED_FLAG BIT(31) 33 - 34 - /* Value to set for unused trace ID values */ 35 - #define CORESIGHT_TRACE_ID_UNUSED_VAL 0x7F 36 - 37 24 /* 38 25 * Below are the definition of bit offsets for perf option, and works as 39 26 * arbitrary values for all ETM versions.
+13
tools/perf/util/cs-etm.h
··· 227 227 #define INFO_HEADER_SIZE (sizeof(((struct perf_record_auxtrace_info *)0)->type) + \ 228 228 sizeof(((struct perf_record_auxtrace_info *)0)->reserved__)) 229 229 230 + /* CoreSight trace ID is currently the bottom 7 bits of the value */ 231 + #define CORESIGHT_TRACE_ID_VAL_MASK GENMASK(6, 0) 232 + 233 + /* 234 + * perf record will set the legacy meta data values as unused initially. 235 + * This allows perf report to manage the decoders created when dynamic 236 + * allocation in operation. 237 + */ 238 + #define CORESIGHT_TRACE_ID_UNUSED_FLAG BIT(31) 239 + 240 + /* Value to set for unused trace ID values */ 241 + #define CORESIGHT_TRACE_ID_UNUSED_VAL 0x7F 242 + 230 243 int cs_etm__process_auxtrace_info(union perf_event *event, 231 244 struct perf_session *session); 232 245 struct perf_event_attr *cs_etm_get_default_config(struct perf_pmu *pmu);