Lines Matching +full:c +full:- +full:define +full:- +full:name

1 /* SPDX-License-Identifier: GPL-2.0 */
3 #define _ASM_X86_IDTENTRY_H
8 #define IDT_ALIGN (8 * (1 + HAS_KERNEL_IBT))
11 #include <linux/entry-common.h>
19 * DECLARE_IDTENTRY - Declare functions for simple IDT entry points
21 * @vector: Vector number (ignored for C)
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
30 * Note: This is the C variant of DECLARE_IDTENTRY(). As the name says it
31 * declares the entry points for usage in C code. There is an ASM variant
34 #define DECLARE_IDTENTRY(vector, func) \
41 * DEFINE_IDTENTRY - Emit code for simple IDT entry points
42 * @func: Function name of the entry point
53 #define DEFINE_IDTENTRY(func) \
69 #define DECLARE_IDTENTRY_SW DECLARE_IDTENTRY
70 #define DEFINE_IDTENTRY_SW DEFINE_IDTENTRY
73 * DECLARE_IDTENTRY_ERRORCODE - Declare functions for simple IDT entry points
75 * @vector: Vector number (ignored for C)
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) \
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) \
117 * DECLARE_IDTENTRY_RAW - Declare functions for raw IDT entry points
119 * @vector: Vector number (ignored for C)
120 * @func: Function name of the entry point
124 #define DECLARE_IDTENTRY_RAW(vector, func) \
128 * DEFINE_IDTENTRY_RAW - Emit code for raw IDT entry points
129 * @func: Function name of the entry point
141 #define DEFINE_IDTENTRY_RAW(func) \
145 * DEFINE_FREDENTRY_RAW - Emit code for raw FRED entry points
146 * @func: Function name of the entry point
152 #define DEFINE_FREDENTRY_RAW(func) \
156 * DECLARE_IDTENTRY_RAW_ERRORCODE - Declare functions for raw IDT entry points
158 * @vector: Vector number (ignored for C)
159 * @func: Function name of the entry point
163 #define DECLARE_IDTENTRY_RAW_ERRORCODE(vector, func) \
167 * DEFINE_IDTENTRY_RAW_ERRORCODE - Emit code for raw IDT entry points
168 * @func: Function name of the entry point
180 #define DEFINE_IDTENTRY_RAW_ERRORCODE(func) \
184 * DECLARE_IDTENTRY_IRQ - Declare functions for device interrupt IDT entry
186 * @vector: Vector number (ignored for C)
187 * @func: Function name of the entry point
191 #define DECLARE_IDTENTRY_IRQ(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) \
225 * DECLARE_IDTENTRY_SYSVEC - Declare functions for system vector entry points
226 * @vector: Vector number (ignored for C)
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) \
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) \
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) \
314 * DECLARE_IDTENTRY_XENCB - Declare functions for XEN HV callback entry point
315 * @vector: Vector number (ignored for C)
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) \
331 * DECLARE_IDTENTRY_IST - Declare functions for IST handling IDT entry points
332 * @vector: Vector number (ignored for C)
333 * @func: Function name of the entry point
335 * Maps to DECLARE_IDTENTRY_RAW, but declares also the NOIST C handler
338 #define DECLARE_IDTENTRY_IST(vector, func) \
343 * DECLARE_IDTENTRY_VC - Declare functions for the VC entry point
344 * @vector: Vector number (ignored for C)
345 * @func: Function name of the entry point
348 * safe_stack C handler.
350 #define DECLARE_IDTENTRY_VC(vector, func) \
356 * DEFINE_IDTENTRY_IST - Emit code for IST entry points
357 * @func: Function name of the entry point
361 #define DEFINE_IDTENTRY_IST(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
368 * the function name of the corresponding IST variant
372 #define DEFINE_IDTENTRY_NOIST(func) \
376 * DECLARE_IDTENTRY_DF - Declare functions for double fault
377 * @vector: Vector number (ignored for C)
378 * @func: Function name of the entry point
382 #define DECLARE_IDTENTRY_DF(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) \
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) \
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) \
417 * DECLARE_IDTENTRY_DF - Declare functions for double fault 32bit variant
418 * @vector: Vector number (ignored for C)
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) \
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) \
445 /* C-Code mapping */
446 #define DECLARE_IDTENTRY_NMI DECLARE_IDTENTRY_RAW
447 #define DEFINE_IDTENTRY_NMI DEFINE_IDTENTRY_RAW
448 #define DEFINE_FREDENTRY_NMI DEFINE_FREDENTRY_RAW
451 #define DECLARE_IDTENTRY_MCE DECLARE_IDTENTRY_IST
452 #define DEFINE_IDTENTRY_MCE DEFINE_IDTENTRY_IST
453 #define DEFINE_IDTENTRY_MCE_USER DEFINE_IDTENTRY_NOIST
454 #define DEFINE_FREDENTRY_MCE DEFINE_FREDENTRY_RAW
456 #define DECLARE_IDTENTRY_DEBUG DECLARE_IDTENTRY_IST
457 #define DEFINE_IDTENTRY_DEBUG DEFINE_IDTENTRY_IST
458 #define DEFINE_IDTENTRY_DEBUG_USER DEFINE_IDTENTRY_NOIST
459 #define DEFINE_FREDENTRY_DEBUG DEFINE_FREDENTRY_RAW
470 #define sysvec_install(vector, function) { \
482 #define DECLARE_IDTENTRY(vector, func) \
485 #define DECLARE_IDTENTRY_ERRORCODE(vector, func) \
489 #define DECLARE_IDTENTRY_SW(vector, func)
491 #define DECLARE_IDTENTRY_RAW(vector, func) \
494 #define DECLARE_IDTENTRY_RAW_ERRORCODE(vector, func) \
498 #define DECLARE_IDTENTRY_IRQ(vector, func) \
502 #define DECLARE_IDTENTRY_SYSVEC(vector, func) \
506 # define DECLARE_IDTENTRY_MCE(vector, func) \
509 # define DECLARE_IDTENTRY_DEBUG(vector, func) \
512 # define DECLARE_IDTENTRY_DF(vector, func) \
515 # define DECLARE_IDTENTRY_XENCB(vector, func) \
518 # define DECLARE_IDTENTRY_VC(vector, func) \
522 # define DECLARE_IDTENTRY_MCE(vector, func) \
525 /* No ASM emitted for DF as this goes through a C shim */
526 # define DECLARE_IDTENTRY_DF(vector, func)
529 # define DECLARE_IDTENTRY_XENCB(vector, func)
534 #define DECLARE_IDTENTRY_NMI(vector, func)
545 * odd conversion back to a real vector number in the C entry points. Using
546 * .byte achieves the same thing and the only fixup needed in the C entry
560 .fill 0b + IDT_ALIGN - ., 1, 0xcc
576 .fill 0b + IDT_ALIGN - ., 1, 0xcc
587 * - provide the function declarations when included from C-Code
588 * - emit the ASM stubs when included from entry_32/64.S
598 #define X86_TRAP_OTHER 0xFFFF
645 * 64-bit, i.e. without using an IST. asm_exc_nmi() requires an IST to work
646 * correctly vs. the NMI 'executing' marker. Used for 32-bit kernels as well
712 # define fred_sysvec_reschedule_ipi NULL
713 # define fred_sysvec_reboot NULL
714 # define fred_sysvec_call_function_single NULL
715 # define fred_sysvec_call_function NULL
722 # define fred_sysvec_threshold NULL
728 # define fred_sysvec_deferred_error NULL
734 # define fred_sysvec_thermal NULL
740 # define fred_sysvec_irq_work NULL
749 # define fred_sysvec_kvm_posted_intr_ipi NULL
750 # define fred_sysvec_kvm_posted_intr_wakeup_ipi NULL
751 # define fred_sysvec_kvm_posted_intr_nested_ipi NULL
757 # define fred_sysvec_posted_msi_notification NULL