~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/include/linux/coresight-pmu.h

Version: ~ [ linux-6.12-rc7 ] ~ [ linux-6.11.7 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.60 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.116 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.171 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.229 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.285 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.323 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.9 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 /* SPDX-License-Identifier: GPL-2.0 */
  2 /*
  3  * Copyright(C) 2015 Linaro Limited. All rights reserved.
  4  * Author: Mathieu Poirier <mathieu.poirier@linaro.org>
  5  */
  6 
  7 #ifndef _LINUX_CORESIGHT_PMU_H
  8 #define _LINUX_CORESIGHT_PMU_H
  9 
 10 #include <linux/bits.h>
 11 
 12 #define CORESIGHT_ETM_PMU_NAME "cs_etm"
 13 
 14 /*
 15  * The legacy Trace ID system based on fixed calculation from the cpu
 16  * number. This has been replaced by drivers using a dynamic allocation
 17  * system - but need to retain the legacy algorithm for backward comparibility
 18  * in certain situations:-
 19  * a) new perf running on older systems that generate the legacy mapping
 20  * b) older tools that may not update at the same time as the kernel.
 21  */
 22 #define CORESIGHT_LEGACY_CPU_TRACE_ID(cpu)  (0x10 + (cpu * 2))
 23 
 24 /*
 25  * Below are the definition of bit offsets for perf option, and works as
 26  * arbitrary values for all ETM versions.
 27  *
 28  * Most of them are orignally from ETMv3.5/PTM's ETMCR config, therefore,
 29  * ETMv3.5/PTM doesn't define ETMCR config bits with prefix "ETM3_" and
 30  * directly use below macros as config bits.
 31  */
 32 #define ETM_OPT_BRANCH_BROADCAST 8
 33 #define ETM_OPT_CYCACC          12
 34 #define ETM_OPT_CTXTID          14
 35 #define ETM_OPT_CTXTID2         15
 36 #define ETM_OPT_TS              28
 37 #define ETM_OPT_RETSTK          29
 38 
 39 /* ETMv4 CONFIGR programming bits for the ETM OPTs */
 40 #define ETM4_CFG_BIT_BB         3
 41 #define ETM4_CFG_BIT_CYCACC     4
 42 #define ETM4_CFG_BIT_CTXTID     6
 43 #define ETM4_CFG_BIT_VMID       7
 44 #define ETM4_CFG_BIT_TS         11
 45 #define ETM4_CFG_BIT_RETSTK     12
 46 #define ETM4_CFG_BIT_VMID_OPT   15
 47 
 48 /*
 49  * Interpretation of the PERF_RECORD_AUX_OUTPUT_HW_ID payload.
 50  * Used to associate a CPU with the CoreSight Trace ID.
 51  * [07:00] - Trace ID - uses 8 bits to make value easy to read in file.
 52  * [39:08] - Sink ID - as reported in /sys/bus/event_source/devices/cs_etm/sinks/
 53  *            Added in minor version 1.
 54  * [55:40] - Unused (SBZ)
 55  * [59:56] - Minor Version - previously existing fields are compatible with
 56  *            all minor versions.
 57  * [63:60] - Major Version - previously existing fields mean different things
 58  *            in new major versions.
 59  */
 60 #define CS_AUX_HW_ID_TRACE_ID_MASK      GENMASK_ULL(7, 0)
 61 #define CS_AUX_HW_ID_SINK_ID_MASK       GENMASK_ULL(39, 8)
 62 
 63 #define CS_AUX_HW_ID_MINOR_VERSION_MASK GENMASK_ULL(59, 56)
 64 #define CS_AUX_HW_ID_MAJOR_VERSION_MASK GENMASK_ULL(63, 60)
 65 
 66 #define CS_AUX_HW_ID_MAJOR_VERSION 0
 67 #define CS_AUX_HW_ID_MINOR_VERSION 1
 68 
 69 #endif
 70 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php