trace_rpm_smd.h 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  1. /* Copyright (c) 2012, 2014-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 rpm_smd
  14. #if !defined(_TRACE_RPM_SMD_H) || defined(TRACE_HEADER_MULTI_READ)
  15. #define _TRACE_RPM_SMD_H
  16. #include <linux/tracepoint.h>
  17. TRACE_EVENT(rpm_smd_ack_recvd,
  18. TP_PROTO(unsigned int irq, unsigned int msg_id, int errno),
  19. TP_ARGS(irq, msg_id, errno),
  20. TP_STRUCT__entry(
  21. __field(int, irq)
  22. __field(int, msg_id)
  23. __field(int, errno)
  24. ),
  25. TP_fast_assign(
  26. __entry->irq = irq;
  27. __entry->msg_id = msg_id;
  28. __entry->errno = errno;
  29. ),
  30. TP_printk("ctx:%s msg_id:%d errno:%08x",
  31. __entry->irq ? "noslp" : "sleep",
  32. __entry->msg_id,
  33. __entry->errno)
  34. );
  35. TRACE_EVENT(rpm_smd_interrupt_notify,
  36. TP_PROTO(char *dummy),
  37. TP_ARGS(dummy),
  38. TP_STRUCT__entry(
  39. __field(char *, dummy)
  40. ),
  41. TP_fast_assign(
  42. __entry->dummy = dummy;
  43. ),
  44. TP_printk("%s", __entry->dummy)
  45. );
  46. DECLARE_EVENT_CLASS(rpm_send_msg,
  47. TP_PROTO(unsigned int msg_id, unsigned int rsc_type,
  48. unsigned int rsc_id),
  49. TP_ARGS(msg_id, rsc_type, rsc_id),
  50. TP_STRUCT__entry(
  51. __field(u32, msg_id)
  52. __field(u32, rsc_type)
  53. __field(u32, rsc_id)
  54. __array(char, name, 5)
  55. ),
  56. TP_fast_assign(
  57. __entry->msg_id = msg_id;
  58. __entry->name[4] = 0;
  59. __entry->rsc_type = rsc_type;
  60. __entry->rsc_id = rsc_id;
  61. memcpy(__entry->name, &rsc_type, sizeof(uint32_t));
  62. ),
  63. TP_printk("msg_id:%d, rsc_type:0x%08x(%s), rsc_id:0x%08x",
  64. __entry->msg_id,
  65. __entry->rsc_type, __entry->name,
  66. __entry->rsc_id)
  67. );
  68. DEFINE_EVENT(rpm_send_msg, rpm_smd_sleep_set,
  69. TP_PROTO(unsigned int msg_id, unsigned int rsc_type,
  70. unsigned int rsc_id),
  71. TP_ARGS(msg_id, rsc_type, rsc_id)
  72. );
  73. DEFINE_EVENT(rpm_send_msg, rpm_smd_send_sleep_set,
  74. TP_PROTO(unsigned int msg_id, unsigned int rsc_type,
  75. unsigned int rsc_id),
  76. TP_ARGS(msg_id, rsc_type, rsc_id)
  77. );
  78. DEFINE_EVENT(rpm_send_msg, rpm_smd_send_active_set,
  79. TP_PROTO(unsigned int msg_id, unsigned int rsc_type,
  80. unsigned int rsc_id),
  81. TP_ARGS(msg_id, rsc_type, rsc_id)
  82. );
  83. #endif
  84. #define TRACE_INCLUDE_FILE trace_rpm_smd
  85. #include <trace/define_trace.h>