Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0 */
0002 /*
0003  * Trace events in pm8001 driver.
0004  *
0005  * Copyright 2020 Google LLC
0006  * Author: Akshat Jain <akshatzen@google.com>
0007  */
0008 
0009 #undef TRACE_SYSTEM
0010 #define TRACE_SYSTEM pm80xx
0011 
0012 #if !defined(_TRACE_PM80XX_H) || defined(TRACE_HEADER_MULTI_READ)
0013 #define _TRACE_PM80XX_H
0014 
0015 #include <linux/tracepoint.h>
0016 #include "pm8001_sas.h"
0017 
0018 TRACE_EVENT(pm80xx_request_issue,
0019         TP_PROTO(u32 id, u32 phy_id, u32 htag, u32 ctlr_opcode,
0020              u16 ata_opcode, int running_req),
0021 
0022         TP_ARGS(id, phy_id, htag, ctlr_opcode, ata_opcode, running_req),
0023 
0024         TP_STRUCT__entry(
0025             __field(u32, id)
0026             __field(u32, phy_id)
0027             __field(u32, htag)
0028             __field(u32, ctlr_opcode)
0029             __field(u16,  ata_opcode)
0030             __field(int, running_req)
0031             ),
0032 
0033         TP_fast_assign(
0034             __entry->id = id;
0035             __entry->phy_id = phy_id;
0036             __entry->htag = htag;
0037             __entry->ctlr_opcode = ctlr_opcode;
0038             __entry->ata_opcode = ata_opcode;
0039             __entry->running_req = running_req;
0040             ),
0041 
0042         TP_printk("ctlr_id = %u phy_id = %u htag = %#x, ctlr_opcode = %#x ata_opcode = %#x running_req = %d",
0043             __entry->id, __entry->phy_id, __entry->htag,
0044             __entry->ctlr_opcode, __entry->ata_opcode,
0045             __entry->running_req)
0046 );
0047 
0048 TRACE_EVENT(pm80xx_request_complete,
0049         TP_PROTO(u32 id, u32 phy_id, u32 htag, u32 ctlr_opcode,
0050              u16 ata_opcode, int running_req),
0051 
0052         TP_ARGS(id, phy_id, htag, ctlr_opcode, ata_opcode, running_req),
0053 
0054         TP_STRUCT__entry(
0055             __field(u32, id)
0056             __field(u32, phy_id)
0057             __field(u32, htag)
0058             __field(u32, ctlr_opcode)
0059             __field(u16,  ata_opcode)
0060             __field(int, running_req)
0061             ),
0062 
0063         TP_fast_assign(
0064             __entry->id = id;
0065             __entry->phy_id = phy_id;
0066             __entry->htag = htag;
0067             __entry->ctlr_opcode = ctlr_opcode;
0068             __entry->ata_opcode = ata_opcode;
0069             __entry->running_req = running_req;
0070             ),
0071 
0072         TP_printk("ctlr_id = %u phy_id = %u htag = %#x, ctlr_opcode = %#x ata_opcode = %#x running_req = %d",
0073             __entry->id, __entry->phy_id, __entry->htag,
0074             __entry->ctlr_opcode, __entry->ata_opcode,
0075             __entry->running_req)
0076 );
0077 
0078 TRACE_EVENT(pm80xx_mpi_build_cmd,
0079         TP_PROTO(u32 id, u32 opc, u32 htag, u32 qi, u32 pi, u32 ci),
0080 
0081         TP_ARGS(id, opc, htag, qi, pi, ci),
0082 
0083         TP_STRUCT__entry(
0084             __field(u32, id)
0085             __field(u32, opc)
0086             __field(u32, htag)
0087             __field(u32, qi)
0088             __field(u32, pi)
0089             __field(u32, ci)
0090             ),
0091 
0092         TP_fast_assign(
0093             __entry->id = id;
0094             __entry->opc = opc;
0095             __entry->htag = htag;
0096             __entry->qi = qi;
0097             __entry->pi = pi;
0098             __entry->ci = ci;
0099             ),
0100 
0101         TP_printk("ctlr_id = %u opc = %#x htag = %#x QI = %u PI = %u CI = %u",
0102             __entry->id, __entry->opc, __entry->htag, __entry->qi,
0103             __entry->pi, __entry->ci)
0104 );
0105 
0106 #endif /* _TRACE_PM80XX_H_ */
0107 
0108 #undef TRACE_INCLUDE_PATH
0109 #undef TRACE_INCLUDE_FILE
0110 #define TRACE_INCLUDE_PATH .
0111 #define TRACE_INCLUDE_FILE pm80xx_tracepoints
0112 
0113 #include <trace/define_trace.h>