Linux 4.16.11
[linux/fpc-iii.git] / drivers / hwtracing / coresight / coresight-etm-perf.h
blob3ffc9feb2d646e17f4304e2f53bae4976778be5c
1 /*
2 * Copyright(C) 2015 Linaro Limited. All rights reserved.
3 * Author: Mathieu Poirier <mathieu.poirier@linaro.org>
5 * This program is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 as published by
7 * the Free Software Foundation.
9 * This program is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
12 * more details.
14 * You should have received a copy of the GNU General Public License along with
15 * this program. If not, see <http://www.gnu.org/licenses/>.
18 #ifndef _CORESIGHT_ETM_PERF_H
19 #define _CORESIGHT_ETM_PERF_H
21 #include "coresight-priv.h"
23 struct coresight_device;
26 * In both ETMv3 and v4 the maximum number of address comparator implentable
27 * is 8. The actual number is implementation specific and will be checked
28 * when filters are applied.
30 #define ETM_ADDR_CMP_MAX 8
32 /**
33 * struct etm_filter - single instruction range or start/stop configuration.
34 * @start_addr: The address to start tracing on.
35 * @stop_addr: The address to stop tracing on.
36 * @type: Is this a range or start/stop filter.
38 struct etm_filter {
39 unsigned long start_addr;
40 unsigned long stop_addr;
41 enum etm_addr_type type;
44 /**
45 * struct etm_filters - set of filters for a session
46 * @etm_filter: All the filters for this session.
47 * @nr_filters: Number of filters
48 * @ssstatus: Status of the start/stop logic.
50 struct etm_filters {
51 struct etm_filter etm_filter[ETM_ADDR_CMP_MAX];
52 unsigned int nr_filters;
53 bool ssstatus;
57 #ifdef CONFIG_CORESIGHT
58 int etm_perf_symlink(struct coresight_device *csdev, bool link);
60 #else
61 static inline int etm_perf_symlink(struct coresight_device *csdev, bool link)
62 { return -EINVAL; }
64 #endif /* CONFIG_CORESIGHT */
66 #endif