| .. | .. |
|---|
| 10 | 10 | #define CORESIGHT_ETM_PMU_NAME "cs_etm" |
|---|
| 11 | 11 | #define CORESIGHT_ETM_PMU_SEED 0x10 |
|---|
| 12 | 12 | |
|---|
| 13 | | -/* ETMv3.5/PTM's ETMCR config bit */ |
|---|
| 14 | | -#define ETM_OPT_CYCACC 12 |
|---|
| 15 | | -#define ETM_OPT_CTXTID 14 |
|---|
| 16 | | -#define ETM_OPT_TS 28 |
|---|
| 17 | | -#define ETM_OPT_RETSTK 29 |
|---|
| 13 | +/* |
|---|
| 14 | + * Below are the definition of bit offsets for perf option, and works as |
|---|
| 15 | + * arbitrary values for all ETM versions. |
|---|
| 16 | + * |
|---|
| 17 | + * Most of them are orignally from ETMv3.5/PTM's ETMCR config, therefore, |
|---|
| 18 | + * ETMv3.5/PTM doesn't define ETMCR config bits with prefix "ETM3_" and |
|---|
| 19 | + * directly use below macros as config bits. |
|---|
| 20 | + */ |
|---|
| 21 | +#define ETM_OPT_CYCACC 12 |
|---|
| 22 | +#define ETM_OPT_CTXTID 14 |
|---|
| 23 | +#define ETM_OPT_CTXTID2 15 |
|---|
| 24 | +#define ETM_OPT_TS 28 |
|---|
| 25 | +#define ETM_OPT_RETSTK 29 |
|---|
| 18 | 26 | |
|---|
| 19 | 27 | /* ETMv4 CONFIGR programming bits for the ETM OPTs */ |
|---|
| 20 | 28 | #define ETM4_CFG_BIT_CYCACC 4 |
|---|
| 21 | 29 | #define ETM4_CFG_BIT_CTXTID 6 |
|---|
| 30 | +#define ETM4_CFG_BIT_VMID 7 |
|---|
| 22 | 31 | #define ETM4_CFG_BIT_TS 11 |
|---|
| 23 | 32 | #define ETM4_CFG_BIT_RETSTK 12 |
|---|
| 33 | +#define ETM4_CFG_BIT_VMID_OPT 15 |
|---|
| 24 | 34 | |
|---|
| 25 | 35 | static inline int coresight_get_trace_id(int cpu) |
|---|
| 26 | 36 | { |
|---|