* [TRIVIAL] linux-2.5.57_x86-tsc-cleanup_A0
@ 2003-02-06 5:56 Rusty Trivial Russell
0 siblings, 0 replies; only message in thread
From: Rusty Trivial Russell @ 2003-02-06 5:56 UTC (permalink / raw)
To: torvalds, linux-kernel
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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2003-02-06 5:48 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-02-06 5:56 [TRIVIAL] linux-2.5.57_x86-tsc-cleanup_A0 Rusty Trivial Russell
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®