This source file includes following definitions.
- etm_perf_sink_config
- etm_perf_symlink
- etm_perf_add_symlink_sink
- etm_perf_del_symlink_sink
- etm_perf_sink_config
1
2
3
4
5
6
7 #ifndef _CORESIGHT_ETM_PERF_H
8 #define _CORESIGHT_ETM_PERF_H
9
10 #include <linux/percpu-defs.h>
11 #include "coresight-priv.h"
12
13 struct coresight_device;
14
15
16
17
18
19
20 #define ETM_ADDR_CMP_MAX 8
21
22
23
24
25
26
27
28 struct etm_filter {
29 unsigned long start_addr;
30 unsigned long stop_addr;
31 enum etm_addr_type type;
32 };
33
34
35
36
37
38
39
40 struct etm_filters {
41 struct etm_filter etm_filter[ETM_ADDR_CMP_MAX];
42 unsigned int nr_filters;
43 bool ssstatus;
44 };
45
46
47
48
49
50
51
52
53 struct etm_event_data {
54 struct work_struct work;
55 cpumask_t mask;
56 void *snk_config;
57 struct list_head * __percpu *path;
58 };
59
60 #ifdef CONFIG_CORESIGHT
61 int etm_perf_symlink(struct coresight_device *csdev, bool link);
62 int etm_perf_add_symlink_sink(struct coresight_device *csdev);
63 void etm_perf_del_symlink_sink(struct coresight_device *csdev);
64 static inline void *etm_perf_sink_config(struct perf_output_handle *handle)
65 {
66 struct etm_event_data *data = perf_get_aux(handle);
67
68 if (data)
69 return data->snk_config;
70 return NULL;
71 }
72 #else
73 static inline int etm_perf_symlink(struct coresight_device *csdev, bool link)
74 { return -EINVAL; }
75 int etm_perf_add_symlink_sink(struct coresight_device *csdev)
76 { return -EINVAL; }
77 void etm_perf_del_symlink_sink(struct coresight_device *csdev) {}
78 static inline void *etm_perf_sink_config(struct perf_output_handle *handle)
79 {
80 return NULL;
81 }
82
83 #endif
84
85 #endif