linux/arch/x86/include/asm/traps.h
<<
>>
Prefs
   1#ifndef _ASM_X86_TRAPS_H
   2#define _ASM_X86_TRAPS_H
   3
   4#include <linux/kprobes.h>
   5
   6#include <asm/debugreg.h>
   7#include <asm/siginfo.h>                        /* TRAP_TRACE, ... */
   8
   9#ifdef CONFIG_X86_32
  10#define dotraplinkage
  11#else
  12#define dotraplinkage asmlinkage
  13#endif
  14
  15asmlinkage void divide_error(void);
  16asmlinkage void debug(void);
  17asmlinkage void nmi(void);
  18asmlinkage void int3(void);
  19asmlinkage void xen_debug(void);
  20asmlinkage void xen_int3(void);
  21asmlinkage void xen_stack_segment(void);
  22asmlinkage void overflow(void);
  23asmlinkage void bounds(void);
  24asmlinkage void invalid_op(void);
  25asmlinkage void device_not_available(void);
  26#ifdef CONFIG_X86_64
  27asmlinkage void double_fault(void);
  28#endif
  29asmlinkage void coprocessor_segment_overrun(void);
  30asmlinkage void invalid_TSS(void);
  31asmlinkage void segment_not_present(void);
  32asmlinkage void stack_segment(void);
  33asmlinkage void general_protection(void);
  34asmlinkage void page_fault(void);
  35asmlinkage void async_page_fault(void);
  36asmlinkage void spurious_interrupt_bug(void);
  37asmlinkage void coprocessor_error(void);
  38asmlinkage void alignment_check(void);
  39#ifdef CONFIG_X86_MCE
  40asmlinkage void machine_check(void);
  41#endif /* CONFIG_X86_MCE */
  42asmlinkage void simd_coprocessor_error(void);
  43
  44dotraplinkage void do_divide_error(struct pt_regs *, long);
  45dotraplinkage void do_debug(struct pt_regs *, long);
  46dotraplinkage void do_nmi(struct pt_regs *, long);
  47dotraplinkage void do_int3(struct pt_regs *, long);
  48dotraplinkage void do_overflow(struct pt_regs *, long);
  49dotraplinkage void do_bounds(struct pt_regs *, long);
  50dotraplinkage void do_invalid_op(struct pt_regs *, long);
  51dotraplinkage void do_device_not_available(struct pt_regs *, long);
  52dotraplinkage void do_coprocessor_segment_overrun(struct pt_regs *, long);
  53dotraplinkage void do_invalid_TSS(struct pt_regs *, long);
  54dotraplinkage void do_segment_not_present(struct pt_regs *, long);
  55dotraplinkage void do_stack_segment(struct pt_regs *, long);
  56#ifdef CONFIG_X86_64
  57dotraplinkage void do_double_fault(struct pt_regs *, long);
  58asmlinkage __kprobes struct pt_regs *sync_regs(struct pt_regs *);
  59#endif
  60dotraplinkage void do_general_protection(struct pt_regs *, long);
  61dotraplinkage void do_page_fault(struct pt_regs *, unsigned long);
  62dotraplinkage void do_spurious_interrupt_bug(struct pt_regs *, long);
  63dotraplinkage void do_coprocessor_error(struct pt_regs *, long);
  64dotraplinkage void do_alignment_check(struct pt_regs *, long);
  65#ifdef CONFIG_X86_MCE
  66dotraplinkage void do_machine_check(struct pt_regs *, long);
  67#endif
  68dotraplinkage void do_simd_coprocessor_error(struct pt_regs *, long);
  69#ifdef CONFIG_X86_32
  70dotraplinkage void do_iret_error(struct pt_regs *, long);
  71#endif
  72
  73static inline int get_si_code(unsigned long condition)
  74{
  75        if (condition & DR_STEP)
  76                return TRAP_TRACE;
  77        else if (condition & (DR_TRAP0|DR_TRAP1|DR_TRAP2|DR_TRAP3))
  78                return TRAP_HWBKPT;
  79        else
  80                return TRAP_BRKPT;
  81}
  82
  83extern int panic_on_unrecovered_nmi;
  84
  85void math_error(struct pt_regs *, int, int);
  86void math_emulate(struct math_emu_info *);
  87#ifndef CONFIG_X86_32
  88asmlinkage void smp_thermal_interrupt(void);
  89asmlinkage void mce_threshold_interrupt(void);
  90#endif
  91
  92#endif /* _ASM_X86_TRAPS_H */
  93