public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: john stultz <johnstul@us.ibm.com>
To: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: "J.E.J. Bottomley" <James.Bottomley@HansenPartnership.com>,
	Linus Torvalds <torvalds@transmeta.com>,
	lkml <linux-kernel@vger.kernel.org>
Subject: Re: Voyager subarchitecture for 2.5.46
Date: 06 Nov 2002 13:35:35 -0800	[thread overview]
Message-ID: <1036618536.6193.179.camel@cog> (raw)
In-Reply-To: <1036590222.9803.17.camel@irongate.swansea.linux.org.uk>

On Wed, 2002-11-06 at 05:43, Alan Cox wrote:
> On Wed, 2002-11-06 at 02:31, john stultz wrote:
> > I'm fine w/ the X86_TSC change, but I'd drop the X86_PIT for now. 
> > 
> > Then make the arch/i386/timers/Makefile change to be something like:
> > 
> > obj-y := timer.o timer_tsc.o timer_pit.o
> > obj-$(CONFIG_X86_TSC)		-= timer_pit.o #does this(-=) work?
> > obj-$(CONFIG_X86_CYCYLONE)	+= timer_cyclone.o
> 
> Not everything is going to have a PIT. Also I need to know if there is a
> PIT for a few other things so I'd prefer to keep it, but I'm not
> excessively bothered

Hmmm. Ok, How about something like what is below? This is very similar
to what James is suggesting, but tries to fix some of the corner cases
as well. The only problem I see with this is that in some places we're
using _X86_PIT_TIMER as an imagined !_X86_TSC_ONLY, so one couldn't have
a kernel that compiled in the Cyclone timer, not the PIT timer, and
allowed one to disable the TSC. 

I'm still not sure this is the way to go, but at least gives James a
chance to poke at my code rather then the other way around. 

thanks
-john


diff -Nru a/arch/i386/Kconfig b/arch/i386/Kconfig
--- a/arch/i386/Kconfig	Mon Nov  4 17:15:15 2002
+++ b/arch/i386/Kconfig	Mon Nov  4 17:15:15 2002
@@ -430,6 +430,11 @@
 	depends on NUMA
 	default y
 
+config X86_PIT_TIMER
+	bool
+	depends on !X86_TSC || X86_NUMAQ
+	default n
+
 config X86_MCE
 	bool "Machine Check Exception"
 	---help---
diff -Nru a/arch/i386/kernel/cpu/common.c b/arch/i386/kernel/cpu/common.c
--- a/arch/i386/kernel/cpu/common.c	Mon Nov  4 17:15:15 2002
+++ b/arch/i386/kernel/cpu/common.c	Mon Nov  4 17:15:15 2002
@@ -42,7 +42,7 @@
 }
 __setup("cachesize=", cachesize_setup);
 
-#ifndef CONFIG_X86_TSC
+#ifdef CONFIG_X86_PIT_TIMER
 static int tsc_disable __initdata = 0;
 
 static int __init tsc_setup(char *str)
@@ -55,7 +55,7 @@
 
 static int __init tsc_setup(char *str)
 {
-	printk("notsc: Kernel compiled with CONFIG_X86_TSC, cannot disable TSC.\n");
+	printk("notsc: Kernel not compiled with CONFIG_X86_PIT_TIMER, cannot disable TSC.\n");
 	return 1;
 }
 #endif
diff -Nru a/arch/i386/kernel/timers/Makefile b/arch/i386/kernel/timers/Makefile
--- a/arch/i386/kernel/timers/Makefile	Mon Nov  4 17:15:15 2002
+++ b/arch/i386/kernel/timers/Makefile	Mon Nov  4 17:15:15 2002
@@ -5,7 +5,7 @@
 obj-y := timer.o
 
 obj-y += timer_tsc.o
-obj-y += timer_pit.o
+obj-$(CONFIG_X86_PIT_TIMER) += timer_pit.o
 obj-$(CONFIG_X86_CYCLONE)   += timer_cyclone.o
 
 include $(TOPDIR)/Rules.make
diff -Nru a/arch/i386/kernel/timers/timer.c b/arch/i386/kernel/timers/timer.c
--- a/arch/i386/kernel/timers/timer.c	Mon Nov  4 17:15:15 2002
+++ b/arch/i386/kernel/timers/timer.c	Mon Nov  4 17:15:15 2002
@@ -8,7 +8,7 @@
 /* list of timers, ordered by preference, NULL terminated */
 static struct timer_opts* timers[] = {
 	&timer_tsc,
-#ifndef CONFIG_X86_TSC
+#ifdef CONFIG_X86_PIT_TIMER
 	&timer_pit,
 #endif
 	NULL,


  reply	other threads:[~2002-11-06 21:32 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-11-05 20:45 Voyager subarchitecture for 2.5.46 J.E.J. Bottomley
2002-11-06  2:31 ` john stultz
2002-11-06 13:43   ` Alan Cox
2002-11-06 21:35     ` john stultz [this message]
2002-11-06 15:03   ` J.E.J. Bottomley
2002-11-06 15:38     ` Alan Cox
2002-11-06 16:09       ` Christer Weinigel
2002-11-06 15:45     ` Linus Torvalds
2002-11-06 16:19       ` Alan Cox
2002-11-06 16:12         ` Linus Torvalds
2002-11-06 16:45           ` Alan Cox
2002-11-10 16:30           ` Pavel Machek
2002-11-10 18:59             ` Linus Torvalds
2002-11-10 19:18               ` Pavel Machek
2002-11-10 19:31                 ` Linus Torvalds
2002-11-10 19:42                   ` Pavel Machek
2002-11-10 19:48                     ` Vojtech Pavlik
2002-11-10 20:02                     ` Sean Neakums
2002-11-10 20:16                       ` Lars Marowsky-Bree
2002-11-10 22:11                         ` Alan Cox
2002-11-10 19:46               ` Vojtech Pavlik
2002-11-11 20:40                 ` john stultz
2002-11-11 20:57                   ` J.E.J. Bottomley
2002-11-11 21:36                     ` William Lee Irwin III
2002-11-11 21:58                     ` john stultz
2002-11-11 22:49                       ` J.E.J. Bottomley
2002-11-11 23:12                         ` john stultz
2002-11-12 12:16                     ` Pavel Machek
2002-11-11 22:08                   ` Vojtech Pavlik
2002-11-06 20:07       ` john stultz
2002-11-06 22:36       ` H. Peter Anvin
2002-11-06 19:30     ` 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=1036618536.6193.179.camel@cog \
    --to=johnstul@us.ibm.com \
    --cc=James.Bottomley@HansenPartnership.com \
    --cc=alan@lxorguk.ukuu.org.uk \
    --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