ACPI / LPSS: Make acpi_lpss_find_device() also find PCI devices
[linux/fpc-iii.git] / arch / x86 / include / asm / trace / mpx.h
blob7bd92db09e8dac5f4162e2838e35fa28f8e18015
1 /* SPDX-License-Identifier: GPL-2.0 */
2 #undef TRACE_SYSTEM
3 #define TRACE_SYSTEM mpx
5 #if !defined(_TRACE_MPX_H) || defined(TRACE_HEADER_MULTI_READ)
6 #define _TRACE_MPX_H
8 #include <linux/tracepoint.h>
10 #ifdef CONFIG_X86_INTEL_MPX
12 TRACE_EVENT(mpx_bounds_register_exception,
14 TP_PROTO(void *addr_referenced,
15 const struct mpx_bndreg *bndreg),
16 TP_ARGS(addr_referenced, bndreg),
18 TP_STRUCT__entry(
19 __field(void *, addr_referenced)
20 __field(u64, lower_bound)
21 __field(u64, upper_bound)
24 TP_fast_assign(
25 __entry->addr_referenced = addr_referenced;
26 __entry->lower_bound = bndreg->lower_bound;
27 __entry->upper_bound = bndreg->upper_bound;
30 * Note that we are printing out the '~' of the upper
31 * bounds register here. It is actually stored in its
32 * one's complement form so that its 'init' state
33 * corresponds to all 0's. But, that looks like
34 * gibberish when printed out, so print out the 1's
35 * complement instead of the actual value here. Note
36 * though that you still need to specify filters for the
37 * actual value, not the displayed one.
39 TP_printk("address referenced: 0x%p bounds: lower: 0x%llx ~upper: 0x%llx",
40 __entry->addr_referenced,
41 __entry->lower_bound,
42 ~__entry->upper_bound
46 TRACE_EVENT(bounds_exception_mpx,
48 TP_PROTO(const struct mpx_bndcsr *bndcsr),
49 TP_ARGS(bndcsr),
51 TP_STRUCT__entry(
52 __field(u64, bndcfgu)
53 __field(u64, bndstatus)
56 TP_fast_assign(
57 /* need to get rid of the 'const' on bndcsr */
58 __entry->bndcfgu = (u64)bndcsr->bndcfgu;
59 __entry->bndstatus = (u64)bndcsr->bndstatus;
62 TP_printk("bndcfgu:0x%llx bndstatus:0x%llx",
63 __entry->bndcfgu,
64 __entry->bndstatus)
67 DECLARE_EVENT_CLASS(mpx_range_trace,
69 TP_PROTO(unsigned long start,
70 unsigned long end),
71 TP_ARGS(start, end),
73 TP_STRUCT__entry(
74 __field(unsigned long, start)
75 __field(unsigned long, end)
78 TP_fast_assign(
79 __entry->start = start;
80 __entry->end = end;
83 TP_printk("[0x%p:0x%p]",
84 (void *)__entry->start,
85 (void *)__entry->end
89 DEFINE_EVENT(mpx_range_trace, mpx_unmap_zap,
90 TP_PROTO(unsigned long start, unsigned long end),
91 TP_ARGS(start, end)
94 DEFINE_EVENT(mpx_range_trace, mpx_unmap_search,
95 TP_PROTO(unsigned long start, unsigned long end),
96 TP_ARGS(start, end)
99 TRACE_EVENT(mpx_new_bounds_table,
101 TP_PROTO(unsigned long table_vaddr),
102 TP_ARGS(table_vaddr),
104 TP_STRUCT__entry(
105 __field(unsigned long, table_vaddr)
108 TP_fast_assign(
109 __entry->table_vaddr = table_vaddr;
112 TP_printk("table vaddr:%p", (void *)__entry->table_vaddr)
115 #else
118 * This gets used outside of MPX-specific code, so we need a stub.
120 static inline
121 void trace_bounds_exception_mpx(const struct mpx_bndcsr *bndcsr)
125 #endif /* CONFIG_X86_INTEL_MPX */
127 #undef TRACE_INCLUDE_PATH
128 #define TRACE_INCLUDE_PATH asm/trace/
129 #undef TRACE_INCLUDE_FILE
130 #define TRACE_INCLUDE_FILE mpx
131 #endif /* _TRACE_MPX_H */
133 /* This part must be outside protection */
134 #include <trace/define_trace.h>