From owner-p4-projects Sat Sep 21 12:11:31 2002 Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 9FA0C37B401; Sat, 21 Sep 2002 12:11:28 -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 5FB9E37B404 for ; Sat, 21 Sep 2002 12:11:28 -0700 (PDT) Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id CA9E643E65 for ; Sat, 21 Sep 2002 12:11:27 -0700 (PDT) (envelope-from peter@freebsd.org) Received: from freefall.freebsd.org (perforce@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.6/8.12.6) with ESMTP id g8LJBRCo040873 for ; Sat, 21 Sep 2002 12:11:27 -0700 (PDT) (envelope-from peter@freebsd.org) Received: (from perforce@localhost) by freefall.freebsd.org (8.12.6/8.12.6/Submit) id g8LJBR9p040863 for perforce@freebsd.org; Sat, 21 Sep 2002 12:11:27 -0700 (PDT) Date: Sat, 21 Sep 2002 12:11:27 -0700 (PDT) Message-Id: <200209211911.g8LJBR9p040863@freefall.freebsd.org> X-Authentication-Warning: freefall.freebsd.org: perforce set sender to peter@freebsd.org using -f From: Peter Wemm Subject: PERFORCE change 17873 for review To: 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 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 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. */ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe p4-projects" in the body of the message