mei-trace.h 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. /*
  2. *
  3. * Intel Management Engine Interface (Intel MEI) Linux driver
  4. * Copyright (c) 2015, Intel Corporation.
  5. *
  6. * This program is free software; you can redistribute it and/or modify it
  7. * under the terms and conditions of the GNU General Public License,
  8. * version 2, as published by the Free Software Foundation.
  9. *
  10. * This program is distributed in the hope it will be useful, but WITHOUT
  11. * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  12. * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
  13. * more details.
  14. *
  15. */
  16. #if !defined(_MEI_TRACE_H_) || defined(TRACE_HEADER_MULTI_READ)
  17. #define _MEI_TRACE_H_
  18. #include <linux/stringify.h>
  19. #include <linux/types.h>
  20. #include <linux/tracepoint.h>
  21. #include <linux/device.h>
  22. #undef TRACE_SYSTEM
  23. #define TRACE_SYSTEM mei
  24. TRACE_EVENT(mei_reg_read,
  25. TP_PROTO(const struct device *dev, const char *reg, u32 offs, u32 val),
  26. TP_ARGS(dev, reg, offs, val),
  27. TP_STRUCT__entry(
  28. __string(dev, dev_name(dev))
  29. __field(const char *, reg)
  30. __field(u32, offs)
  31. __field(u32, val)
  32. ),
  33. TP_fast_assign(
  34. __assign_str(dev, dev_name(dev))
  35. __entry->reg = reg;
  36. __entry->offs = offs;
  37. __entry->val = val;
  38. ),
  39. TP_printk("[%s] read %s:[%#x] = %#x",
  40. __get_str(dev), __entry->reg, __entry->offs, __entry->val)
  41. );
  42. TRACE_EVENT(mei_reg_write,
  43. TP_PROTO(const struct device *dev, const char *reg, u32 offs, u32 val),
  44. TP_ARGS(dev, reg, offs, val),
  45. TP_STRUCT__entry(
  46. __string(dev, dev_name(dev))
  47. __field(const char *, reg)
  48. __field(u32, offs)
  49. __field(u32, val)
  50. ),
  51. TP_fast_assign(
  52. __assign_str(dev, dev_name(dev))
  53. __entry->reg = reg;
  54. __entry->offs = offs;
  55. __entry->val = val;
  56. ),
  57. TP_printk("[%s] write %s[%#x] = %#x",
  58. __get_str(dev), __entry->reg, __entry->offs, __entry->val)
  59. );
  60. TRACE_EVENT(mei_pci_cfg_read,
  61. TP_PROTO(const struct device *dev, const char *reg, u32 offs, u32 val),
  62. TP_ARGS(dev, reg, offs, val),
  63. TP_STRUCT__entry(
  64. __string(dev, dev_name(dev))
  65. __field(const char *, reg)
  66. __field(u32, offs)
  67. __field(u32, val)
  68. ),
  69. TP_fast_assign(
  70. __assign_str(dev, dev_name(dev))
  71. __entry->reg = reg;
  72. __entry->offs = offs;
  73. __entry->val = val;
  74. ),
  75. TP_printk("[%s] pci cfg read %s:[%#x] = %#x",
  76. __get_str(dev), __entry->reg, __entry->offs, __entry->val)
  77. );
  78. #endif /* _MEI_TRACE_H_ */
  79. /* This part must be outside protection */
  80. #undef TRACE_INCLUDE_PATH
  81. #undef TRACE_INCLUDE_FILE
  82. #define TRACE_INCLUDE_PATH .
  83. #define TRACE_INCLUDE_FILE mei-trace
  84. #include <trace/define_trace.h>