1111
1212#include <asm/irq_stack.h>
1313
14- /* Temporary defines */
15- typedef irqentry_state_t idtentry_state_t ;
16- #define idtentry_enter irqentry_enter
17- #define idtentry_exit irqentry_exit
18-
1914/**
2015 * DECLARE_IDTENTRY - Declare functions for simple IDT entry points
2116 * No error code pushed by hardware
@@ -45,21 +40,21 @@ typedef irqentry_state_t idtentry_state_t;
4540 * The macro is written so it acts as function definition. Append the
4641 * body with a pair of curly brackets.
4742 *
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
5045 * which has to run before returning to the low level assembly code.
5146 */
5247#define DEFINE_IDTENTRY (func ) \
5348static __always_inline void __##func(struct pt_regs *regs); \
5449 \
5550__visible noinstr void func(struct pt_regs *regs) \
5651{ \
57- idtentry_state_t state = idtentry_enter (regs); \
52+ irqentry_state_t state = irqentry_enter (regs); \
5853 \
5954 instrumentation_begin(); \
6055 __##func (regs); \
6156 instrumentation_end(); \
62- idtentry_exit (regs, state); \
57+ irqentry_exit (regs, state); \
6358} \
6459 \
6560static __always_inline void __##func(struct pt_regs *regs)
@@ -101,12 +96,12 @@ static __always_inline void __##func(struct pt_regs *regs, \
10196__visible noinstr void func(struct pt_regs *regs, \
10297 unsigned long error_code) \
10398{ \
104- idtentry_state_t state = idtentry_enter (regs); \
99+ irqentry_state_t state = irqentry_enter (regs); \
105100 \
106101 instrumentation_begin(); \
107102 __##func (regs, error_code); \
108103 instrumentation_end(); \
109- idtentry_exit (regs, state); \
104+ irqentry_exit (regs, state); \
110105} \
111106 \
112107static __always_inline void __##func(struct pt_regs *regs, \
@@ -161,7 +156,7 @@ __visible noinstr void func(struct pt_regs *regs)
161156 * body with a pair of curly brackets.
162157 *
163158 * 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
165160 * needs to be done in the body itself if applicable. Use if extra work
166161 * is required before the enter/exit() helpers are invoked.
167162 */
@@ -197,15 +192,15 @@ static __always_inline void __##func(struct pt_regs *regs, u8 vector); \
197192__visible noinstr void func(struct pt_regs *regs, \
198193 unsigned long error_code) \
199194{ \
200- idtentry_state_t state = idtentry_enter (regs); \
195+ irqentry_state_t state = irqentry_enter (regs); \
201196 \
202197 instrumentation_begin(); \
203198 irq_enter_rcu(); \
204199 kvm_set_cpu_l1tf_flush_l1d(); \
205200 __##func (regs, (u8)error_code); \
206201 irq_exit_rcu(); \
207202 instrumentation_end(); \
208- idtentry_exit (regs, state); \
203+ irqentry_exit (regs, state); \
209204} \
210205 \
211206static __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)
229224 * DEFINE_IDTENTRY_SYSVEC - Emit code for system vector IDT entry points
230225 * @func: Function name of the entry point
231226 *
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
233228 * function body. KVM L1D flush request is set.
234229 *
235230 * Runs the function on the interrupt stack if the entry hit kernel mode
@@ -239,15 +234,15 @@ static void __##func(struct pt_regs *regs); \
239234 \
240235__visible noinstr void func(struct pt_regs *regs) \
241236{ \
242- idtentry_state_t state = idtentry_enter (regs); \
237+ irqentry_state_t state = irqentry_enter (regs); \
243238 \
244239 instrumentation_begin(); \
245240 irq_enter_rcu(); \
246241 kvm_set_cpu_l1tf_flush_l1d(); \
247242 run_on_irqstack_cond(__##func, regs, regs); \
248243 irq_exit_rcu(); \
249244 instrumentation_end(); \
250- idtentry_exit (regs, state); \
245+ irqentry_exit (regs, state); \
251246} \
252247 \
253248static noinline void __##func(struct pt_regs *regs)
@@ -268,15 +263,15 @@ static __always_inline void __##func(struct pt_regs *regs); \
268263 \
269264__visible noinstr void func(struct pt_regs *regs) \
270265{ \
271- idtentry_state_t state = idtentry_enter (regs); \
266+ irqentry_state_t state = irqentry_enter (regs); \
272267 \
273268 instrumentation_begin(); \
274269 __irq_enter_raw(); \
275270 kvm_set_cpu_l1tf_flush_l1d(); \
276271 __##func (regs); \
277272 __irq_exit_raw(); \
278273 instrumentation_end(); \
279- idtentry_exit (regs, state); \
274+ irqentry_exit (regs, state); \
280275} \
281276 \
282277static __always_inline void __##func(struct pt_regs *regs)
0 commit comments