Skip to content

Commit

Permalink
perf cs-etm: Copy kernel coresight-pmu.h header
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
James Clark authored and Arnaldo Carvalho de Melo committed May 26, 2023
1 parent 251c01e commit 15d4371
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
13 changes: 0 additions & 13 deletions tools/include/linux/coresight-pmu.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,19 +21,6 @@
*/
#define CORESIGHT_LEGACY_CPU_TRACE_ID(cpu) (0x10 + (cpu * 2))

/* CoreSight trace ID is currently the bottom 7 bits of the value */
#define CORESIGHT_TRACE_ID_VAL_MASK GENMASK(6, 0)

/*
* perf record will set the legacy meta data values as unused initially.
* This allows perf report to manage the decoders created when dynamic
* allocation in operation.
*/
#define CORESIGHT_TRACE_ID_UNUSED_FLAG BIT(31)

/* Value to set for unused trace ID values */
#define CORESIGHT_TRACE_ID_UNUSED_VAL 0x7F

/*
* Below are the definition of bit offsets for perf option, and works as
* arbitrary values for all ETM versions.
Expand Down
13 changes: 13 additions & 0 deletions tools/perf/util/cs-etm.h
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,19 @@ struct cs_etm_packet_queue {
#define INFO_HEADER_SIZE (sizeof(((struct perf_record_auxtrace_info *)0)->type) + \
sizeof(((struct perf_record_auxtrace_info *)0)->reserved__))

/* CoreSight trace ID is currently the bottom 7 bits of the value */
#define CORESIGHT_TRACE_ID_VAL_MASK GENMASK(6, 0)

/*
* perf record will set the legacy meta data values as unused initially.
* This allows perf report to manage the decoders created when dynamic
* allocation in operation.
*/
#define CORESIGHT_TRACE_ID_UNUSED_FLAG BIT(31)

/* Value to set for unused trace ID values */
#define CORESIGHT_TRACE_ID_UNUSED_VAL 0x7F

int cs_etm__process_auxtrace_info(union perf_event *event,
struct perf_session *session);
struct perf_event_attr *cs_etm_get_default_config(struct perf_pmu *pmu);
Expand Down

0 comments on commit 15d4371

Please sign in to comment.