From: Stephen Hemminger <shemminger@osdl.org>
To: Linus Torvalds <torvalds@transmeta.com>
Cc: john stultz <johnstul@us.ibm.com>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Jerry Cooperstein <coop@axian.com>
Subject: [PATCH] boot time parameter to turn of TSC usage
Date: 18 Mar 2003 16:38:20 -0800 [thread overview]
Message-ID: <1048034299.6296.85.camel@dell_ss3.pdx.osdl.net> (raw)
In-Reply-To: <20030319002119.GA5351@p3.attbi.com>
For machines that don't want to cooperate and have bad TSC counter and/or
change CPU frequency without change support.
This fixes the problem on Jerry Cooperstein's PIII laptop.
Could be useful for other people and tech support situations.
Please consider applying.
Thanks
Steve
diff -Nru a/arch/i386/kernel/timers/timer_tsc.c b/arch/i386/kernel/timers/timer_tsc.c
--- a/arch/i386/kernel/timers/timer_tsc.c Tue Mar 18 15:28:10 2003
+++ b/arch/i386/kernel/timers/timer_tsc.c Tue Mar 18 15:28:10 2003
@@ -15,6 +15,7 @@
#include <asm/processor.h>
int tsc_disable __initdata = 0;
+static int tsc_clock_disable __initdata = 0;
extern spinlock_t i8253_lock;
@@ -241,6 +242,13 @@
};
#endif
+/* Don't use TSC for time of day clock */
+static int __init tsc_noclock_setup(char *str)
+{
+ tsc_clock_disable = 1;
+ return 1;
+}
+__setup("notsclock", tsc_noclock_setup);
static int init_tsc(void)
{
@@ -273,7 +281,7 @@
cpufreq_register_notifier(&time_cpufreq_notifier_block, CPUFREQ_TRANSITION_NOTIFIER);
#endif
- if (cpu_has_tsc) {
+ if (cpu_has_tsc && !tsc_clock_disable) {
unsigned long tsc_quotient = calibrate_tsc();
if (tsc_quotient) {
fast_gettimeoffset_quotient = tsc_quotient;
next prev parent reply other threads:[~2003-03-19 0:27 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-03-18 19:05 seqlock/unlock(&xtime_lock) problems cause keyboard, time skew problems Jerry Cooperstein
2003-03-18 20:32 ` Stephen Hemminger
2003-03-18 20:59 ` Jerry Cooperstein
2003-03-18 23:34 ` john stultz
2003-03-19 0:21 ` Jerry Cooperstein
2003-03-19 0:38 ` Stephen Hemminger [this message]
2003-03-19 0:39 ` [PATCH] boot time parameter to turn of TSC usage Andrew Morton
2003-03-19 1:03 ` Stephen Hemminger
2003-03-18 23:57 ` seqlock/unlock(&xtime_lock) problems cause keyboard, time skew problems Stephen Hemminger
[not found] ` <1048022686.6291.6.camel@dell_ss3.pdx.osdl.net>
[not found] ` <20030318214101.GA4527@p3.attbi.com>
[not found] ` <1048025052.6294.16.camel@dell_ss3.pdx.osdl.net>
[not found] ` <20030318222313.GA4831@p3.attbi.com>
[not found] ` <1048027027.6297.33.camel@dell_ss3.pdx.osdl.net>
[not found] ` <20030318225801.GC4831@p3.attbi.com>
[not found] ` <1048030151.6297.71.camel@dell_ss3.pdx.osdl.net>
2003-03-19 0:27 ` Jerry Cooperstein
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=1048034299.6296.85.camel@dell_ss3.pdx.osdl.net \
--to=shemminger@osdl.org \
--cc=coop@axian.com \
--cc=johnstul@us.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@transmeta.com \
/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®