Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0-only */
0002 /******************************************************************************
0003  *
0004  * Copyright(c) 2009 - 2014 Intel Corporation. All rights reserved.
0005  * Copyright(c) 2016-2017 Intel Deutschland GmbH
0006  *****************************************************************************/
0007 
0008 #if !defined(__IWLWIFI_DEVICE_TRACE_IO) || defined(TRACE_HEADER_MULTI_READ)
0009 #define __IWLWIFI_DEVICE_TRACE_IO
0010 
0011 #include <linux/tracepoint.h>
0012 #include <linux/pci.h>
0013 
0014 #undef TRACE_SYSTEM
0015 #define TRACE_SYSTEM iwlwifi_io
0016 
0017 TRACE_EVENT(iwlwifi_dev_ioread32,
0018     TP_PROTO(const struct device *dev, u32 offs, u32 val),
0019     TP_ARGS(dev, offs, val),
0020     TP_STRUCT__entry(
0021         DEV_ENTRY
0022         __field(u32, offs)
0023         __field(u32, val)
0024     ),
0025     TP_fast_assign(
0026         DEV_ASSIGN;
0027         __entry->offs = offs;
0028         __entry->val = val;
0029     ),
0030     TP_printk("[%s] read io[%#x] = %#x",
0031           __get_str(dev), __entry->offs, __entry->val)
0032 );
0033 
0034 TRACE_EVENT(iwlwifi_dev_iowrite8,
0035     TP_PROTO(const struct device *dev, u32 offs, u8 val),
0036     TP_ARGS(dev, offs, val),
0037     TP_STRUCT__entry(
0038         DEV_ENTRY
0039         __field(u32, offs)
0040         __field(u8, val)
0041     ),
0042     TP_fast_assign(
0043         DEV_ASSIGN;
0044         __entry->offs = offs;
0045         __entry->val = val;
0046     ),
0047     TP_printk("[%s] write io[%#x] = %#x)",
0048           __get_str(dev), __entry->offs, __entry->val)
0049 );
0050 
0051 TRACE_EVENT(iwlwifi_dev_iowrite32,
0052     TP_PROTO(const struct device *dev, u32 offs, u32 val),
0053     TP_ARGS(dev, offs, val),
0054     TP_STRUCT__entry(
0055         DEV_ENTRY
0056         __field(u32, offs)
0057         __field(u32, val)
0058     ),
0059     TP_fast_assign(
0060         DEV_ASSIGN;
0061         __entry->offs = offs;
0062         __entry->val = val;
0063     ),
0064     TP_printk("[%s] write io[%#x] = %#x)",
0065           __get_str(dev), __entry->offs, __entry->val)
0066 );
0067 
0068 TRACE_EVENT(iwlwifi_dev_iowrite64,
0069     TP_PROTO(const struct device *dev, u64 offs, u64 val),
0070     TP_ARGS(dev, offs, val),
0071     TP_STRUCT__entry(
0072         DEV_ENTRY
0073         __field(u64, offs)
0074         __field(u64, val)
0075     ),
0076     TP_fast_assign(
0077         DEV_ASSIGN;
0078         __entry->offs = offs;
0079         __entry->val = val;
0080     ),
0081     TP_printk("[%s] write io[%llu] = %llu)",
0082           __get_str(dev), __entry->offs, __entry->val)
0083 );
0084 
0085 TRACE_EVENT(iwlwifi_dev_iowrite_prph32,
0086     TP_PROTO(const struct device *dev, u32 offs, u32 val),
0087     TP_ARGS(dev, offs, val),
0088     TP_STRUCT__entry(
0089         DEV_ENTRY
0090         __field(u32, offs)
0091         __field(u32, val)
0092     ),
0093     TP_fast_assign(
0094         DEV_ASSIGN;
0095         __entry->offs = offs;
0096         __entry->val = val;
0097     ),
0098     TP_printk("[%s] write PRPH[%#x] = %#x)",
0099           __get_str(dev), __entry->offs, __entry->val)
0100 );
0101 
0102 TRACE_EVENT(iwlwifi_dev_iowrite_prph64,
0103     TP_PROTO(const struct device *dev, u64 offs, u64 val),
0104     TP_ARGS(dev, offs, val),
0105     TP_STRUCT__entry(
0106         DEV_ENTRY
0107         __field(u64, offs)
0108         __field(u64, val)
0109     ),
0110     TP_fast_assign(
0111         DEV_ASSIGN;
0112         __entry->offs = offs;
0113         __entry->val = val;
0114     ),
0115     TP_printk("[%s] write PRPH[%llu] = %llu)",
0116           __get_str(dev), __entry->offs, __entry->val)
0117 );
0118 
0119 TRACE_EVENT(iwlwifi_dev_ioread_prph32,
0120     TP_PROTO(const struct device *dev, u32 offs, u32 val),
0121     TP_ARGS(dev, offs, val),
0122     TP_STRUCT__entry(
0123         DEV_ENTRY
0124         __field(u32, offs)
0125         __field(u32, val)
0126     ),
0127     TP_fast_assign(
0128         DEV_ASSIGN;
0129         __entry->offs = offs;
0130         __entry->val = val;
0131     ),
0132     TP_printk("[%s] read PRPH[%#x] = %#x",
0133           __get_str(dev), __entry->offs, __entry->val)
0134 );
0135 
0136 TRACE_EVENT(iwlwifi_dev_irq,
0137     TP_PROTO(const struct device *dev),
0138     TP_ARGS(dev),
0139     TP_STRUCT__entry(
0140         DEV_ENTRY
0141     ),
0142     TP_fast_assign(
0143         DEV_ASSIGN;
0144     ),
0145     /* TP_printk("") doesn't compile */
0146     TP_printk("%d", 0)
0147 );
0148 
0149 TRACE_EVENT(iwlwifi_dev_irq_msix,
0150     TP_PROTO(const struct device *dev, struct msix_entry *msix_entry,
0151          bool defirq, u32 inta_fh, u32 inta_hw),
0152     TP_ARGS(dev, msix_entry, defirq, inta_fh, inta_hw),
0153     TP_STRUCT__entry(
0154         DEV_ENTRY
0155         __field(u32, entry)
0156         __field(u8, defirq)
0157         __field(u32, inta_fh)
0158         __field(u32, inta_hw)
0159     ),
0160     TP_fast_assign(
0161         DEV_ASSIGN;
0162         __entry->entry = msix_entry->entry;
0163         __entry->defirq = defirq;
0164         __entry->inta_fh = inta_fh;
0165         __entry->inta_hw = inta_hw;
0166     ),
0167     TP_printk("entry:%d defirq:%d fh:0x%x, hw:0x%x",
0168           __entry->entry, __entry->defirq,
0169           __entry->inta_fh, __entry->inta_hw)
0170 );
0171 
0172 TRACE_EVENT(iwlwifi_dev_ict_read,
0173     TP_PROTO(const struct device *dev, u32 index, u32 value),
0174     TP_ARGS(dev, index, value),
0175     TP_STRUCT__entry(
0176         DEV_ENTRY
0177         __field(u32, index)
0178         __field(u32, value)
0179     ),
0180     TP_fast_assign(
0181         DEV_ASSIGN;
0182         __entry->index = index;
0183         __entry->value = value;
0184     ),
0185     TP_printk("[%s] read ict[%d] = %#.8x",
0186           __get_str(dev), __entry->index, __entry->value)
0187 );
0188 #endif /* __IWLWIFI_DEVICE_TRACE_IO */
0189 
0190 #undef TRACE_INCLUDE_PATH
0191 #define TRACE_INCLUDE_PATH .
0192 #undef TRACE_INCLUDE_FILE
0193 #define TRACE_INCLUDE_FILE iwl-devtrace-io
0194 #include <trace/define_trace.h>