From: Chris Bajumpaa <cbajumpa@or8.net>
To: linux-kernel@vger.kernel.org
Subject: [PATCH 2.6] via686a/KX133 TSC failure
Date: Sat, 20 Dec 2003 08:18:43 -0500 (EST) [thread overview]
Message-ID: <20031220074515.D50545@collab.or8.net> (raw)
Hello,
This patch fixes a problem with the TSC failing on via686a/KX133
motherboards either reverting to using the pit or deadlocking the
machine alltogether under heavy load. (Specifically Abit KA7/KA7-100).
Message from the log:
Dec 18 18:20:37 grinder kernel: Losing too many ticks!
Dec 18 18:20:37 grinder kernel: TSC cannot be used as a timesource. (Are
you running with SpeedStep?)
Dec 18 18:20:37 grinder kernel: Falling back to a sane timesource.
The snippet of code that was missing from timer_tsc.c comes from
timer_pit.c. Please apply this patch.
8< patch starts here:
--- linux-2.6.0-vanilla/arch/i386/kernel/timers/timer_tsc.c Wed Nov 26 15:44:45 2003
+++ linux-2.6.0-cjb/arch/i386/kernel/timers/timer_tsc.c Sat Dec 20 07:27:24 2003
@@ -184,6 +184,18 @@
count = inb_p(PIT_CH0); /* read the latched count */
count |= inb(PIT_CH0) << 8;
+
+ /*
+ * VIA686a test code... reset the latch if count > max + 1
+ * from timer_pit.c - cjb
+ */
+ if (count > LATCH) {
+ outb_p(0x34, PIT_MODE);
+ outb_p(LATCH & 0xff, PIT_CH0);
+ outb(LATCH >> 8, PIT_CH0);
+ count = LATCH - 1;
+ }
+
spin_unlock(&i8253_lock);
if (pit_latch_buggy) {
reply other threads:[~2003-12-20 13:18 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20031220074515.D50545@collab.or8.net \
--to=cbajumpa@or8.net \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox