From: Jonas Diemer <diemer@gmx.de>
To: linux-kernel@vger.kernel.org
Subject: VIA timer bugfix, patch for 2.4.5
Date: Sat, 2 Jun 2001 16:35:18 +0200 [thread overview]
Message-ID: <20010602163518.090988d8.diemer@gmx.de> (raw)
Hi!
I have compiled a little patch that contains the VIA timer bugfix (from the ac kernel). the patch is against linus' 2.4.5 kernel. I have compiled and ran the patched kernel sucessfully.
the only changes made by this patch are done to linux/arch/i386/kernel/timer.c
I would like to have this patch applied to linus' kernel tree (so that it comes in 2.4.6), because alan's kernel has USB problems on my machine.
Here's the patch:
--- arch/i386/kernel/time.c.orig Sat Jun 2 16:06:59 2001
+++ arch/i386/kernel/time.c Sat Jun 2 16:07:20 2001
@@ -178,6 +178,15 @@
jiffies_t = jiffies;
count |= inb_p(0x40) << 8;
+
+ /* VIA686a test code... reset the latch if count > max + 1 */
+ if (count > LATCH) {
+ outb_p(0x34, 0x43);
+ outb_p(LATCH & 0xff, 0x40);
+ outb(LATCH >> 8, 0x40);
+ count = LATCH - 1;
+ }
+
spin_unlock(&i8253_lock);
/*
@@ -413,7 +422,7 @@
if (!user_mode(regs))
x86_do_profile(regs->eip);
#else
- if (!smp_found_config)
+ if (!using_apic_timer)
smp_local_timer_interrupt(regs);
#endif
@@ -492,6 +501,24 @@
count = inb_p(0x40); /* read the latched count */
count |= inb(0x40) << 8;
+
+
+ /* VIA686a test code... reset the latch if count > max */
+ if (count > LATCH-1) {
+ static int last_whine;
+ outb_p(0x34, 0x43);
+ outb_p(LATCH & 0xff, 0x40);
+ outb(LATCH >> 8, 0x40);
+ count = LATCH - 1;
+ if(time_after(jiffies, last_whine))
+ {
+ printk(KERN_WARNING "probable hardware bug: clock timer configuration lost - probably a VIA686a motherboard.\n");
+ printk(KERN_WARNING "probable hardware bug: restoring chip configuration.\n");
+ last_whine = jiffies + HZ;
+ }
+ }
+
+
spin_unlock(&i8253_lock);
count = ((LATCH-1) - count) * TICK_SIZE;
--end of patch---
This is my first patch, i hope it is ok. i followed the instructions in Documentation/SubmittingPatches to create it.
- Jonas
PS: please CC me any reply, i haven't registered to the mailinglist.
reply other threads:[~2001-06-02 14:35 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=20010602163518.090988d8.diemer@gmx.de \
--to=diemer@gmx.de \
--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
all inboxes | Powered by JetHome®