Date: Mon, 23 Sep 2002 12:04:46 -0400 (EDT) From: John Baldwin <jhb@FreeBSD.org> To: Peter Wemm <peter@FreeBSD.org> Cc: Perforce Change Reviews <perforce@freebsd.org> Subject: RE: PERFORCE change 17873 for review Message-ID: <XFMail.20020923120446.jhb@FreeBSD.org> In-Reply-To: <200209211911.g8LJBR9p040863@freefall.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
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 <jhb@FreeBSD.org> <>< 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?XFMail.20020923120446.jhb>