1 /* SPDX-License-Identifier: GPL-2.0 or BSD-3-Clause */
2 /*
3  * Copyright(c) 2017 Intel Corporation.
4  */
5 
6 #if !defined(__HFI1_TRACE_MMU_H) || defined(TRACE_HEADER_MULTI_READ)
7 #define __HFI1_TRACE_MMU_H
8 
9 #include <linux/tracepoint.h>
10 #include <linux/trace_seq.h>
11 
12 #include "hfi.h"
13 
14 #undef TRACE_SYSTEM
15 #define TRACE_SYSTEM hfi1_mmu
16 
17 DECLARE_EVENT_CLASS(hfi1_mmu_rb_template,
18 		    TP_PROTO(unsigned long addr, unsigned long len),
19 		    TP_ARGS(addr, len),
20 		    TP_STRUCT__entry(__field(unsigned long, addr)
21 				     __field(unsigned long, len)
22 			    ),
23 		    TP_fast_assign(__entry->addr = addr;
24 				   __entry->len = len;
25 			    ),
26 		    TP_printk("MMU node addr 0x%lx, len %lu",
27 			      __entry->addr,
28 			      __entry->len
29 			    )
30 );
31 
32 DEFINE_EVENT(hfi1_mmu_rb_template, hfi1_mmu_rb_insert,
33 	     TP_PROTO(unsigned long addr, unsigned long len),
34 	     TP_ARGS(addr, len));
35 
36 DEFINE_EVENT(hfi1_mmu_rb_template, hfi1_mmu_rb_search,
37 	     TP_PROTO(unsigned long addr, unsigned long len),
38 	     TP_ARGS(addr, len));
39 
40 DEFINE_EVENT(hfi1_mmu_rb_template, hfi1_mmu_mem_invalidate,
41 	     TP_PROTO(unsigned long addr, unsigned long len),
42 	     TP_ARGS(addr, len));
43 
44 #endif /* __HFI1_TRACE_RC_H */
45 
46 #undef TRACE_INCLUDE_PATH
47 #undef TRACE_INCLUDE_FILE
48 #define TRACE_INCLUDE_PATH .
49 #define TRACE_INCLUDE_FILE trace_mmu
50 #include <trace/define_trace.h>
51