public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: john stultz <johnstul@us.ibm.com>
To: john stultz <johnstul@us.ibm.com>
Cc: William Lee Irwin III <wli@holomorphy.com>,
	"Adam J. Richter" <adam@yggdrasil.com>,
	mingo@redhat.com, James.Bottomley@HansenPartnership.com,
	lkml <linux-kernel@vger.kernel.org>
Subject: Re: Patch?: linux-2.5.41 multiprocessor vs. CONFIG_X86_TSC
Date: 10 Oct 2002 12:01:52 -0700	[thread overview]
Message-ID: <1034276513.19094.38.camel@cog> (raw)
In-Reply-To: <1034274158.19093.28.camel@cog>

On Thu, 2002-10-10 at 11:22, john stultz wrote:
> Alan has a good cleanup patch (included below) for 2.4. that folks might
> consider to for 2.5. It helps remove the #ifdefs and lets the compiler
> do the optimization. 

Whoops, forgot to inline this at the end. This is a bit old, for
2.4.20-pre2, but I don't think much has change here.



diff -Nru a/arch/i386/kernel/setup.c b/arch/i386/kernel/setup.c
--- a/arch/i386/kernel/setup.c	Thu Aug 15 17:10:44 2002
+++ b/arch/i386/kernel/setup.c	Thu Aug 15 17:10:44 2002
@@ -1145,6 +1145,8 @@
 }
 
 __setup("notsc", tsc_setup);
+#else
+#define tsc_disable 0
 #endif
 
 static int __init highio_setup(char *str)
@@ -2734,10 +2736,8 @@
 	 */
 
 	/* TSC disabled? */
-#ifndef CONFIG_X86_TSC
 	if ( tsc_disable )
 		clear_bit(X86_FEATURE_TSC, &c->x86_capability);
-#endif
 
 	/* HT disabled? */
 	if (disable_x86_ht)
@@ -2979,14 +2979,12 @@
 
 	if (cpu_has_vme || cpu_has_tsc || cpu_has_de)
 		clear_in_cr4(X86_CR4_VME|X86_CR4_PVI|X86_CR4_TSD|X86_CR4_DE);
-#ifndef CONFIG_X86_TSC
 	if (tsc_disable && cpu_has_tsc) {
 		printk(KERN_NOTICE "Disabling TSC...\n");
 		/**** FIX-HPA: DOES THIS REALLY BELONG HERE? ****/
 		clear_bit(X86_FEATURE_TSC, boot_cpu_data.x86_capability);
 		set_in_cr4(X86_CR4_TSD);
 	}
-#endif
 
 	__asm__ __volatile__("lgdt %0": "=m" (gdt_descr));
 	__asm__ __volatile__("lidt %0": "=m" (idt_descr));


  reply	other threads:[~2002-10-10 19:03 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-10-10 12:02 Patch?: linux-2.5.41 multiprocessor vs. CONFIG_X86_TSC Adam J. Richter
2002-10-10 12:17 ` William Lee Irwin III
2002-10-10 16:52   ` James Bottomley
2002-10-10 18:22   ` john stultz
2002-10-10 19:01     ` john stultz [this message]
2002-10-10 21:17     ` Alan Cox
2002-10-10 21:07       ` 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=1034276513.19094.38.camel@cog \
    --to=johnstul@us.ibm.com \
    --cc=James.Bottomley@HansenPartnership.com \
    --cc=adam@yggdrasil.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=wli@holomorphy.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