]>
Commit | Line | Data |
---|---|---|
71c0bd10 SL |
1 | From e0872cff2c0cd8b692b04bf360ef07c335c3610e Mon Sep 17 00:00:00 2001 |
2 | From: Scott Wood <oss@buserror.net> | |
3 | Date: Tue, 6 Nov 2018 19:49:34 -0600 | |
4 | Subject: KVM: PPC: Move and undef TRACE_INCLUDE_PATH/FILE | |
5 | ||
6 | [ Upstream commit 28c5bcf74fa07c25d5bd118d1271920f51ce2a98 ] | |
7 | ||
8 | TRACE_INCLUDE_PATH and TRACE_INCLUDE_FILE are used by | |
9 | <trace/define_trace.h>, so like that #include, they should | |
10 | be outside #ifdef protection. | |
11 | ||
12 | They also need to be #undefed before defining, in case multiple trace | |
13 | headers are included by the same C file. This became the case on | |
14 | book3e after commit cf4a6085151a ("powerpc/mm: Add missing tracepoint for | |
15 | tlbie"), leading to the following build error: | |
16 | ||
17 | CC arch/powerpc/kvm/powerpc.o | |
18 | In file included from arch/powerpc/kvm/powerpc.c:51:0: | |
19 | arch/powerpc/kvm/trace.h:9:0: error: "TRACE_INCLUDE_PATH" redefined | |
20 | [-Werror] | |
21 | #define TRACE_INCLUDE_PATH . | |
22 | ^ | |
23 | In file included from arch/powerpc/kvm/../mm/mmu_decl.h:25:0, | |
24 | from arch/powerpc/kvm/powerpc.c:48: | |
25 | ./arch/powerpc/include/asm/trace.h:224:0: note: this is the location of | |
26 | the previous definition | |
27 | #define TRACE_INCLUDE_PATH asm | |
28 | ^ | |
29 | cc1: all warnings being treated as errors | |
30 | ||
31 | Reported-by: Christian Zigotzky <chzigotzky@xenosoft.de> | |
32 | Signed-off-by: Scott Wood <oss@buserror.net> | |
33 | Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> | |
34 | Signed-off-by: Sasha Levin <sashal@kernel.org> | |
35 | --- | |
36 | arch/powerpc/kvm/trace.h | 8 ++++++-- | |
37 | arch/powerpc/kvm/trace_booke.h | 9 +++++++-- | |
38 | arch/powerpc/kvm/trace_hv.h | 9 +++++++-- | |
39 | arch/powerpc/kvm/trace_pr.h | 9 +++++++-- | |
40 | 4 files changed, 27 insertions(+), 8 deletions(-) | |
41 | ||
42 | diff --git a/arch/powerpc/kvm/trace.h b/arch/powerpc/kvm/trace.h | |
43 | index 2e0e67ef3544..e8cedf32345a 100644 | |
44 | --- a/arch/powerpc/kvm/trace.h | |
45 | +++ b/arch/powerpc/kvm/trace.h | |
46 | @@ -5,8 +5,6 @@ | |
47 | ||
48 | #undef TRACE_SYSTEM | |
49 | #define TRACE_SYSTEM kvm | |
50 | -#define TRACE_INCLUDE_PATH . | |
51 | -#define TRACE_INCLUDE_FILE trace | |
52 | ||
53 | /* | |
54 | * Tracepoint for guest mode entry. | |
55 | @@ -119,4 +117,10 @@ TRACE_EVENT(kvm_check_requests, | |
56 | #endif /* _TRACE_KVM_H */ | |
57 | ||
58 | /* This part must be outside protection */ | |
59 | +#undef TRACE_INCLUDE_PATH | |
60 | +#undef TRACE_INCLUDE_FILE | |
61 | + | |
62 | +#define TRACE_INCLUDE_PATH . | |
63 | +#define TRACE_INCLUDE_FILE trace | |
64 | + | |
65 | #include <trace/define_trace.h> | |
66 | diff --git a/arch/powerpc/kvm/trace_booke.h b/arch/powerpc/kvm/trace_booke.h | |
67 | index 7ec534d1db9f..7eadbf449a1f 100644 | |
68 | --- a/arch/powerpc/kvm/trace_booke.h | |
69 | +++ b/arch/powerpc/kvm/trace_booke.h | |
70 | @@ -5,8 +5,6 @@ | |
71 | ||
72 | #undef TRACE_SYSTEM | |
73 | #define TRACE_SYSTEM kvm_booke | |
74 | -#define TRACE_INCLUDE_PATH . | |
75 | -#define TRACE_INCLUDE_FILE trace_booke | |
76 | ||
77 | #define kvm_trace_symbol_exit \ | |
78 | {0, "CRITICAL"}, \ | |
79 | @@ -217,4 +215,11 @@ TRACE_EVENT(kvm_booke_queue_irqprio, | |
80 | #endif | |
81 | ||
82 | /* This part must be outside protection */ | |
83 | + | |
84 | +#undef TRACE_INCLUDE_PATH | |
85 | +#undef TRACE_INCLUDE_FILE | |
86 | + | |
87 | +#define TRACE_INCLUDE_PATH . | |
88 | +#define TRACE_INCLUDE_FILE trace_booke | |
89 | + | |
90 | #include <trace/define_trace.h> | |
91 | diff --git a/arch/powerpc/kvm/trace_hv.h b/arch/powerpc/kvm/trace_hv.h | |
92 | index 33d9daff5783..d1bfe017d751 100644 | |
93 | --- a/arch/powerpc/kvm/trace_hv.h | |
94 | +++ b/arch/powerpc/kvm/trace_hv.h | |
95 | @@ -8,8 +8,6 @@ | |
96 | ||
97 | #undef TRACE_SYSTEM | |
98 | #define TRACE_SYSTEM kvm_hv | |
99 | -#define TRACE_INCLUDE_PATH . | |
100 | -#define TRACE_INCLUDE_FILE trace_hv | |
101 | ||
102 | #define kvm_trace_symbol_hcall \ | |
103 | {H_REMOVE, "H_REMOVE"}, \ | |
104 | @@ -474,4 +472,11 @@ TRACE_EVENT(kvmppc_run_vcpu_exit, | |
105 | #endif /* _TRACE_KVM_HV_H */ | |
106 | ||
107 | /* This part must be outside protection */ | |
108 | + | |
109 | +#undef TRACE_INCLUDE_PATH | |
110 | +#undef TRACE_INCLUDE_FILE | |
111 | + | |
112 | +#define TRACE_INCLUDE_PATH . | |
113 | +#define TRACE_INCLUDE_FILE trace_hv | |
114 | + | |
115 | #include <trace/define_trace.h> | |
116 | diff --git a/arch/powerpc/kvm/trace_pr.h b/arch/powerpc/kvm/trace_pr.h | |
117 | index 810507cb688a..1e40aa2aa5af 100644 | |
118 | --- a/arch/powerpc/kvm/trace_pr.h | |
119 | +++ b/arch/powerpc/kvm/trace_pr.h | |
120 | @@ -7,8 +7,6 @@ | |
121 | ||
122 | #undef TRACE_SYSTEM | |
123 | #define TRACE_SYSTEM kvm_pr | |
124 | -#define TRACE_INCLUDE_PATH . | |
125 | -#define TRACE_INCLUDE_FILE trace_pr | |
126 | ||
127 | TRACE_EVENT(kvm_book3s_reenter, | |
128 | TP_PROTO(int r, struct kvm_vcpu *vcpu), | |
129 | @@ -271,4 +269,11 @@ TRACE_EVENT(kvm_unmap_hva, | |
130 | #endif /* _TRACE_KVM_H */ | |
131 | ||
132 | /* This part must be outside protection */ | |
133 | + | |
134 | +#undef TRACE_INCLUDE_PATH | |
135 | +#undef TRACE_INCLUDE_FILE | |
136 | + | |
137 | +#define TRACE_INCLUDE_PATH . | |
138 | +#define TRACE_INCLUDE_FILE trace_pr | |
139 | + | |
140 | #include <trace/define_trace.h> | |
141 | -- | |
142 | 2.17.1 | |
143 |