Greg Kroah-Hartman | b244131 | 2017-11-01 15:07:57 +0100 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0 */ |
Hidetoshi Seto | 8968f9d | 2009-10-13 16:19:41 +0900 | [diff] [blame] | 2 | #undef TRACE_SYSTEM |
| 3 | #define TRACE_SYSTEM mce |
| 4 | |
| 5 | #if !defined(_TRACE_MCE_H) || defined(TRACE_HEADER_MULTI_READ) |
| 6 | #define _TRACE_MCE_H |
| 7 | |
| 8 | #include <linux/ktime.h> |
| 9 | #include <linux/tracepoint.h> |
| 10 | #include <asm/mce.h> |
| 11 | |
| 12 | TRACE_EVENT(mce_record, |
| 13 | |
| 14 | TP_PROTO(struct mce *m), |
| 15 | |
| 16 | TP_ARGS(m), |
| 17 | |
| 18 | TP_STRUCT__entry( |
| 19 | __field( u64, mcgcap ) |
| 20 | __field( u64, mcgstatus ) |
Hidetoshi Seto | 8968f9d | 2009-10-13 16:19:41 +0900 | [diff] [blame] | 21 | __field( u64, status ) |
| 22 | __field( u64, addr ) |
| 23 | __field( u64, misc ) |
Yazen Ghannam | db819d6 | 2016-09-12 09:59:28 +0200 | [diff] [blame] | 24 | __field( u64, synd ) |
Yazen Ghannam | 5828c46 | 2016-09-12 09:59:37 +0200 | [diff] [blame] | 25 | __field( u64, ipid ) |
Hidetoshi Seto | 8968f9d | 2009-10-13 16:19:41 +0900 | [diff] [blame] | 26 | __field( u64, ip ) |
Hidetoshi Seto | 8968f9d | 2009-10-13 16:19:41 +0900 | [diff] [blame] | 27 | __field( u64, tsc ) |
| 28 | __field( u64, walltime ) |
| 29 | __field( u32, cpu ) |
| 30 | __field( u32, cpuid ) |
| 31 | __field( u32, apicid ) |
| 32 | __field( u32, socketid ) |
David Sharp | ad440ad | 2010-12-03 16:13:22 -0800 | [diff] [blame] | 33 | __field( u8, cs ) |
| 34 | __field( u8, bank ) |
Hidetoshi Seto | 8968f9d | 2009-10-13 16:19:41 +0900 | [diff] [blame] | 35 | __field( u8, cpuvendor ) |
| 36 | ), |
| 37 | |
| 38 | TP_fast_assign( |
| 39 | __entry->mcgcap = m->mcgcap; |
| 40 | __entry->mcgstatus = m->mcgstatus; |
Hidetoshi Seto | 8968f9d | 2009-10-13 16:19:41 +0900 | [diff] [blame] | 41 | __entry->status = m->status; |
| 42 | __entry->addr = m->addr; |
| 43 | __entry->misc = m->misc; |
Yazen Ghannam | db819d6 | 2016-09-12 09:59:28 +0200 | [diff] [blame] | 44 | __entry->synd = m->synd; |
Yazen Ghannam | 5828c46 | 2016-09-12 09:59:37 +0200 | [diff] [blame] | 45 | __entry->ipid = m->ipid; |
Hidetoshi Seto | 8968f9d | 2009-10-13 16:19:41 +0900 | [diff] [blame] | 46 | __entry->ip = m->ip; |
Hidetoshi Seto | 8968f9d | 2009-10-13 16:19:41 +0900 | [diff] [blame] | 47 | __entry->tsc = m->tsc; |
| 48 | __entry->walltime = m->time; |
| 49 | __entry->cpu = m->extcpu; |
| 50 | __entry->cpuid = m->cpuid; |
| 51 | __entry->apicid = m->apicid; |
| 52 | __entry->socketid = m->socketid; |
David Sharp | ad440ad | 2010-12-03 16:13:22 -0800 | [diff] [blame] | 53 | __entry->cs = m->cs; |
| 54 | __entry->bank = m->bank; |
Hidetoshi Seto | 8968f9d | 2009-10-13 16:19:41 +0900 | [diff] [blame] | 55 | __entry->cpuvendor = m->cpuvendor; |
| 56 | ), |
| 57 | |
Yazen Ghannam | 5828c46 | 2016-09-12 09:59:37 +0200 | [diff] [blame] | 58 | 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", |
Hidetoshi Seto | 8968f9d | 2009-10-13 16:19:41 +0900 | [diff] [blame] | 59 | __entry->cpu, |
| 60 | __entry->mcgcap, __entry->mcgstatus, |
| 61 | __entry->bank, __entry->status, |
Yazen Ghannam | 5828c46 | 2016-09-12 09:59:37 +0200 | [diff] [blame] | 62 | __entry->ipid, |
Yazen Ghannam | db819d6 | 2016-09-12 09:59:28 +0200 | [diff] [blame] | 63 | __entry->addr, __entry->misc, __entry->synd, |
Hidetoshi Seto | 8968f9d | 2009-10-13 16:19:41 +0900 | [diff] [blame] | 64 | __entry->cs, __entry->ip, |
| 65 | __entry->tsc, |
| 66 | __entry->cpuvendor, __entry->cpuid, |
| 67 | __entry->walltime, |
| 68 | __entry->socketid, |
| 69 | __entry->apicid) |
| 70 | ); |
| 71 | |
| 72 | #endif /* _TRACE_MCE_H */ |
| 73 | |
| 74 | /* This part must be outside protection */ |
| 75 | #include <trace/define_trace.h> |