1 #ifndef __ASM_TRACE_H__
2 #define __ASM_TRACE_H__
3
4 #include <asm/page.h>
5
6 void __trace_pv_trap(int trapnr, unsigned long eip,
7 int use_error_code, unsigned error_code);
trace_pv_trap(int trapnr,unsigned long eip,int use_error_code,unsigned error_code)8 static inline void trace_pv_trap(int trapnr, unsigned long eip,
9 int use_error_code, unsigned error_code)
10 {
11 if ( unlikely(tb_init_done) )
12 __trace_pv_trap(trapnr, eip, use_error_code, error_code);
13 }
14
15 void __trace_pv_page_fault(unsigned long addr, unsigned error_code);
trace_pv_page_fault(unsigned long addr,unsigned error_code)16 static inline void trace_pv_page_fault(unsigned long addr,
17 unsigned error_code)
18 {
19 if ( unlikely(tb_init_done) )
20 __trace_pv_page_fault(addr, error_code);
21 }
22
23 void __trace_trap_one_addr(unsigned event, unsigned long va);
trace_trap_one_addr(unsigned event,unsigned long va)24 static inline void trace_trap_one_addr(unsigned event, unsigned long va)
25 {
26 if ( unlikely(tb_init_done) )
27 __trace_trap_one_addr(event, va);
28 }
29
30 void __trace_trap_two_addr(unsigned event, unsigned long va1,
31 unsigned long va2);
trace_trap_two_addr(unsigned event,unsigned long va1,unsigned long va2)32 static inline void trace_trap_two_addr(unsigned event, unsigned long va1,
33 unsigned long va2)
34 {
35 if ( unlikely(tb_init_done) )
36 __trace_trap_two_addr(event, va1, va2);
37 }
38
39 void __trace_ptwr_emulation(unsigned long addr, l1_pgentry_t npte);
trace_ptwr_emulation(unsigned long addr,l1_pgentry_t npte)40 static inline void trace_ptwr_emulation(unsigned long addr, l1_pgentry_t npte)
41 {
42 if ( unlikely(tb_init_done) )
43 __trace_ptwr_emulation(addr, npte);
44 }
45
46 #endif /* __ASM_TRACE_H__ */
47