From owner-freebsd-current@FreeBSD.ORG Tue Jun 29 16:08:03 2004 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3AF0716A4E8 for ; Tue, 29 Jun 2004 16:08:03 +0000 (GMT) Received: from mail6.speakeasy.net (mail6.speakeasy.net [216.254.0.206]) by mx1.FreeBSD.org (Postfix) with ESMTP id 17ECB43D53 for ; Tue, 29 Jun 2004 16:08:03 +0000 (GMT) (envelope-from jhb@FreeBSD.org) Received: (qmail 13748 invoked from network); 29 Jun 2004 16:07:51 -0000 Received: from dsl027-160-063.atl1.dsl.speakeasy.net (HELO server.baldwin.cx) ([216.27.160.63]) (envelope-sender ) encrypted SMTP for ; 29 Jun 2004 16:07:50 -0000 Received: from 131.106.56.214 (p58.n-nypop02.stsn.com [199.106.89.58]) by server.baldwin.cx (8.12.11/8.12.11) with ESMTP id i5TG73r1010966; Tue, 29 Jun 2004 12:07:36 -0400 (EDT) (envelope-from jhb@FreeBSD.org) From: John Baldwin To: freebsd-current@FreeBSD.org Date: Tue, 29 Jun 2004 11:52:22 -0400 User-Agent: KMail/1.6 References: In-Reply-To: MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <200406291152.22118.jhb@FreeBSD.org> X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on server.baldwin.cx cc: kris@FreeBSD.org cc: Gerrit Nagelhout cc: Julian Elischer Subject: Re: STI, HLT in acpi_cpu_idle_c1 X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Jun 2004 16:08:03 -0000 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 <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve" = http://www.FreeBSD.org