Home | History | Annotate | Download | only in x86
      1 #ifndef __ASSEMBLY__
      2 #define __ASSEMBLY__  /* for some 2.2 kernel */
      3 #endif
      4 #include <linux/sys.h>
      5 #include <linux/linkage.h>
      6 #include <asm/segment.h>
      7 #define ASSEMBLY
      8 #include <asm/smp.h>
      9 
     10 #define SAVE_ALL \
     11 	cld; \
     12 	pushl %es; \
     13 	pushl %ds; \
     14 	pushl %eax; \
     15 	pushl %ebp; \
     16 	pushl %edi; \
     17 	pushl %esi; \
     18 	pushl %edx; \
     19 	pushl %ecx; \
     20 	pushl %ebx; \
     21 	movl $(__KERNEL_DS), %edx; \
     22 	movl %edx, %ds; \
     23 	movl %edx, %es;
     24 
     25 #define RESTORE_ALL	\
     26 	popl %ebx;	\
     27 	popl %ecx;	\
     28 	popl %edx;	\
     29 	popl %esi;	\
     30 	popl %edi;	\
     31 	popl %ebp;	\
     32 	popl %eax;	\
     33 1:	popl %ds;	\
     34 2:	popl %es;	\
     35 	addl $4, %esp;	\
     36 3:	iret;		\
     37 .section .fixup,"ax";	\
     38 4:	movl $0, (%esp);	\
     39 	jmp 1b;		\
     40 5:	movl $0, (%esp);	\
     41 	jmp 2b;		\
     42 6:	pushl %ss;	\
     43 	popl %ds;	\
     44 	pushl %ss;	\
     45 	popl %es;	\
     46 	pushl $11;	\
     47 	call my_sys_exit;\
     48 .previous;		\
     49 .section __ex_table,"a";\
     50 	.align 4;	\
     51 	.long 1b, 4b;	\
     52 	.long 2b, 5b;	\
     53 	.long 3b, 6b;	\
     54 .previous
     55 
     56 ENTRY(op_nmi)
     57 	pushl %eax
     58 	SAVE_ALL
     59 	movl %esp, %edx
     60 	pushl %edx
     61 	call op_do_nmi
     62 	addl $4, %esp
     63 	RESTORE_ALL
     64