Debian Codegraph @

arch/s390/include/asm/trace/ap.h

raw
1 /* SPDX-License-Identifier: GPL-2.0 */
2 /*
3 * Tracepoint definitions for s390 ap bus related trace events
4 *
5 * There are two AP bus related tracepoint events defined here:
6 * There is a tracepoint s390_ap_nqap event immediately after a request
7 * has been pushed into the AP firmware queue with the NQAP AP command.
8 * The other tracepoint s390_ap_dqap event fires immediately after a
9 * reply has been pulled out of the AP firmware queue via DQAP AP command.
10 * The idea of these two trace events focuses on performance to measure
11 * the runtime of a crypto request/reply as close as possible at the
12 * firmware level. In combination with the two zcrypt tracepoints (see the
13 * zcrypt.h trace event definition file) this gives measurement data about
14 * the runtime of a request/reply within the zcrpyt and AP bus layer.
15 */
16
17 #undef TRACE_SYSTEM
18 #define TRACE_SYSTEM s390
19
20 #if !defined(_TRACE_S390_AP_H) || defined(TRACE_HEADER_MULTI_READ)
21 #define _TRACE_S390_AP_H
22
23 #include <linux/tracepoint.h>
24
25 DECLARE_EVENT_CLASS(s390_ap_nqapdqap_template,
26 TP_PROTO(u16 card, u16 dom, u32 status, u64 psmid),
27 TP_ARGS(card, dom, status, psmid),
28 TP_STRUCT__entry(
29 __field(u16, card)
30 __field(u16, dom)
31 __field(u32, status)
32 __field(u64, psmid)),
33 TP_fast_assign(
34 __entry->card = card;
35 __entry->dom = dom;
36 __entry->status = status;
37 __entry->psmid = psmid;),
38 TP_printk("card=%u dom=%u status=0x%08x psmid=0x%016lx",
39 (unsigned short)__entry->card,
40 (unsigned short)__entry->dom,
41 (unsigned int)__entry->status,
42 (unsigned long)__entry->psmid)
43 );
44
45 /**
46 * trace_s390_ap_nqap - ap msg nqap tracepoint function
47 * @card: Crypto card number addressed.
48 * @dom: Domain within the crypto card addressed.
49 * @status: AP queue status (GR1 on return of nqap).
50 * @psmid: Unique id identifying this request/reply.
51 *
52 * Called immediately after a request has been enqueued into
53 * the AP firmware queue with the NQAP command.
54 */
55 DEFINE_EVENT(s390_ap_nqapdqap_template,
56 s390_ap_nqap,
57 TP_PROTO(u16 card, u16 dom, u32 status, u64 psmid),
58 TP_ARGS(card, dom, status, psmid)
59 );
60
61 /**
62 * trace_s390_ap_dqap - ap msg dqap tracepoint function
63 * @card: Crypto card number addressed.
64 * @dom: Domain within the crypto card addressed.
65 * @status: AP queue status (GR1 on return of dqap).
66 * @psmid: Unique id identifying this request/reply.
67 *
68 * Called immediately after a reply has been dequeued from
69 * the AP firmware queue with the DQAP command.
70 */
71 DEFINE_EVENT(s390_ap_nqapdqap_template,
72 s390_ap_dqap,
73 TP_PROTO(u16 card, u16 dom, u32 status, u64 psmid),
74 TP_ARGS(card, dom, status, psmid)
75 );
76
77 #endif /* _TRACE_S390_AP_H */
78
79 /* This part must be outside protection */
80
81 #undef TRACE_INCLUDE_PATH
82 #undef TRACE_INCLUDE_FILE
83
84 #define TRACE_INCLUDE_PATH asm/trace
85 #define TRACE_INCLUDE_FILE ap
86
87 #include <trace/define_trace.h>