pm80xx_tracepoints.h 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. /*
  3. * Trace events in pm8001 driver.
  4. *
  5. * Copyright 2020 Google LLC
  6. * Author: Akshat Jain <[email protected]>
  7. */
  8. #undef TRACE_SYSTEM
  9. #define TRACE_SYSTEM pm80xx
  10. #if !defined(_TRACE_PM80XX_H) || defined(TRACE_HEADER_MULTI_READ)
  11. #define _TRACE_PM80XX_H
  12. #include <linux/tracepoint.h>
  13. #include "pm8001_sas.h"
  14. TRACE_EVENT(pm80xx_request_issue,
  15. TP_PROTO(u32 id, u32 phy_id, u32 htag, u32 ctlr_opcode,
  16. u16 ata_opcode, int running_req),
  17. TP_ARGS(id, phy_id, htag, ctlr_opcode, ata_opcode, running_req),
  18. TP_STRUCT__entry(
  19. __field(u32, id)
  20. __field(u32, phy_id)
  21. __field(u32, htag)
  22. __field(u32, ctlr_opcode)
  23. __field(u16, ata_opcode)
  24. __field(int, running_req)
  25. ),
  26. TP_fast_assign(
  27. __entry->id = id;
  28. __entry->phy_id = phy_id;
  29. __entry->htag = htag;
  30. __entry->ctlr_opcode = ctlr_opcode;
  31. __entry->ata_opcode = ata_opcode;
  32. __entry->running_req = running_req;
  33. ),
  34. TP_printk("ctlr_id = %u phy_id = %u htag = %#x, ctlr_opcode = %#x ata_opcode = %#x running_req = %d",
  35. __entry->id, __entry->phy_id, __entry->htag,
  36. __entry->ctlr_opcode, __entry->ata_opcode,
  37. __entry->running_req)
  38. );
  39. TRACE_EVENT(pm80xx_request_complete,
  40. TP_PROTO(u32 id, u32 phy_id, u32 htag, u32 ctlr_opcode,
  41. u16 ata_opcode, int running_req),
  42. TP_ARGS(id, phy_id, htag, ctlr_opcode, ata_opcode, running_req),
  43. TP_STRUCT__entry(
  44. __field(u32, id)
  45. __field(u32, phy_id)
  46. __field(u32, htag)
  47. __field(u32, ctlr_opcode)
  48. __field(u16, ata_opcode)
  49. __field(int, running_req)
  50. ),
  51. TP_fast_assign(
  52. __entry->id = id;
  53. __entry->phy_id = phy_id;
  54. __entry->htag = htag;
  55. __entry->ctlr_opcode = ctlr_opcode;
  56. __entry->ata_opcode = ata_opcode;
  57. __entry->running_req = running_req;
  58. ),
  59. TP_printk("ctlr_id = %u phy_id = %u htag = %#x, ctlr_opcode = %#x ata_opcode = %#x running_req = %d",
  60. __entry->id, __entry->phy_id, __entry->htag,
  61. __entry->ctlr_opcode, __entry->ata_opcode,
  62. __entry->running_req)
  63. );
  64. TRACE_EVENT(pm80xx_mpi_build_cmd,
  65. TP_PROTO(u32 id, u32 opc, u32 htag, u32 qi, u32 pi, u32 ci),
  66. TP_ARGS(id, opc, htag, qi, pi, ci),
  67. TP_STRUCT__entry(
  68. __field(u32, id)
  69. __field(u32, opc)
  70. __field(u32, htag)
  71. __field(u32, qi)
  72. __field(u32, pi)
  73. __field(u32, ci)
  74. ),
  75. TP_fast_assign(
  76. __entry->id = id;
  77. __entry->opc = opc;
  78. __entry->htag = htag;
  79. __entry->qi = qi;
  80. __entry->pi = pi;
  81. __entry->ci = ci;
  82. ),
  83. TP_printk("ctlr_id = %u opc = %#x htag = %#x QI = %u PI = %u CI = %u",
  84. __entry->id, __entry->opc, __entry->htag, __entry->qi,
  85. __entry->pi, __entry->ci)
  86. );
  87. #endif /* _TRACE_PM80XX_H_ */
  88. #undef TRACE_INCLUDE_PATH
  89. #undef TRACE_INCLUDE_FILE
  90. #define TRACE_INCLUDE_PATH .
  91. #define TRACE_INCLUDE_FILE pm80xx_tracepoints
  92. #include <trace/define_trace.h>