From owner-freebsd-mobile Sun May 23 22:11: 1 1999 Delivered-To: freebsd-mobile@freebsd.org Received: from tasogare.imasy.or.jp (tasogare.imasy.or.jp [202.227.24.5]) by hub.freebsd.org (Postfix) with ESMTP id D236915012 for ; Sun, 23 May 1999 22:10:48 -0700 (PDT) (envelope-from iwasaki@jp.FreeBSD.org) Received: from localhost (isdn11.imasy.or.jp [202.227.24.203]) by tasogare.imasy.or.jp (8.9.3+3.2W/3.7W-tasogare/smtpfeed 1.01) with ESMTP id OAA23390; Mon, 24 May 1999 14:10:45 +0900 (JST) (envelope-from iwasaki@jp.FreeBSD.org) Message-Id: <199905240510.OAA23390@tasogare.imasy.or.jp> To: randy@psg.com Cc: freebsd-mobile@freebsd.org Subject: Re: PAO3-19990518 gives calcru: negative time of -69... In-Reply-To: Your message of "Sat, 22 May 1999 23:53:30 -0700 (PDT)" References: X-Mailer: Mew version 1.93 on Emacs 19.34 / Mule 2.3 (SUETSUMUHANA) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Date: Mon, 24 May 1999 14:09:23 +0900 From: Mitsuru IWASAKI X-Dispatcher: imput version 980905(IM100) Lines: 38 Sender: owner-freebsd-mobile@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org randy> calcru: negative time of -16087 usec for pid 7 ([) Could you try this? sysctl -w kern.timecounter.method=1 This problem seems 3.X problem, not PAO specific one. Another story, we had similar problem after resuming on some NotePCs. we fixed this by reseting i8254 state in apm_default_resume(). The following is the added code in PAO3 by Kenjiro Cho-san (kjc@csl.sony.co.jp). /sys/i386/isa/clock.c: /* * 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. */ void i8254_restore(void) { u_long ef; ef = read_eflags(); disable_intr(); outb(TIMER_MODE, TIMER_SEL0 | TIMER_RATEGEN | TIMER_16BIT); outb(TIMER_CNTR0, timer0_max_count & 0xff); outb(TIMER_CNTR0, timer0_max_count >> 8); CLOCK_UNLOCK(); write_eflags(ef); } To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-mobile" in the body of the message