patch-2.0.21-2.1.0 linux/include/asm-i386/irq.h

Next file: linux/include/asm-i386/ldt.h
Previous file: linux/include/asm-i386/io.h
Back to the patch index
Back to the overall index

diff -u --recursive --new-file lx2.0/v2.0.21/linux/include/asm-i386/irq.h linux/include/asm-i386/irq.h
@@ -21,7 +21,10 @@
 
 #define __STR(x) #x
 #define STR(x) __STR(x)
- 
+
+#define GET_CURRENT \
+	"movl " SYMBOL_NAME_STR(current_set) ",%ebx\n\t"
+
 #define SAVE_ALL \
 	"cld\n\t" \
 	"push %gs\n\t" \
@@ -38,8 +41,6 @@
 	"movl $" STR(KERNEL_DS) ",%edx\n\t" \
 	"mov %dx,%ds\n\t" \
 	"mov %dx,%es\n\t" \
-	"movl $" STR(USER_DS) ",%edx\n\t" \
-	"mov %dx,%fs\n\t"   \
 	"movl $0,%edx\n\t"  \
 	"movl %edx,%db7\n\t"
 
@@ -143,7 +144,10 @@
 	"movl "SYMBOL_NAME_STR(apic_reg)", %edx\n\t" \
 	"movl 32(%edx), %eax\n\t" \
 	"shrl $24,%eax\n\t" \
-	"andb $0x0F,%al\n"
+	"andb $0x0F,%al\n\t"
+
+#define GET_CURRENT \
+	"movl " SYMBOL_NAME_STR(current_set) "(,%eax,4),%ebx\n\t"
 	
 #define	ENTER_KERNEL \
 	"pushl %eax\n\t" \
@@ -151,6 +155,7 @@
 	"pushfl\n\t" \
 	"cli\n\t" \
 	GET_PROCESSOR_ID \
+	GET_CURRENT \
 	"btsl $" STR(SMP_FROM_INT) ","SYMBOL_NAME_STR(smp_proc_in_lock)"(,%eax,4)\n\t" \
 	"1: " \
 	"lock\n\t" \
@@ -210,8 +215,8 @@
 	ACK_##chip(mask,(nr&7)) \
 	"incl "SYMBOL_NAME_STR(intr_count)"\n\t"\
 	"sti\n\t" \
-	"movl %esp,%ebx\n\t" \
-	"pushl %ebx\n\t" \
+	"movl %esp,%eax\n\t" \
+	"pushl %eax\n\t" \
 	"pushl $" #nr "\n\t" \
 	"call "SYMBOL_NAME_STR(do_IRQ)"\n\t" \
 	"addl $8,%esp\n\t" \
@@ -257,8 +262,8 @@
 	ENTER_KERNEL \
 	ACK_##chip(mask,(nr&7)) \
 	"incl "SYMBOL_NAME_STR(intr_count)"\n\t"\
-	"movl %esp,%ebx\n\t" \
-	"pushl %ebx\n\t" \
+	"movl %esp,%eax\n\t" \
+	"pushl %eax\n\t" \
 	"pushl $" #nr "\n\t" \
 	"call "SYMBOL_NAME_STR(do_IRQ)"\n\t" \
 	"addl $8,%esp\n\t" \
@@ -286,8 +291,8 @@
 	ACK_##chip(mask,(nr&7)) \
 	"incl "SYMBOL_NAME_STR(intr_count)"\n\t"\
 	"sti\n\t" \
-	"movl %esp,%ebx\n\t" \
-	"pushl %ebx\n\t" \
+	"movl %esp,%eax\n\t" \
+	"pushl %eax\n\t" \
 	"pushl $" #nr "\n\t" \
 	"call "SYMBOL_NAME_STR(do_IRQ)"\n\t" \
 	"addl $8,%esp\n\t" \
@@ -325,8 +330,8 @@
 	ENTER_KERNEL \
 	"incl "SYMBOL_NAME_STR(intr_count)"\n\t"\
 	"sti\n\t" \
-	"movl %esp,%ebx\n\t" \
-	"pushl %ebx\n\t" \
+	"movl %esp,%eax\n\t" \
+	"pushl %eax\n\t" \
 	"pushl $" #nr "\n\t" \
 	"call "SYMBOL_NAME_STR(smp_reschedule_irq)"\n\t" \
 	"addl $8,%esp\n\t" \
@@ -348,14 +353,15 @@
 	ACK_##chip(mask,(nr&7)) \
 	"incl "SYMBOL_NAME_STR(intr_count)"\n\t"\
 	"sti\n\t" \
-	"movl %esp,%ebx\n\t" \
-	"pushl %ebx\n\t" \
+	"movl %esp,%eax\n\t" \
+	"pushl %eax\n\t" \
 	"pushl $" #nr "\n\t" \
 	"call "SYMBOL_NAME_STR(do_IRQ)"\n\t" \
 	"addl $8,%esp\n\t" \
 	"cli\n\t" \
 	UNBLK_##chip(mask) \
 	"decl "SYMBOL_NAME_STR(intr_count)"\n\t" \
+	GET_CURRENT \
 	"jmp ret_from_sys_call\n" \
 "\n"__ALIGN_STR"\n" \
 SYMBOL_NAME_STR(fast_IRQ) #nr "_interrupt:\n\t" \
@@ -388,14 +394,15 @@
 	SAVE_ALL \
 	ACK_##chip(mask,(nr&7)) \
 	"incl "SYMBOL_NAME_STR(intr_count)"\n\t"\
-	"movl %esp,%ebx\n\t" \
-	"pushl %ebx\n\t" \
+	"movl %esp,%eax\n\t" \
+	"pushl %eax\n\t" \
 	"pushl $" #nr "\n\t" \
 	"call "SYMBOL_NAME_STR(do_IRQ)"\n\t" \
 	"addl $8,%esp\n\t" \
 	"cli\n\t" \
 	UNBLK_##chip(mask) \
 	"decl "SYMBOL_NAME_STR(intr_count)"\n\t" \
+	GET_CURRENT \
 	"jmp ret_from_sys_call\n");
 
 #endif

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov