rpmh.h 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  1. /* Copyright (c) 2016-2017, The Linux Foundation. All rights reserved.
  2. *
  3. * This program is free software; you can redistribute it and/or modify
  4. * it under the terms of the GNU General Public License version 2 and
  5. * only version 2 as published by the Free Software Foundation.
  6. *
  7. * This program is distributed in the hope that it will be useful,
  8. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  9. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  10. * GNU General Public License for more details.
  11. */
  12. #undef TRACE_SYSTEM
  13. #define TRACE_SYSTEM rpmh
  14. #if !defined(_TRACE_RPMH_H) || defined(TRACE_HEADER_MULTI_READ)
  15. #define _TRACE_RPMH_H
  16. #include <linux/tracepoint.h>
  17. DECLARE_EVENT_CLASS(rpmh_ack_recvd,
  18. TP_PROTO(const char *s, int m, u32 addr, int errno),
  19. TP_ARGS(s, m, addr, errno),
  20. TP_STRUCT__entry(
  21. __field(const char *, name)
  22. __field(int, m)
  23. __field(u32, addr)
  24. __field(int, errno)
  25. ),
  26. TP_fast_assign(
  27. __entry->name = s;
  28. __entry->m = m;
  29. __entry->addr = addr;
  30. __entry->errno = errno;
  31. ),
  32. TP_printk("%s: ack: tcs-m:%d addr: 0x%08x errno: %d",
  33. __entry->name, __entry->m, __entry->addr, __entry->errno)
  34. );
  35. DEFINE_EVENT(rpmh_ack_recvd, rpmh_notify_irq,
  36. TP_PROTO(const char *s, int m, u32 addr, int err),
  37. TP_ARGS(s, m, addr, err)
  38. );
  39. DEFINE_EVENT(rpmh_ack_recvd, rpmh_notify,
  40. TP_PROTO(const char *s, int m, u32 addr, int err),
  41. TP_ARGS(s, m, addr, err)
  42. );
  43. TRACE_EVENT(rpmh_send_msg,
  44. TP_PROTO(const char *s, unsigned long b, int m, int n, u32 h, u32 a,
  45. u32 v, bool c, bool t),
  46. TP_ARGS(s, b, m, n, h, a, v, c, t),
  47. TP_STRUCT__entry(
  48. __field(const char*, name)
  49. __field(unsigned long, base)
  50. __field(int, m)
  51. __field(int, n)
  52. __field(u32, hdr)
  53. __field(u32, addr)
  54. __field(u32, data)
  55. __field(bool, complete)
  56. __field(bool, trigger)
  57. ),
  58. TP_fast_assign(
  59. __entry->name = s;
  60. __entry->base = b;
  61. __entry->m = m;
  62. __entry->n = n;
  63. __entry->hdr = h;
  64. __entry->addr = a;
  65. __entry->data = v;
  66. __entry->complete = c;
  67. __entry->trigger = t;
  68. ),
  69. TP_printk("%s: reg: 0x%08lx send-msg: tcs(m): %d cmd(n): %d msgid: 0x%08x addr: 0x%08x data: 0x%08x complete: %d trigger: %d",
  70. __entry->name, __entry->base, __entry->m,
  71. __entry->n, __entry->hdr, __entry->addr,
  72. __entry->data, __entry->complete, __entry->trigger)
  73. );
  74. TRACE_EVENT(rpmh_control_msg,
  75. TP_PROTO(const char *s, u32 v),
  76. TP_ARGS(s, v),
  77. TP_STRUCT__entry(
  78. __field(const char *, name)
  79. __field(u32, data)
  80. ),
  81. TP_fast_assign(
  82. __entry->name = s;
  83. __entry->data = v;
  84. ),
  85. TP_printk("%s: ctrl-msg: data: 0x%08x",
  86. __entry->name, __entry->data)
  87. );
  88. #endif /* _TRACE_RPMH_H */
  89. #define TRACE_INCLUDE_FILE rpmh
  90. #include <trace/define_trace.h>