1*b2441318SGreg Kroah-Hartman /* SPDX-License-Identifier: GPL-2.0 */ 28968f9d3SHidetoshi Seto #undef TRACE_SYSTEM 38968f9d3SHidetoshi Seto #define TRACE_SYSTEM mce 48968f9d3SHidetoshi Seto 58968f9d3SHidetoshi Seto #if !defined(_TRACE_MCE_H) || defined(TRACE_HEADER_MULTI_READ) 68968f9d3SHidetoshi Seto #define _TRACE_MCE_H 78968f9d3SHidetoshi Seto 88968f9d3SHidetoshi Seto #include <linux/ktime.h> 98968f9d3SHidetoshi Seto #include <linux/tracepoint.h> 108968f9d3SHidetoshi Seto #include <asm/mce.h> 118968f9d3SHidetoshi Seto 128968f9d3SHidetoshi Seto TRACE_EVENT(mce_record, 138968f9d3SHidetoshi Seto 148968f9d3SHidetoshi Seto TP_PROTO(struct mce *m), 158968f9d3SHidetoshi Seto 168968f9d3SHidetoshi Seto TP_ARGS(m), 178968f9d3SHidetoshi Seto 188968f9d3SHidetoshi Seto TP_STRUCT__entry( 198968f9d3SHidetoshi Seto __field( u64, mcgcap ) 208968f9d3SHidetoshi Seto __field( u64, mcgstatus ) 218968f9d3SHidetoshi Seto __field( u64, status ) 228968f9d3SHidetoshi Seto __field( u64, addr ) 238968f9d3SHidetoshi Seto __field( u64, misc ) 24db819d60SYazen Ghannam __field( u64, synd ) 255828c46fSYazen Ghannam __field( u64, ipid ) 268968f9d3SHidetoshi Seto __field( u64, ip ) 278968f9d3SHidetoshi Seto __field( u64, tsc ) 288968f9d3SHidetoshi Seto __field( u64, walltime ) 298968f9d3SHidetoshi Seto __field( u32, cpu ) 308968f9d3SHidetoshi Seto __field( u32, cpuid ) 318968f9d3SHidetoshi Seto __field( u32, apicid ) 328968f9d3SHidetoshi Seto __field( u32, socketid ) 33ad440ad6SDavid Sharp __field( u8, cs ) 34ad440ad6SDavid Sharp __field( u8, bank ) 358968f9d3SHidetoshi Seto __field( u8, cpuvendor ) 368968f9d3SHidetoshi Seto ), 378968f9d3SHidetoshi Seto 388968f9d3SHidetoshi Seto TP_fast_assign( 398968f9d3SHidetoshi Seto __entry->mcgcap = m->mcgcap; 408968f9d3SHidetoshi Seto __entry->mcgstatus = m->mcgstatus; 418968f9d3SHidetoshi Seto __entry->status = m->status; 428968f9d3SHidetoshi Seto __entry->addr = m->addr; 438968f9d3SHidetoshi Seto __entry->misc = m->misc; 44db819d60SYazen Ghannam __entry->synd = m->synd; 455828c46fSYazen Ghannam __entry->ipid = m->ipid; 468968f9d3SHidetoshi Seto __entry->ip = m->ip; 478968f9d3SHidetoshi Seto __entry->tsc = m->tsc; 488968f9d3SHidetoshi Seto __entry->walltime = m->time; 498968f9d3SHidetoshi Seto __entry->cpu = m->extcpu; 508968f9d3SHidetoshi Seto __entry->cpuid = m->cpuid; 518968f9d3SHidetoshi Seto __entry->apicid = m->apicid; 528968f9d3SHidetoshi Seto __entry->socketid = m->socketid; 53ad440ad6SDavid Sharp __entry->cs = m->cs; 54ad440ad6SDavid Sharp __entry->bank = m->bank; 558968f9d3SHidetoshi Seto __entry->cpuvendor = m->cpuvendor; 568968f9d3SHidetoshi Seto ), 578968f9d3SHidetoshi Seto 585828c46fSYazen Ghannam 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", 598968f9d3SHidetoshi Seto __entry->cpu, 608968f9d3SHidetoshi Seto __entry->mcgcap, __entry->mcgstatus, 618968f9d3SHidetoshi Seto __entry->bank, __entry->status, 625828c46fSYazen Ghannam __entry->ipid, 63db819d60SYazen Ghannam __entry->addr, __entry->misc, __entry->synd, 648968f9d3SHidetoshi Seto __entry->cs, __entry->ip, 658968f9d3SHidetoshi Seto __entry->tsc, 668968f9d3SHidetoshi Seto __entry->cpuvendor, __entry->cpuid, 678968f9d3SHidetoshi Seto __entry->walltime, 688968f9d3SHidetoshi Seto __entry->socketid, 698968f9d3SHidetoshi Seto __entry->apicid) 708968f9d3SHidetoshi Seto ); 718968f9d3SHidetoshi Seto 728968f9d3SHidetoshi Seto #endif /* _TRACE_MCE_H */ 738968f9d3SHidetoshi Seto 748968f9d3SHidetoshi Seto /* This part must be outside protection */ 758968f9d3SHidetoshi Seto #include <trace/define_trace.h> 76