lkml.org 
[lkml]   [2003]   [Jan]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Subject[RFC][PATCH] linux-2.5.55_x86-tsc-cleanup_A0
From
Date
All,
This patch simply removes one more of the remaining CONFIG_X86_TSC
#ifdefs from get_cycles(). It is replaced w/ a if(cpu_has_tsc) switch,
so if you think this will cause a major performance impact, let me know
and I'll leave it alone.

Otherwise I'll send it in for real on monday.

thanks
-john

diff -Nru a/include/asm-i386/timex.h b/include/asm-i386/timex.h
--- a/include/asm-i386/timex.h Thu Jan 9 17:17:17 2003
+++ b/include/asm-i386/timex.h Thu Jan 9 17:17:17 2003
@@ -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;


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:32    [W:0.041 / U:5.712 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site