Skip to contentSkip to conversation

linux-2.5.57_x86-tsc-cleanup_A0

TRIVIAL Rusty Trivial Russell 1 participant 1 message Feb 6, 2003

lore
Share & tools
lore
#0 lore raw

From: john stultz <[email protected]>

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

include/asm-i386/timex.h renamed from include/asm-i386/timex.h.orig +3 -7
@@ -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;
Signature · 2 lines
  Don't blame me: the Monkey is driving
  File: john stultz <[email protected]>: [PATCH][TRIVIAL] linux-2.5.57_x86-tsc-cleanup_A0