11
11
12
12
#include <asm/irq_stack.h>
13
13
14
- /* Temporary defines */
15
- typedef irqentry_state_t idtentry_state_t ;
16
- #define idtentry_enter irqentry_enter
17
- #define idtentry_exit irqentry_exit
18
-
19
14
/**
20
15
* DECLARE_IDTENTRY - Declare functions for simple IDT entry points
21
16
* No error code pushed by hardware
@@ -45,21 +40,21 @@ typedef irqentry_state_t idtentry_state_t;
45
40
* The macro is written so it acts as function definition. Append the
46
41
* body with a pair of curly brackets.
47
42
*
48
- * idtentry_enter () contains common code which has to be invoked before
49
- * arbitrary code in the body. idtentry_exit () contains common code
43
+ * irqentry_enter () contains common code which has to be invoked before
44
+ * arbitrary code in the body. irqentry_exit () contains common code
50
45
* which has to run before returning to the low level assembly code.
51
46
*/
52
47
#define DEFINE_IDTENTRY (func ) \
53
48
static __always_inline void __##func(struct pt_regs *regs); \
54
49
\
55
50
__visible noinstr void func(struct pt_regs *regs) \
56
51
{ \
57
- idtentry_state_t state = idtentry_enter (regs); \
52
+ irqentry_state_t state = irqentry_enter (regs); \
58
53
\
59
54
instrumentation_begin(); \
60
55
__##func (regs); \
61
56
instrumentation_end(); \
62
- idtentry_exit (regs, state); \
57
+ irqentry_exit (regs, state); \
63
58
} \
64
59
\
65
60
static __always_inline void __##func(struct pt_regs *regs)
@@ -101,12 +96,12 @@ static __always_inline void __##func(struct pt_regs *regs, \
101
96
__visible noinstr void func(struct pt_regs *regs, \
102
97
unsigned long error_code) \
103
98
{ \
104
- idtentry_state_t state = idtentry_enter (regs); \
99
+ irqentry_state_t state = irqentry_enter (regs); \
105
100
\
106
101
instrumentation_begin(); \
107
102
__##func (regs, error_code); \
108
103
instrumentation_end(); \
109
- idtentry_exit (regs, state); \
104
+ irqentry_exit (regs, state); \
110
105
} \
111
106
\
112
107
static __always_inline void __##func(struct pt_regs *regs, \
@@ -161,7 +156,7 @@ __visible noinstr void func(struct pt_regs *regs)
161
156
* body with a pair of curly brackets.
162
157
*
163
158
* Contrary to DEFINE_IDTENTRY_ERRORCODE() this does not invoke the
164
- * idtentry_enter /exit() helpers before and after the body invocation. This
159
+ * irqentry_enter /exit() helpers before and after the body invocation. This
165
160
* needs to be done in the body itself if applicable. Use if extra work
166
161
* is required before the enter/exit() helpers are invoked.
167
162
*/
@@ -197,15 +192,15 @@ static __always_inline void __##func(struct pt_regs *regs, u8 vector); \
197
192
__visible noinstr void func(struct pt_regs *regs, \
198
193
unsigned long error_code) \
199
194
{ \
200
- idtentry_state_t state = idtentry_enter (regs); \
195
+ irqentry_state_t state = irqentry_enter (regs); \
201
196
\
202
197
instrumentation_begin(); \
203
198
irq_enter_rcu(); \
204
199
kvm_set_cpu_l1tf_flush_l1d(); \
205
200
__##func (regs, (u8)error_code); \
206
201
irq_exit_rcu(); \
207
202
instrumentation_end(); \
208
- idtentry_exit (regs, state); \
203
+ irqentry_exit (regs, state); \
209
204
} \
210
205
\
211
206
static __always_inline void __##func(struct pt_regs *regs, u8 vector)
@@ -229,7 +224,7 @@ static __always_inline void __##func(struct pt_regs *regs, u8 vector)
229
224
* DEFINE_IDTENTRY_SYSVEC - Emit code for system vector IDT entry points
230
225
* @func: Function name of the entry point
231
226
*
232
- * idtentry_enter /exit() and irq_enter/exit_rcu() are invoked before the
227
+ * irqentry_enter /exit() and irq_enter/exit_rcu() are invoked before the
233
228
* function body. KVM L1D flush request is set.
234
229
*
235
230
* Runs the function on the interrupt stack if the entry hit kernel mode
@@ -239,15 +234,15 @@ static void __##func(struct pt_regs *regs); \
239
234
\
240
235
__visible noinstr void func(struct pt_regs *regs) \
241
236
{ \
242
- idtentry_state_t state = idtentry_enter (regs); \
237
+ irqentry_state_t state = irqentry_enter (regs); \
243
238
\
244
239
instrumentation_begin(); \
245
240
irq_enter_rcu(); \
246
241
kvm_set_cpu_l1tf_flush_l1d(); \
247
242
run_on_irqstack_cond(__##func, regs, regs); \
248
243
irq_exit_rcu(); \
249
244
instrumentation_end(); \
250
- idtentry_exit (regs, state); \
245
+ irqentry_exit (regs, state); \
251
246
} \
252
247
\
253
248
static noinline void __##func(struct pt_regs *regs)
@@ -268,15 +263,15 @@ static __always_inline void __##func(struct pt_regs *regs); \
268
263
\
269
264
__visible noinstr void func(struct pt_regs *regs) \
270
265
{ \
271
- idtentry_state_t state = idtentry_enter (regs); \
266
+ irqentry_state_t state = irqentry_enter (regs); \
272
267
\
273
268
instrumentation_begin(); \
274
269
__irq_enter_raw(); \
275
270
kvm_set_cpu_l1tf_flush_l1d(); \
276
271
__##func (regs); \
277
272
__irq_exit_raw(); \
278
273
instrumentation_end(); \
279
- idtentry_exit (regs, state); \
274
+ irqentry_exit (regs, state); \
280
275
} \
281
276
\
282
277
static __always_inline void __##func(struct pt_regs *regs)
0 commit comments