From: john stultz <johnstul@us.ibm.com>
To: Linus Torvalds <torvalds@transmeta.com>
Cc: lkml <linux-kernel@vger.kernel.org>, Dave H <haveblue@us.ibm.com>,
Andrew Morton <akpm@digeo.com>
Subject: [PATCH] linux-2.5.63_notsc-panic_A1
Date: 24 Feb 2003 21:00:33 -0800 [thread overview]
Message-ID: <1046149232.18311.337.camel@w-jstultz2.beaverton.ibm.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 1592 bytes --]
Linus, all
In my exuberance to remove #ifdef CONFIG_X86_TSC, I accidentally yanked
one that is needed as long as the symbol itself exists. I've actually
been sitting on this patch for a while, thinking I would get around to
killing off the remaining uses of _X86_TSC, but I've just been too
swamped to get around to it.
This patch ensures that the "notsc" boot parameter is ignored (with a
warning) if the option is passed to a kernel that has been compiled with
CONFIG_X86_TSC. Currently the code will unreasonably panic when this
occurs.
And since this patch does add an #ifdef _X86_TSC, as a show of goodwill,
I'll follow this patch with another that removes one instance of
_X86_TSC.
Please apply,
thanks
-john
PS: If anyone is looking for a little project, the usage in pkt_sched.h
and profile.h (include/net) could use some attention :)
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 Mon Feb 24 20:57:33 2003
+++ b/arch/i386/kernel/timers/timer_tsc.c Mon Feb 24 20:57:33 2003
@@ -299,6 +299,7 @@
return -ENODEV;
}
+#ifndef CONFIG_X86_TSC
/* disable flag for tsc. Takes effect by clearing the TSC cpu flag
* in cpu/common.c */
static int __init tsc_setup(char *str)
@@ -306,7 +307,14 @@
tsc_disable = 1;
return 1;
}
-
+#else
+static int __init tsc_setup(char *str)
+{
+ printk(KERN_WARNING "notsc: Kernel compiled with CONFIG_X86_TSC, "
+ "cannot disable TSC.\n");
+ return 1;
+}
+#endif
__setup("notsc", tsc_setup);
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 232 bytes --]
next reply other threads:[~2003-02-25 4:55 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-02-25 5:00 john stultz [this message]
2003-02-25 5:10 ` [PATCH] linux-2.5.63_x86-tsc-cleanup_A0 john stultz
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=1046149232.18311.337.camel@w-jstultz2.beaverton.ibm.com \
--to=johnstul@us.ibm.com \
--cc=akpm@digeo.com \
--cc=haveblue@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®