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 17 #if !defined(_MEI_TRACE_H_) || defined(TRACE_HEADER_MULTI_READ) 18 #define _MEI_TRACE_H_ 19 20 #include <linux/stringify.h> 21 #include <linux/types.h> 22 #include <linux/tracepoint.h> 23 24 #include <linux/device.h> 25 26 #undef TRACE_SYSTEM 27 #define TRACE_SYSTEM mei 28 29 TRACE_EVENT(mei_reg_read, 30 TP_PROTO(const struct device *dev, const char *reg, u32 offs, u32 val), 31 TP_ARGS(dev, reg, offs, val), 32 TP_STRUCT__entry( 33 __string(dev, dev_name(dev)) 34 __field(const char *, reg) 35 __field(u32, offs) 36 __field(u32, val) 37 ), 38 TP_fast_assign( 39 __assign_str(dev, dev_name(dev)) 40 __entry->reg = reg; 41 __entry->offs = offs; 42 __entry->val = val; 43 ), 44 TP_printk("[%s] read %s:[%#x] = %#x", 45 __get_str(dev), __entry->reg, __entry->offs, __entry->val) 46 ); 47 48 TRACE_EVENT(mei_reg_write, 49 TP_PROTO(const struct device *dev, const char *reg, u32 offs, u32 val), 50 TP_ARGS(dev, reg, offs, val), 51 TP_STRUCT__entry( 52 __string(dev, dev_name(dev)) 53 __field(const char *, reg) 54 __field(u32, offs) 55 __field(u32, val) 56 ), 57 TP_fast_assign( 58 __assign_str(dev, dev_name(dev)) 59 __entry->reg = reg; 60 __entry->offs = offs; 61 __entry->val = val; 62 ), 63 TP_printk("[%s] write %s[%#x] = %#x", 64 __get_str(dev), __entry->reg, __entry->offs, __entry->val) 65 ); 66 67 TRACE_EVENT(mei_pci_cfg_read, 68 TP_PROTO(const struct device *dev, const char *reg, u32 offs, u32 val), 69 TP_ARGS(dev, reg, offs, val), 70 TP_STRUCT__entry( 71 __string(dev, dev_name(dev)) 72 __field(const char *, reg) 73 __field(u32, offs) 74 __field(u32, val) 75 ), 76 TP_fast_assign( 77 __assign_str(dev, dev_name(dev)) 78 __entry->reg = reg; 79 __entry->offs = offs; 80 __entry->val = val; 81 ), 82 TP_printk("[%s] pci cfg read %s:[%#x] = %#x", 83 __get_str(dev), __entry->reg, __entry->offs, __entry->val) 84 ); 85 86 TRACE_EVENT(mei_pci_cfg_write, 87 TP_PROTO(const struct device *dev, const char *reg, u32 offs, u32 val), 88 TP_ARGS(dev, reg, offs, val), 89 TP_STRUCT__entry( 90 __string(dev, dev_name(dev)) 91 __field(const char *, reg) 92 __field(u32, offs) 93 __field(u32, val) 94 ), 95 TP_fast_assign( 96 __assign_str(dev, dev_name(dev)) 97 __entry->reg = reg; 98 __entry->offs = offs; 99 __entry->val = val; 100 ), 101 TP_printk("[%s] pci cfg write %s[%#x] = %#x", 102 __get_str(dev), __entry->reg, __entry->offs, __entry->val) 103 ); 104 105 #endif /* _MEI_TRACE_H_ */ 106 107 /* This part must be outside protection */ 108 #undef TRACE_INCLUDE_PATH 109 #undef TRACE_INCLUDE_FILE 110 #define TRACE_INCLUDE_PATH . 111 #define TRACE_INCLUDE_FILE mei-trace 112 #include <trace/define_trace.h> 113