mce.h 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. #undef TRACE_SYSTEM
  3. #define TRACE_SYSTEM mce
  4. #if !defined(_TRACE_MCE_H) || defined(TRACE_HEADER_MULTI_READ)
  5. #define _TRACE_MCE_H
  6. #include <linux/ktime.h>
  7. #include <linux/tracepoint.h>
  8. #include <asm/mce.h>
  9. TRACE_EVENT(mce_record,
  10. TP_PROTO(struct mce *m),
  11. TP_ARGS(m),
  12. TP_STRUCT__entry(
  13. __field( u64, mcgcap )
  14. __field( u64, mcgstatus )
  15. __field( u64, status )
  16. __field( u64, addr )
  17. __field( u64, misc )
  18. __field( u64, synd )
  19. __field( u64, ipid )
  20. __field( u64, ip )
  21. __field( u64, tsc )
  22. __field( u64, walltime )
  23. __field( u32, cpu )
  24. __field( u32, cpuid )
  25. __field( u32, apicid )
  26. __field( u32, socketid )
  27. __field( u8, cs )
  28. __field( u8, bank )
  29. __field( u8, cpuvendor )
  30. ),
  31. TP_fast_assign(
  32. __entry->mcgcap = m->mcgcap;
  33. __entry->mcgstatus = m->mcgstatus;
  34. __entry->status = m->status;
  35. __entry->addr = m->addr;
  36. __entry->misc = m->misc;
  37. __entry->synd = m->synd;
  38. __entry->ipid = m->ipid;
  39. __entry->ip = m->ip;
  40. __entry->tsc = m->tsc;
  41. __entry->walltime = m->time;
  42. __entry->cpu = m->extcpu;
  43. __entry->cpuid = m->cpuid;
  44. __entry->apicid = m->apicid;
  45. __entry->socketid = m->socketid;
  46. __entry->cs = m->cs;
  47. __entry->bank = m->bank;
  48. __entry->cpuvendor = m->cpuvendor;
  49. ),
  50. TP_printk("CPU: %d, MCGc/s: %llx/%llx, MC%d: %016Lx, IPID: %016Lx, ADDR/MISC/SYND: %016Lx/%016Lx/%016Lx, RIP: %02x:<%016Lx>, TSC: %llx, PROCESSOR: %u:%x, TIME: %llu, SOCKET: %u, APIC: %x",
  51. __entry->cpu,
  52. __entry->mcgcap, __entry->mcgstatus,
  53. __entry->bank, __entry->status,
  54. __entry->ipid,
  55. __entry->addr, __entry->misc, __entry->synd,
  56. __entry->cs, __entry->ip,
  57. __entry->tsc,
  58. __entry->cpuvendor, __entry->cpuid,
  59. __entry->walltime,
  60. __entry->socketid,
  61. __entry->apicid)
  62. );
  63. #endif /* _TRACE_MCE_H */
  64. /* This part must be outside protection */
  65. #include <trace/define_trace.h>