xref: /openbmc/linux/arch/s390/include/asm/trace/diag.h (revision e3d786a3)
1 /* SPDX-License-Identifier: GPL-2.0 */
2 /*
3  * Tracepoint header for s390 diagnose calls
4  *
5  * Copyright IBM Corp. 2015
6  * Author(s): Martin Schwidefsky <schwidefsky@de.ibm.com>
7  */
8 
9 #undef TRACE_SYSTEM
10 #define TRACE_SYSTEM s390
11 
12 #if !defined(_TRACE_S390_DIAG_H) || defined(TRACE_HEADER_MULTI_READ)
13 #define _TRACE_S390_DIAG_H
14 
15 #include <linux/tracepoint.h>
16 
17 #undef TRACE_INCLUDE_PATH
18 #undef TRACE_INCLUDE_FILE
19 
20 #define TRACE_INCLUDE_PATH asm/trace
21 #define TRACE_INCLUDE_FILE diag
22 
23 TRACE_EVENT(s390_diagnose,
24 	TP_PROTO(unsigned short nr),
25 	TP_ARGS(nr),
26 	TP_STRUCT__entry(
27 		__field(unsigned short, nr)
28 	),
29 	TP_fast_assign(
30 		__entry->nr = nr;
31 	),
32 	TP_printk("nr=0x%x", __entry->nr)
33 );
34 
35 #ifdef CONFIG_TRACEPOINTS
36 void trace_s390_diagnose_norecursion(int diag_nr);
37 #else
38 static inline void trace_s390_diagnose_norecursion(int diag_nr) { }
39 #endif
40 
41 #endif /* _TRACE_S390_DIAG_H */
42 
43 /* This part must be outside protection */
44 #include <trace/define_trace.h>
45