/* * linux/arch/i386/traps.c * * Copyright (C) 1991, 1992 Linus Torvalds * * Pentium III FXSR, SSE support * Gareth Hughes <gareth@valinux.com>, May 2000 *//* * 'Traps.c' handles hardware traps and faults after we have saved some * state in 'asm.s'. */#include<linux/sched.h>#include<linux/kernel.h>#include<linux/string.h>#include<linux/errno.h>#include<linux/timer.h>#include<linux/mm.h>#include<linux/init.h>#include<linux/delay.h>#include<linux/spinlock.h>#include<linux/interrupt.h>#include<linux/highmem.h>#include<linux/kallsyms.h>#include<linux/ptrace.h>#include<linux/utsname.h>#include<linux/kprobes.h>#include<linux/kexec.h>#include<linux/unwind.h>#include<linux/uaccess.h>#include<linux/nmi.h>#ifdef CONFIG_EISA#include<linux/ioport.h>#include<linux/eisa.h>#endif#ifdef CONFIG_MCA#include<linux/mca.h>#endif#include<asm/processor.h>#include<asm/system.h>#include<asm/io.h>#include<asm/atomic.h>#include<asm/debugreg.h>#include<asm/desc.h>#include<asm/i387.h>#include<asm/nmi.h>#include<asm/unwind.h>#include<asm/smp.h>#include<asm/arch_hooks.h>#include<asm/kdebug.h>#include<asm/stacktrace.h>#include<linux/module.h>#include"mach_traps.h"intpanic_on_unrecovered_nmi;asmlinkageintsystem_call(void);/* Do we ignore FPU interrupts ? */charignore_fpu_irq=0;/* * The IDT has to be page-aligned to simplify the Pentium * F0 0F bug workaround.. We have a special link segment * for this. */structdesc_structidt_table[256]__attribute__((__section__(".data.idt")))={{0,0},};asmlinkagevoiddivide_error(void);asmlinkagevoiddebug(void);asmlinkagevoidnmi(void);asmlinkagevoidint3(void);asmlinkagevoidoverflow(void);asmlinkagevoidbounds(void);asmlinkagevoidinvalid_op(void);asmlinkagevoiddevice_not_available(void);asmlinkagevoidcoprocessor_segment_overrun(void);asmlinkagevoidinvalid_TSS(void);asmlinkagevoidsegment_not_present(void);asmlinkagevoidstack_segment(void);asmlinkagevoidgeneral_protection(void);asmlinkagevoidpage_fault(void);asmlinkagevoidcoprocessor_error(void);asmlinkagevoidsimd_coprocessor_error(void);asmlinkagevoidalignment_check(void);asmlinkagevoidspurious_interrupt_bug(void);asmlinkagevoidmachine_check(void);intkstack_depth_to_print=24;#ifdef CONFIG_STACK_UNWINDstaticintcall_trace=1;#else#define call_trace (-1)#endifATOMIC_NOTIFIER_HEAD(i386die_chain);intregister_die_notifier(structnotifier_block*nb){vmalloc_sync_all();returnatomic_notifier_chain_register(&i386die_chain,nb);}EXPORT_SYMBOL(register_die_notifier);/* used modular by kdb */int