i386/5788: bogus softints on i386/mp

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: <gnats@...>
Date: Tuesday, April 8, 2008 - 10:08 am

>Number:         5788
net
	System      : OpenBSD 4.3
	softints are generated in hardware on mp machines
	and thus also recording those in ipending for an
	emulated processing produces both emulated treatment
	on another cpu doing an interrupt and current cpu
	as generated by the lapic.
	run on mp machine

Index: machdep.c
===================================================================
RCS file: /cvs/src/sys/arch/i386/i386/machdep.c,v
retrieving revision 1.419
diff -u -r1.419 machdep.c
--- machdep.c	17 Mar 2008 23:17:22 -0000	1.419
+++ machdep.c	8 Apr 2008 13:59:41 -0000
@@ -4231,10 +4231,11 @@
 void
 softintr(int sir, int vec)
 {
-	__asm __volatile("orl %1, %0" : "=m" (ipending) : "ir" (sir));
 #ifdef MULTIPROCESSOR
 	i82489_writereg(LAPIC_ICRLO,
 	    vec | LAPIC_DLMODE_FIXED | LAPIC_LVL_ASSERT | LAPIC_DEST_SELF);
+#else
+	__asm __volatile("orl %1, %0" : "=m" (ipending) : "ir" (sir));
 #endif
 }
 
Index: apicvec.s
===================================================================
RCS file: /cvs/src/sys/arch/i386/i386/apicvec.s,v
retrieving revision 1.10
diff -u -r1.10 apicvec.s
--- apicvec.s	25 May 2007 15:55:26 -0000	1.10
+++ apicvec.s	8 Apr 2008 14:00:10 -0000
@@ -77,8 +77,6 @@
 	ioapic_asm_ack()
 
 	movl	$IPL_SOFTAST, %eax
-	orl	$(1 << SIR_AST), _C_LABEL(ipending)
-
 	orl	$(LAPIC_DLMODE_FIXED|LAPIC_LVL_ASSERT|LAPIC_DEST_SELF), %eax
 	movl	%eax, _C_LABEL(local_apic) + LAPIC_ICRLO
 
@@ -189,7 +187,6 @@
 	MAKE_FRAME
 	pushl	CPL
 	movl	$IPL_SOFTCLOCK,CPL
-	andl	$~(1<<SIR_CLOCK),_C_LABEL(ipending)
 	ioapic_asm_ack()
 	sti
 #ifdef MULTIPROCESSOR
@@ -215,7 +212,6 @@
 	MAKE_FRAME
 	pushl	CPL
 	movl	$IPL_SOFTNET,CPL
-	andl	$~(1<<SIR_NET),_C_LABEL(ipending)
 	ioapic_asm_ack()
 	sti
 #ifdef MULTIPROCESSOR
@@ -237,7 +233,6 @@
 	MAKE_FRAME
 	pushl	CPL
 	movl	$IPL_SOFTTTY,CPL
-	andl	$~(1<<SIR_TTY),_C_LABEL(ipending)
 	ioapic_asm_ack()
 	sti
 #ifdef MULTIPROCESSOR
@@ -256,7 +251,6 @@
 	MAKE_FRAME
 	pushl	CPL
 	movl	$IPL_SOFTAST,CPL
-	andl	$~(1<<SIR_AST),_C_LABEL(ipending)
 	ioapic_asm_ack()
 	sti
 	jmp	_C_LABEL(Xdoreti)


Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
i386/5788: bogus softints on i386/mp, , (Tue Apr 8, 10:08 am)