From owner-freebsd-bugs@FreeBSD.ORG Fri Jan 28 00:00:38 2005 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 51E7D16A4D0 for ; Fri, 28 Jan 2005 00:00:38 +0000 (GMT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1949743D4C for ; Fri, 28 Jan 2005 00:00:38 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.1/8.13.1) with ESMTP id j0S00baK040122 for ; Fri, 28 Jan 2005 00:00:37 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.1/8.13.1/Submit) id j0S00bgs040121; Fri, 28 Jan 2005 00:00:37 GMT (envelope-from gnats) Resent-Date: Fri, 28 Jan 2005 00:00:37 GMT Resent-Message-Id: <200501280000.j0S00bgs040121@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Christian Staudenmayer Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7651016A4CE for ; Thu, 27 Jan 2005 23:53:58 +0000 (GMT) Received: from www.freebsd.org (www.freebsd.org [216.136.204.117]) by mx1.FreeBSD.org (Postfix) with ESMTP id 35E2843D3F for ; Thu, 27 Jan 2005 23:53:58 +0000 (GMT) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.13.1/8.13.1) with ESMTP id j0RNrvos040905 for ; Thu, 27 Jan 2005 23:53:57 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.13.1/8.13.1/Submit) id j0RNrvuR040904; Thu, 27 Jan 2005 23:53:57 GMT (envelope-from nobody) Message-Id: <200501272353.j0RNrvuR040904@www.freebsd.org> Date: Thu, 27 Jan 2005 23:53:57 GMT From: Christian Staudenmayer To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-2.3 Subject: kern/76776: [PATCH] ``top'' not working correctly on the Tyan S2510 (ThunderLE) mainboard X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 28 Jan 2005 00:00:38 -0000 >Number: 76776 >Category: kern >Synopsis: [PATCH] ``top'' not working correctly on the Tyan S2510 (ThunderLE) mainboard >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Fri Jan 28 00:00:37 GMT 2005 >Closed-Date: >Last-Modified: >Originator: Christian Staudenmayer >Release: FreeBSD 5.3-STABLE i386 >Organization: University of Ulm, Germany >Environment: System: FreeBSD satan.lan 5.3-STABLE FreeBSD 5.3-STABLE #0: Wed Jan 26 00:35:03 CET 2005 root@satan.lan:/usr/src/sys/i386/compile/SMP i386 Hardware: 2x P3 Coppermine (933/256/133), 896 MB reg. ECC PC133 RAM, Tyan S2510 (ThunderLE) Mainboard >Description: The ``top'' program showed ``0.00%'' for all CPU states, including ``idle''. This was most of the time the case, but not always. I posted about this on a forum on the internet and someone replied telling me that this was apparently the case with some Tyan mainboards and that he had a patch for it. I used the patch and it worked. I do not know who it was who authored the patch, but since it's only one line and I really do want the problem fixed, I hereby submit it myself. I encountered the problem on 5.3-RELEASE, 5.3-STABLE as well as 6.0-CURRENT. I'm running the provided ``SMP'' kernel configuration, however the problem persisted when running the stock kernel ``GENERIC'', even with only one CPU installed. >How-To-Repeat: I guess it depends on the specific piece of hardware used (the mainboard). Type in ``top'' and take a look at the percentages of CPU states (idle, nice, etc.). >Fix: The patch provided below worked for me on 5.3-STABLE. Again: I'm _not_ the author of this patch, but since it's only one line, I guess (hope) it doesn't matter. --- patch.txt begins here --- --- sys/i386/isa/clock.c.orig Mon Jul 12 02:50:59 2004 +++ sys/i386/isa/clock.c Thu Jan 6 21:13:48 2005 @@ -946,6 +946,7 @@ /* Initialize RTC. */ writertc(RTC_STATUSA, rtc_statusa); writertc(RTC_STATUSB, RTCSB_24HR); + rtcin(RTC_INTR); /* clear any pending interrupt */ /* Don't bother enabling the statistics clock. */ if (!statclock_disable) { --- patch.txt ends here --- >Release-Note: >Audit-Trail: >Unformatted: