mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Rusty Trivial Russell <rusty@rustcorp.com.au>
To: torvalds@transmeta.com, linux-kernel@vger.kernel.org
Subject: [TRIVIAL] linux-2.5.57_x86-tsc-cleanup_A0
Date: Thu, 06 Feb 2003 16:56:51 +1100	[thread overview]
Message-ID: <20030206055746.B29912C0EF@lists.samba.org> (raw)

From:  john stultz <johnstul@us.ibm.com>

  Linus, All,
  	Since no one complained about this over the weekend, here it is. This
  patch simply removes one more of the remaining CONFIG_X86_TSC #ifdefs
  (this one from get_cycles()). Instead of a compile time switch, it
  switches on cpu_has_tsc. 
  
  Please apply.
  
  thanks
  -john
  
  

--- trivial-2.5-bk/include/asm-i386/timex.h.orig	2003-02-06 16:30:27.000000000 +1100
+++ trivial-2.5-bk/include/asm-i386/timex.h	2003-02-06 16:30:27.000000000 +1100
@@ -40,14 +40,10 @@
 
 static inline cycles_t get_cycles (void)
 {
-#ifndef CONFIG_X86_TSC
-	return 0;
-#else
-	unsigned long long ret;
-
-	rdtscll(ret);
+	unsigned long long ret = 0;
+	if(cpu_has_tsc)
+		rdtscll(ret);
 	return ret;
-#endif
 }
 
 extern unsigned long cpu_khz;
-- 
  Don't blame me: the Monkey is driving
  File: john stultz <johnstul@us.ibm.com>: [PATCH][TRIVIAL] linux-2.5.57_x86-tsc-cleanup_A0

                 reply	other threads:[~2003-02-06  5:48 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=20030206055746.B29912C0EF@lists.samba.org \
    --to=rusty@rustcorp.com.au \
    --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®