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>
17 * DECLARE_IDTENTRY - Declare functions for simple IDT entry points
19 * @vector: Vector number (ignored for C)
20 * @func: Function name of the entry point
23 * - The ASM entry point: asm_##func
24 * - The XEN PV trap entry point: xen_##func (maybe unused)
25 * - The C handler called from the ASM entry point
27 * Note: This is the C variant of DECLARE_IDTENTRY(). As the name says it
28 * declares the entry points for usage in C code. There is an ASM variant
31 #define DECLARE_IDTENTRY(vector, func) \
37 * DEFINE_IDTENTRY - Emit code for simple IDT entry points
38 * @func: Function name of the entry point
49 #define DEFINE_IDTENTRY(func) \
65 #define DECLARE_IDTENTRY_SW DECLARE_IDTENTRY
66 #define DEFINE_IDTENTRY_SW DEFINE_IDTENTRY
69 * DECLARE_IDTENTRY_ERRORCODE - Declare functions for simple IDT entry points
71 * @vector: Vector number (ignored for C)
72 * @func: Function name of the entry point
75 * - The ASM entry point: asm_##func
76 * - The XEN PV trap entry point: xen_##func (maybe unused)
77 * - The C handler called from the ASM entry point
80 * C-handler.
82 #define DECLARE_IDTENTRY_ERRORCODE(vector, func) \
88 * DEFINE_IDTENTRY_ERRORCODE - Emit code for simple IDT entry points
90 * @func: Function name of the entry point
94 #define DEFINE_IDTENTRY_ERRORCODE(func) \
113 * DECLARE_IDTENTRY_RAW - Declare functions for raw IDT entry points
115 * @vector: Vector number (ignored for C)
116 * @func: Function name of the entry point
120 #define DECLARE_IDTENTRY_RAW(vector, func) \
124 * DEFINE_IDTENTRY_RAW - Emit code for raw IDT entry points
125 * @func: Function name of the entry point
137 #define DEFINE_IDTENTRY_RAW(func) \
141 * DECLARE_IDTENTRY_RAW_ERRORCODE - Declare functions for raw IDT entry points
143 * @vector: Vector number (ignored for C)
144 * @func: Function name of the entry point
148 #define DECLARE_IDTENTRY_RAW_ERRORCODE(vector, func) \
152 * DEFINE_IDTENTRY_RAW_ERRORCODE - Emit code for raw IDT entry points
153 * @func: Function name of the entry point
165 #define DEFINE_IDTENTRY_RAW_ERRORCODE(func) \
169 * DECLARE_IDTENTRY_IRQ - Declare functions for device interrupt IDT entry
171 * @vector: Vector number (ignored for C)
172 * @func: Function name of the entry point
176 #define DECLARE_IDTENTRY_IRQ(vector, func) \
180 * DEFINE_IDTENTRY_IRQ - Emit code for device interrupt IDT entry points
181 * @func: Function name of the entry point
191 #define DEFINE_IDTENTRY_IRQ(func) \
210 * DECLARE_IDTENTRY_SYSVEC - Declare functions for system vector entry points
211 * @vector: Vector number (ignored for C)
212 * @func: Function name of the entry point
215 * - The ASM entry point: asm_##func
216 * - The XEN PV trap entry point: xen_##func (maybe unused)
217 * - The C handler called from the ASM entry point
221 #define DECLARE_IDTENTRY_SYSVEC(vector, func) \
225 * DEFINE_IDTENTRY_SYSVEC - Emit code for system vector IDT entry points
226 * @func: Function name of the entry point
233 #define DEFINE_IDTENTRY_SYSVEC(func) \
250 * DEFINE_IDTENTRY_SYSVEC_SIMPLE - Emit code for simple system vector IDT
252 * @func: Function name of the entry point
260 #define DEFINE_IDTENTRY_SYSVEC_SIMPLE(func) \
279 * DECLARE_IDTENTRY_XENCB - Declare functions for XEN HV callback entry point
280 * @vector: Vector number (ignored for C)
281 * @func: Function name of the entry point
284 * - The ASM entry point: asm_##func
285 * - The XEN PV trap entry point: xen_##func (maybe unused)
286 * - The C handler called from the ASM entry point
288 * Maps to DECLARE_IDTENTRY(). Distinct entry point to handle the 32/64-bit
291 #define DECLARE_IDTENTRY_XENCB(vector, func) \
296 * DECLARE_IDTENTRY_IST - Declare functions for IST handling IDT entry points
297 * @vector: Vector number (ignored for C)
298 * @func: Function name of the entry point
300 * Maps to DECLARE_IDTENTRY_RAW, but declares also the NOIST C handler
303 #define DECLARE_IDTENTRY_IST(vector, func) \
308 * DECLARE_IDTENTRY_VC - Declare functions for the VC entry point
309 * @vector: Vector number (ignored for C)
310 * @func: Function name of the entry point
313 * safe_stack C handler.
315 #define DECLARE_IDTENTRY_VC(vector, func) \
321 * DEFINE_IDTENTRY_IST - Emit code for IST entry points
322 * @func: Function name of the entry point
326 #define DEFINE_IDTENTRY_IST(func) \
330 * DEFINE_IDTENTRY_NOIST - Emit code for NOIST entry points which
332 * @func: Function name of the entry point. Must be the same as
333 * the function name of the corresponding IST variant
337 #define DEFINE_IDTENTRY_NOIST(func) \
341 * DECLARE_IDTENTRY_DF - Declare functions for double fault
342 * @vector: Vector number (ignored for C)
343 * @func: Function name of the entry point
347 #define DECLARE_IDTENTRY_DF(vector, func) \
351 * DEFINE_IDTENTRY_DF - Emit code for double fault
352 * @func: Function name of the entry point
356 #define DEFINE_IDTENTRY_DF(func) \
360 * DEFINE_IDTENTRY_VC_KERNEL - Emit code for VMM communication handler
362 * @func: Function name of the entry point
366 #define DEFINE_IDTENTRY_VC_KERNEL(func) \
370 * DEFINE_IDTENTRY_VC_USER - Emit code for VMM communication handler
372 * @func: Function name of the entry point
376 #define DEFINE_IDTENTRY_VC_USER(func) \
382 * DECLARE_IDTENTRY_DF - Declare functions for double fault 32bit variant
383 * @vector: Vector number (ignored for C)
384 * @func: Function name of the entry point
387 * - The ASM entry point: asm_##func
388 * - The C handler called from the C shim
390 #define DECLARE_IDTENTRY_DF(vector, func) \
397 * DEFINE_IDTENTRY_DF - Emit code for double fault on 32bit
398 * @func: Function name of the entry point
403 #define DEFINE_IDTENTRY_DF(func) \
410 /* C-Code mapping */
411 #define DECLARE_IDTENTRY_NMI DECLARE_IDTENTRY_RAW
412 #define DEFINE_IDTENTRY_NMI DEFINE_IDTENTRY_RAW
415 #define DECLARE_IDTENTRY_MCE DECLARE_IDTENTRY_IST
416 #define DEFINE_IDTENTRY_MCE DEFINE_IDTENTRY_IST
417 #define DEFINE_IDTENTRY_MCE_USER DEFINE_IDTENTRY_NOIST
419 #define DECLARE_IDTENTRY_DEBUG DECLARE_IDTENTRY_IST
420 #define DEFINE_IDTENTRY_DEBUG DEFINE_IDTENTRY_IST
421 #define DEFINE_IDTENTRY_DEBUG_USER DEFINE_IDTENTRY_NOIST
429 #define DECLARE_IDTENTRY(vector, func) \
432 #define DECLARE_IDTENTRY_ERRORCODE(vector, func) \
436 #define DECLARE_IDTENTRY_SW(vector, func)
438 #define DECLARE_IDTENTRY_RAW(vector, func) \
441 #define DECLARE_IDTENTRY_RAW_ERRORCODE(vector, func) \
445 #define DECLARE_IDTENTRY_IRQ(vector, func) \
449 #define DECLARE_IDTENTRY_SYSVEC(vector, func) \
453 # define DECLARE_IDTENTRY_MCE(vector, func) \
456 # define DECLARE_IDTENTRY_DEBUG(vector, func) \
459 # define DECLARE_IDTENTRY_DF(vector, func) \
462 # define DECLARE_IDTENTRY_XENCB(vector, func) \
465 # define DECLARE_IDTENTRY_VC(vector, func) \
469 # define DECLARE_IDTENTRY_MCE(vector, func) \
472 /* No ASM emitted for DF as this goes through a C shim */
473 # define DECLARE_IDTENTRY_DF(vector, func)
476 # define DECLARE_IDTENTRY_XENCB(vector, func)
481 #define DECLARE_IDTENTRY_NMI(vector, func)
492 * odd conversion back to a real vector number in the C entry points. Using
493 * .byte achieves the same thing and the only fixup needed in the C entry
507 .fill 0b + IDT_ALIGN - ., 1, 0xcc
523 .fill 0b + IDT_ALIGN - ., 1, 0xcc
534 * - provide the function declarations when included from C-Code
535 * - emit the ASM stubs when included from entry_32/64.S
545 #define X86_TRAP_OTHER 0xFFFF
592 * 64-bit, i.e. without using an IST. asm_exc_nmi() requires an IST to work
593 * correctly vs. the NMI 'executing' marker. Used for 32-bit kernels as well