Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 29 Jun 2004 11:52:22 -0400
From:      John Baldwin <jhb@FreeBSD.org>
To:        freebsd-current@FreeBSD.org
Cc:        Julian Elischer <julian@elischer.org>
Subject:   Re: STI, HLT in acpi_cpu_idle_c1
Message-ID:  <200406291152.22118.jhb@FreeBSD.org>
In-Reply-To: <FE045D4D9F7AED4CBFF1B3B813C85337054EC4E1@mail.sandvine.com>
References:  <FE045D4D9F7AED4CBFF1B3B813C85337054EC4E1@mail.sandvine.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Monday 28 June 2004 09:53 am, Gerrit Nagelhout wrote:
> John Baldwin wrote:
> > Hmm, it appears it is consistently CPU1 that thinks that
> > IPI_HARDCLOCK is not
> > being EOI'd.  Can you try swapping the CPUs and see if the
> > lockup moves from
> > CPU1 to CPU3?
> >
> > --
>
> I added the following *HACK* to the idle code, and let it run
> over the weekend (with halt on idle disabled).  It hit the function
> isr_problem 9 times, but did not lockup anymore.  The problem
> is that I don't know if the EOI just got lost, or whether the
> interrupt was not handled at all.  I couldn't find any ill effects
> from this code ... yet.

As per an errata that Brian pointed out, try using this patch perhaps.  You 
can leave your isr_problem one in and hopefully the counter will stay at zero 
if it works.  It adds some dummy reads of the local APIC to EOI's for IPIs.

Index: apic_vector.s
===================================================================
RCS file: /usr/cvs/src/sys/i386/i386/apic_vector.s,v
retrieving revision 1.101
diff -u -r1.101 apic_vector.s
--- apic_vector.s	26 May 2004 07:43:41 -0000	1.101
+++ apic_vector.s	29 Jun 2004 15:48:29 -0000
@@ -141,6 +141,7 @@
 
 	movl	lapic, %eax
 	movl	$0, LA_EOI(%eax)	/* End Of Interrupt to APIC */
+	movl	LA_EOI(%eax),%eax
 
 	lock
 	incl	smp_tlb_wait
@@ -174,6 +175,7 @@
 
 	movl	lapic, %eax
 	movl	$0, LA_EOI(%eax)	/* End Of Interrupt to APIC */
+	movl	LA_EOI(%eax),%eax
 
 	lock
 	incl	smp_tlb_wait
@@ -212,6 +214,7 @@
 
 	movl	lapic, %eax
 	movl	$0, LA_EOI(%eax)	/* End Of Interrupt to APIC */
+	movl	LA_EOI(%eax),%edx
 
 	lock
 	incl	smp_tlb_wait
@@ -237,6 +240,7 @@
 
 	movl	lapic, %edx
 	movl	$0, LA_EOI(%edx)	/* End Of Interrupt to APIC */
+	movl	LA_EOI(%edx),%eax
 
 	pushl	$0		/* XXX convert trapframe to clockframe */
 	call	forwarded_hardclock
@@ -260,6 +264,7 @@
 
 	movl	lapic, %edx
 	movl	$0, LA_EOI(%edx)	/* End Of Interrupt to APIC */
+	movl	LA_EOI(%edx),%eax
 
 	FAKE_MCOUNT(TF_EIP(%esp))
 
@@ -322,6 +327,7 @@
 
 	movl	lapic, %eax
 	movl	$0, LA_EOI(%eax)	/* End Of Interrupt to APIC */
+	movl	LA_EOI(%eax),%edx
 
 	movl	PCPU(CPUID), %eax
 	imull	$PCB_SIZE, %eax
@@ -382,6 +388,7 @@
 
 	movl	lapic, %eax
 	movl	$0, LA_EOI(%eax)	/* End Of Interrupt to APIC */
+	movl	LA_EOI(%eax),%edx
 	POP_FRAME
 	iret
 	
@@ -402,6 +409,7 @@
 
 	movl	lapic, %eax	
 	movl	$0, LA_EOI(%eax)	/* End Of Interrupt to APIC */
+	movl	LA_EOI(%eax),%edx
 	POP_FRAME
 	iret
 #endif /* SMP */


-- 
John Baldwin <jhb@FreeBSD.org>  <><  http://www.FreeBSD.org/~jhb/
"Power Users Use the Power to Serve"  =  http://www.FreeBSD.org



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200406291152.22118.jhb>