From owner-p4-projects Mon Sep 23 9: 5:22 2002 Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id B9EE437B790; Mon, 23 Sep 2002 09:05:14 -0700 (PDT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 18BB737B627 for ; Mon, 23 Sep 2002 09:05:08 -0700 (PDT) Received: from mail.speakeasy.net (mail12.speakeasy.net [216.254.0.212]) by mx1.FreeBSD.org (Postfix) with ESMTP id 95F0943E42 for ; Mon, 23 Sep 2002 09:04:57 -0700 (PDT) (envelope-from jhb@FreeBSD.org) Received: (qmail 4093 invoked from network); 23 Sep 2002 16:04:58 -0000 Received: from unknown (HELO server.baldwin.cx) ([216.27.160.63]) (envelope-sender ) by mail12.speakeasy.net (qmail-ldap-1.03) with DES-CBC3-SHA encrypted SMTP for ; 23 Sep 2002 16:04:58 -0000 Received: from laptop.baldwin.cx (gw1.twc.weather.com [216.133.140.1]) by server.baldwin.cx (8.12.5/8.12.5) with ESMTP id g8NG4hBv081741; Mon, 23 Sep 2002 12:04:43 -0400 (EDT) (envelope-from jhb@FreeBSD.org) Message-ID: X-Mailer: XFMail 1.5.2 on FreeBSD X-Priority: 3 (Normal) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit MIME-Version: 1.0 In-Reply-To: <200209211911.g8LJBR9p040863@freefall.freebsd.org> Date: Mon, 23 Sep 2002 12:04:46 -0400 (EDT) From: John Baldwin To: Peter Wemm Subject: RE: PERFORCE change 17873 for review Cc: Perforce Change Reviews Sender: owner-p4-projects@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On 21-Sep-2002 Peter Wemm wrote: > http://people.freebsd.org/~peter/p4db/chv.cgi?CH=17873 > > Change 17873 by peter@peter_overcee on 2002/09/21 12:10:44 > > chop out more apm goop When you do add ACPI resume support back in at some point, you will likely still need timer_restore(), so I wouldn't axe it just yet. > Affected files ... > > .. //depot/projects/hammer/sys/x86_64/conf/GENERIC.hints#2 edit > .. //depot/projects/hammer/sys/x86_64/include/clock.h#4 edit > .. //depot/projects/hammer/sys/x86_64/isa/clock.c#5 edit > > Differences ... > > ==== //depot/projects/hammer/sys/x86_64/conf/GENERIC.hints#2 (text+ko) ==== > > @@ -31,9 +31,6 @@ > hint.npx.0.at="nexus" > hint.npx.0.port="0x0F0" > hint.npx.0.irq="13" > -hint.apm.0.at="nexus" > -hint.apm.0.disabled="1" > -hint.apm.0.flags="0x20" > hint.pmtimer.0.at="isa" > hint.pcic.0.at="isa" > # hint.pcic.0.irq="10" # Default to polling > > ==== //depot/projects/hammer/sys/x86_64/include/clock.h#4 (text+ko) ==== > > @@ -34,7 +34,6 @@ > int release_timer2(void); > int rtcin(int val); > int sysbeep(int pitch, int period); > -void timer_restore(void); > > #endif /* _KERNEL */ > > > ==== //depot/projects/hammer/sys/x86_64/isa/clock.c#5 (text+ko) ==== > > @@ -656,47 +656,6 @@ > } > > /* > - * i8254_restore is called from apm_default_resume() to reload > - * the countdown register. > - * this should not be necessary but there are broken laptops that > - * do not restore the countdown register on resume. > - * when it happnes, it messes up the hardclock interval and system clock, > - * which leads to the infamous "calcru: negative time" problem. > - */ > -static void > -i8254_restore(void) > -{ > - > - mtx_lock_spin(&clock_lock); > - outb(TIMER_MODE, TIMER_SEL0 | TIMER_RATEGEN | TIMER_16BIT); > - outb(TIMER_CNTR0, timer0_max_count & 0xff); > - outb(TIMER_CNTR0, timer0_max_count >> 8); > - mtx_unlock_spin(&clock_lock); > -} > - > -static void > -rtc_restore(void) > -{ > - > - /* Reenable RTC updates and interrupts. */ > - /* XXX locking is needed for RTC access? */ > - writertc(RTC_STATUSA, rtc_statusa); > - writertc(RTC_STATUSB, RTCSB_HALT | RTCSB_24HR); > - writertc(RTC_STATUSB, rtc_statusb); > -} > - > -/* > - * Restore all the timers atomically. > - */ > -void > -timer_restore(void) > -{ > - > - i8254_restore(); /* restore timer_freq and hz */ > - rtc_restore(); /* reenable RTC interrupts */ > -} > - > -/* > * Initialize 8254 timer 0 early so that it can be used in DELAY(). > * XXX initialization of other timers is unintentionally left blank. > */ -- John Baldwin <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve!" - http://www.FreeBSD.org/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe p4-projects" in the body of the message