coresight-etm-perf.h 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  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. #ifndef _CORESIGHT_ETM_PERF_H
  7. #define _CORESIGHT_ETM_PERF_H
  8. #include "coresight-priv.h"
  9. struct coresight_device;
  10. /*
  11. * In both ETMv3 and v4 the maximum number of address comparator implentable
  12. * is 8. The actual number is implementation specific and will be checked
  13. * when filters are applied.
  14. */
  15. #define ETM_ADDR_CMP_MAX 8
  16. /**
  17. * struct etm_filter - single instruction range or start/stop configuration.
  18. * @start_addr: The address to start tracing on.
  19. * @stop_addr: The address to stop tracing on.
  20. * @type: Is this a range or start/stop filter.
  21. */
  22. struct etm_filter {
  23. unsigned long start_addr;
  24. unsigned long stop_addr;
  25. enum etm_addr_type type;
  26. };
  27. /**
  28. * struct etm_filters - set of filters for a session
  29. * @etm_filter: All the filters for this session.
  30. * @nr_filters: Number of filters
  31. * @ssstatus: Status of the start/stop logic.
  32. */
  33. struct etm_filters {
  34. struct etm_filter etm_filter[ETM_ADDR_CMP_MAX];
  35. unsigned int nr_filters;
  36. bool ssstatus;
  37. };
  38. #ifdef CONFIG_CORESIGHT
  39. int etm_perf_symlink(struct coresight_device *csdev, bool link);
  40. #else
  41. static inline int etm_perf_symlink(struct coresight_device *csdev, bool link)
  42. { return -EINVAL; }
  43. #endif /* CONFIG_CORESIGHT */
  44. #endif