Lines Matching +full:func +full:-
1 /* SPDX-License-Identifier: GPL-2.0 */
11 #include <linux/entry-common.h>
19 * DECLARE_IDTENTRY - Declare functions for simple IDT entry points
22 * @func: Function name of the entry point
25 * - The ASM entry point: asm_##func
26 * - The XEN PV trap entry point: xen_##func (maybe unused)
27 * - The C handler called from the FRED event dispatcher (maybe unused)
28 * - The C handler called from the ASM entry point
34 #define DECLARE_IDTENTRY(vector, func) \ argument
35 asmlinkage void asm_##func(void); \
36 asmlinkage void xen_asm_##func(void); \
37 void fred_##func(struct pt_regs *regs); \
38 __visible void func(struct pt_regs *regs)
41 * DEFINE_IDTENTRY - Emit code for simple IDT entry points
42 * @func: Function name of the entry point
44 * @func is called from ASM entry code with interrupts disabled.
53 #define DEFINE_IDTENTRY(func) \ argument
54 static __always_inline void __##func(struct pt_regs *regs); \
56 __visible noinstr void func(struct pt_regs *regs) \
61 __##func (regs); \
66 static __always_inline void __##func(struct pt_regs *regs)
73 * DECLARE_IDTENTRY_ERRORCODE - Declare functions for simple IDT entry points
76 * @func: Function name of the entry point
79 * - The ASM entry point: asm_##func
80 * - The XEN PV trap entry point: xen_##func (maybe unused)
81 * - The C handler called from the ASM entry point
84 * C-handler.
86 #define DECLARE_IDTENTRY_ERRORCODE(vector, func) \ argument
87 asmlinkage void asm_##func(void); \
88 asmlinkage void xen_asm_##func(void); \
89 __visible void func(struct pt_regs *regs, unsigned long error_code)
92 * DEFINE_IDTENTRY_ERRORCODE - Emit code for simple IDT entry points
94 * @func: Function name of the entry point
98 #define DEFINE_IDTENTRY_ERRORCODE(func) \ argument
99 static __always_inline void __##func(struct pt_regs *regs, \
102 __visible noinstr void func(struct pt_regs *regs, \
108 __##func (regs, error_code); \
113 static __always_inline void __##func(struct pt_regs *regs, \
117 * DECLARE_IDTENTRY_RAW - Declare functions for raw IDT entry points
120 * @func: Function name of the entry point
124 #define DECLARE_IDTENTRY_RAW(vector, func) \ argument
125 DECLARE_IDTENTRY(vector, func)
128 * DEFINE_IDTENTRY_RAW - Emit code for raw IDT entry points
129 * @func: Function name of the entry point
131 * @func is called from ASM entry code with interrupts disabled.
141 #define DEFINE_IDTENTRY_RAW(func) \ argument
142 __visible noinstr void func(struct pt_regs *regs)
145 * DEFINE_FREDENTRY_RAW - Emit code for raw FRED entry points
146 * @func: Function name of the entry point
148 * @func is called from the FRED event dispatcher with interrupts disabled.
152 #define DEFINE_FREDENTRY_RAW(func) \ argument
153 noinstr void fred_##func(struct pt_regs *regs)
156 * DECLARE_IDTENTRY_RAW_ERRORCODE - Declare functions for raw IDT entry points
159 * @func: Function name of the entry point
163 #define DECLARE_IDTENTRY_RAW_ERRORCODE(vector, func) \ argument
164 DECLARE_IDTENTRY_ERRORCODE(vector, func)
167 * DEFINE_IDTENTRY_RAW_ERRORCODE - Emit code for raw IDT entry points
168 * @func: Function name of the entry point
170 * @func is called from ASM entry code with interrupts disabled.
180 #define DEFINE_IDTENTRY_RAW_ERRORCODE(func) \ argument
181 __visible noinstr void func(struct pt_regs *regs, unsigned long error_code)
184 * DECLARE_IDTENTRY_IRQ - Declare functions for device interrupt IDT entry
187 * @func: Function name of the entry point
191 #define DECLARE_IDTENTRY_IRQ(vector, func) \ argument
192 DECLARE_IDTENTRY_ERRORCODE(vector, func)
195 * DEFINE_IDTENTRY_IRQ - Emit code for device interrupt IDT entry points
196 * @func: Function name of the entry point
206 #define DEFINE_IDTENTRY_IRQ(func) \ argument
207 static void __##func(struct pt_regs *regs, u32 vector); \
209 __visible noinstr void func(struct pt_regs *regs, \
217 run_irq_on_irqstack_cond(__##func, regs, vector); \
222 static noinline void __##func(struct pt_regs *regs, u32 vector)
225 * DECLARE_IDTENTRY_SYSVEC - Declare functions for system vector entry points
227 * @func: Function name of the entry point
230 * - The ASM entry point: asm_##func
231 * - The XEN PV trap entry point: xen_##func (maybe unused)
232 * - The C handler called from the ASM entry point
236 #define DECLARE_IDTENTRY_SYSVEC(vector, func) \ argument
237 DECLARE_IDTENTRY(vector, func)
240 * DEFINE_IDTENTRY_SYSVEC - Emit code for system vector IDT entry points
241 * @func: Function name of the entry point
248 #define DEFINE_IDTENTRY_SYSVEC(func) \ argument
249 static void __##func(struct pt_regs *regs); \
251 static __always_inline void instr_##func(struct pt_regs *regs) \
253 run_sysvec_on_irqstack_cond(__##func, regs); \
256 __visible noinstr void func(struct pt_regs *regs) \
262 instr_##func (regs); \
267 void fred_##func(struct pt_regs *regs) \
269 instr_##func (regs); \
272 static noinline void __##func(struct pt_regs *regs)
275 * DEFINE_IDTENTRY_SYSVEC_SIMPLE - Emit code for simple system vector IDT
277 * @func: Function name of the entry point
285 #define DEFINE_IDTENTRY_SYSVEC_SIMPLE(func) \ argument
286 static __always_inline void __##func(struct pt_regs *regs); \
288 static __always_inline void instr_##func(struct pt_regs *regs) \
291 __##func (regs); \
295 __visible noinstr void func(struct pt_regs *regs) \
301 instr_##func (regs); \
306 void fred_##func(struct pt_regs *regs) \
308 instr_##func (regs); \
311 static __always_inline void __##func(struct pt_regs *regs)
314 * DECLARE_IDTENTRY_XENCB - Declare functions for XEN HV callback entry point
316 * @func: Function name of the entry point
319 * - The ASM entry point: asm_##func
320 * - The XEN PV trap entry point: xen_##func (maybe unused)
321 * - The C handler called from the ASM entry point
323 * Maps to DECLARE_IDTENTRY(). Distinct entry point to handle the 32/64-bit
326 #define DECLARE_IDTENTRY_XENCB(vector, func) \ argument
327 DECLARE_IDTENTRY(vector, func)
331 * DECLARE_IDTENTRY_IST - Declare functions for IST handling IDT entry points
333 * @func: Function name of the entry point
338 #define DECLARE_IDTENTRY_IST(vector, func) \ argument
339 DECLARE_IDTENTRY_RAW(vector, func); \
340 __visible void noist_##func(struct pt_regs *regs)
343 * DECLARE_IDTENTRY_VC - Declare functions for the VC entry point
345 * @func: Function name of the entry point
350 #define DECLARE_IDTENTRY_VC(vector, func) \ argument
351 DECLARE_IDTENTRY_RAW_ERRORCODE(vector, func); \
352 __visible noinstr void kernel_##func(struct pt_regs *regs, unsigned long error_code); \
353 __visible noinstr void user_##func(struct pt_regs *regs, unsigned long error_code)
356 * DEFINE_IDTENTRY_IST - Emit code for IST entry points
357 * @func: Function name of the entry point
361 #define DEFINE_IDTENTRY_IST(func) \ argument
362 DEFINE_IDTENTRY_RAW(func)
365 * DEFINE_IDTENTRY_NOIST - Emit code for NOIST entry points which
367 * @func: Function name of the entry point. Must be the same as
372 #define DEFINE_IDTENTRY_NOIST(func) \ argument
373 DEFINE_IDTENTRY_RAW(noist_##func)
376 * DECLARE_IDTENTRY_DF - Declare functions for double fault
378 * @func: Function name of the entry point
382 #define DECLARE_IDTENTRY_DF(vector, func) \ argument
383 DECLARE_IDTENTRY_RAW_ERRORCODE(vector, func)
386 * DEFINE_IDTENTRY_DF - Emit code for double fault
387 * @func: Function name of the entry point
391 #define DEFINE_IDTENTRY_DF(func) \ argument
392 DEFINE_IDTENTRY_RAW_ERRORCODE(func)
395 * DEFINE_IDTENTRY_VC_KERNEL - Emit code for VMM communication handler
397 * @func: Function name of the entry point
401 #define DEFINE_IDTENTRY_VC_KERNEL(func) \ argument
402 DEFINE_IDTENTRY_RAW_ERRORCODE(kernel_##func)
405 * DEFINE_IDTENTRY_VC_USER - Emit code for VMM communication handler
407 * @func: Function name of the entry point
411 #define DEFINE_IDTENTRY_VC_USER(func) \ argument
412 DEFINE_IDTENTRY_RAW_ERRORCODE(user_##func)
417 * DECLARE_IDTENTRY_DF - Declare functions for double fault 32bit variant
419 * @func: Function name of the entry point
422 * - The ASM entry point: asm_##func
423 * - The C handler called from the C shim
425 #define DECLARE_IDTENTRY_DF(vector, func) \ argument
426 asmlinkage void asm_##func(void); \
427 __visible void func(struct pt_regs *regs, \
432 * DEFINE_IDTENTRY_DF - Emit code for double fault on 32bit
433 * @func: Function name of the entry point
438 #define DEFINE_IDTENTRY_DF(func) \ argument
439 __visible noinstr void func(struct pt_regs *regs, \
445 /* C-Code mapping */
477 #define DECLARE_IDTENTRY(vector, func) \ argument
478 idtentry vector asm_##func func has_error_code=0
480 #define DECLARE_IDTENTRY_ERRORCODE(vector, func) \ argument
481 idtentry vector asm_##func func has_error_code=1
484 #define DECLARE_IDTENTRY_SW(vector, func) argument
486 #define DECLARE_IDTENTRY_RAW(vector, func) \ argument
487 DECLARE_IDTENTRY(vector, func)
489 #define DECLARE_IDTENTRY_RAW_ERRORCODE(vector, func) \ argument
490 DECLARE_IDTENTRY_ERRORCODE(vector, func)
493 #define DECLARE_IDTENTRY_IRQ(vector, func) \ argument
494 idtentry_irq vector func
497 #define DECLARE_IDTENTRY_SYSVEC(vector, func) \ argument
498 DECLARE_IDTENTRY(vector, func)
501 # define DECLARE_IDTENTRY_MCE(vector, func) \ argument
502 idtentry_mce_db vector asm_##func func
504 # define DECLARE_IDTENTRY_DEBUG(vector, func) \ argument
505 idtentry_mce_db vector asm_##func func
507 # define DECLARE_IDTENTRY_DF(vector, func) \ argument
508 idtentry_df vector asm_##func func
510 # define DECLARE_IDTENTRY_XENCB(vector, func) \ argument
511 DECLARE_IDTENTRY(vector, func)
513 # define DECLARE_IDTENTRY_VC(vector, func) \ argument
514 idtentry_vc vector asm_##func func
517 # define DECLARE_IDTENTRY_MCE(vector, func) \ argument
518 DECLARE_IDTENTRY(vector, func)
521 # define DECLARE_IDTENTRY_DF(vector, func) argument
524 # define DECLARE_IDTENTRY_XENCB(vector, func) argument
529 #define DECLARE_IDTENTRY_NMI(vector, func) argument
555 .fill 0b + IDT_ALIGN - ., 1, 0xcc
571 .fill 0b + IDT_ALIGN - ., 1, 0xcc
582 * - provide the function declarations when included from C-Code
583 * - emit the ASM stubs when included from entry_32/64.S
640 * 64-bit, i.e. without using an IST. asm_exc_nmi() requires an IST to work
641 * correctly vs. the NMI 'executing' marker. Used for 32-bit kernels as well