trace-rpmh.h 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. /*
  3. * Copyright (c) 2016-2018, The Linux Foundation. All rights reserved.
  4. */
  5. #if !defined(_TRACE_RPMH_H) || defined(TRACE_HEADER_MULTI_READ)
  6. #define _TRACE_RPMH_H
  7. #undef TRACE_SYSTEM
  8. #define TRACE_SYSTEM rpmh
  9. #include <linux/tracepoint.h>
  10. #include "rpmh-internal.h"
  11. TRACE_EVENT(rpmh_tx_done,
  12. TP_PROTO(struct rsc_drv *d, int m, const struct tcs_request *r, int e),
  13. TP_ARGS(d, m, r, e),
  14. TP_STRUCT__entry(
  15. __string(name, d->name)
  16. __field(int, m)
  17. __field(u32, addr)
  18. __field(u32, data)
  19. __field(int, err)
  20. ),
  21. TP_fast_assign(
  22. __assign_str(name, d->name);
  23. __entry->m = m;
  24. __entry->addr = r->cmds[0].addr;
  25. __entry->data = r->cmds[0].data;
  26. __entry->err = e;
  27. ),
  28. TP_printk("%s: ack: tcs-m: %d addr: %#x data: %#x errno: %d",
  29. __get_str(name), __entry->m, __entry->addr, __entry->data,
  30. __entry->err)
  31. );
  32. TRACE_EVENT(rpmh_send_msg,
  33. TP_PROTO(struct rsc_drv *d, int m, int n, u32 h,
  34. const struct tcs_cmd *c),
  35. TP_ARGS(d, m, n, h, c),
  36. TP_STRUCT__entry(
  37. __string(name, d->name)
  38. __field(int, m)
  39. __field(int, n)
  40. __field(u32, hdr)
  41. __field(u32, addr)
  42. __field(u32, data)
  43. __field(bool, wait)
  44. ),
  45. TP_fast_assign(
  46. __assign_str(name, d->name);
  47. __entry->m = m;
  48. __entry->n = n;
  49. __entry->hdr = h;
  50. __entry->addr = c->addr;
  51. __entry->data = c->data;
  52. __entry->wait = c->wait;
  53. ),
  54. TP_printk("%s: send-msg: tcs(m): %d cmd(n): %d msgid: %#x addr: %#x data: %#x complete: %d",
  55. __get_str(name), __entry->m, __entry->n, __entry->hdr,
  56. __entry->addr, __entry->data, __entry->wait)
  57. );
  58. #endif /* _TRACE_RPMH_H */
  59. #undef TRACE_INCLUDE_PATH
  60. #define TRACE_INCLUDE_PATH .
  61. #undef TRACE_INCLUDE_FILE
  62. #define TRACE_INCLUDE_FILE trace-rpmh
  63. #include <trace/define_trace.h>