Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 10 Jan 2005 15:32:42 -0500
From:      John Baldwin <jhb@FreeBSD.org>
To:        freebsd-smp@FreeBSD.org
Cc:        bde@FreeBSD.org
Subject:   Re: 5.3-RELEASE: SMP: system clock has died
Message-ID:  <200501101532.42149.jhb@FreeBSD.org>
In-Reply-To: <20050109033319.129DD2072@towerrecords.minidns.net>
References:  <BAY24-F13EC7615A3B8EB3EB01572CC960@phx.gbl> <20050109033319.129DD2072@towerrecords.minidns.net>

next in thread | previous in thread | raw e-mail | index | archive | help
On Saturday 08 January 2005 10:33 pm, UEMURA (fka. MAENAKA) Tetsuya wrote:
> Posted on Sat, 08 Jan 2005 17:31:56 -0700
> by author Stephane Raimbault <segr@hotmail.com>
>
> > I have an ASUS P2B-DS motherboard with dual P2 400MHz CPU's.  I have
> > compiled the SMP kernel and noticed that something is not right.  In
> > "top" the CPU values indicate 0% across the board, even idle!
>
> I found 5 PRs regarding this symptom. On my 5.3-STABLE server, patch
> attached with PR 17800 solved the problem.
>
> http://www.freebsd.org/cgi/query-pr.cgi?pr=17800
> http://www.freebsd.org/cgi/query-pr.cgi?pr=60385
> http://www.freebsd.org/cgi/query-pr.cgi?pr=30310
> http://www.freebsd.org/cgi/query-pr.cgi?pr=bin/30310
> http://www.freebsd.org/cgi/query-pr.cgi?pr=73989
>
> For information, Tyan S1867DLUAN Thunder 2500 dual Slot 1 motherboard
> always shows correct CPU usage on FreeBSD 5.x since early 2003, its
> Socket 370 alternative S2567U3AN Thuder HEsl shows incorrect  on
> 5.3-BETA4 and recent 5.3-STABLE without patch.

Can you please try the patch below.  It drains pending interrupts any time we 
turn interrupts back on on the RTC including during resume:

Index: i386/isa/clock.c
===================================================================
RCS file: /usr/cvs/src/sys/i386/isa/clock.c,v
retrieving revision 1.213
diff -u -r1.213 clock.c
--- i386/isa/clock.c	11 Jul 2004 17:50:59 -0000	1.213
+++ i386/isa/clock.c	10 Jan 2005 19:58:51 -0000
@@ -712,6 +712,7 @@
 	writertc(RTC_STATUSB, RTCSB_24HR);
 	writertc(RTC_STATUSA, rtc_statusa);
 	writertc(RTC_STATUSB, rtc_statusb);
+	rtcin(RTC_INTR);
 }
 
 /*
@@ -911,6 +912,7 @@
 
 	/* Reenable RTC updates and interrupts. */
 	writertc(RTC_STATUSB, rtc_statusb);
+	rtcin(RTC_INTR);
 }
 
 
@@ -957,6 +959,7 @@
 		    INTR_TYPE_CLK | INTR_FAST, NULL);
 
 		writertc(RTC_STATUSB, rtc_statusb);
+		rtcin(RTC_INTR);
 	}
 
 	init_TSC_tc();

-- 
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?200501101532.42149.jhb>