When CONFIG_X86_TSC=n, we do not need to check cpu_has_tsc, we can
simply return with 0. Moreover cpu_has_tsc indicates whether cpu
tsc feature on or not, so it doesn't matter when CONFIG_X86_TSC=n.
Am I right? Or I'm missing anything?
----
Signed-off-by: Rakib Mullick <[email protected]>
--- linus/arch/x86/include/asm/tsc.h 2009-10-17 13:12:59.000000000 +0600
+++ rakib/arch/x86/include/asm/tsc.h 2009-10-30 21:55:29.000000000 +0600
@@ -24,8 +24,7 @@ static inline cycles_t get_cycles(void)
unsigned long long ret = 0;
#ifndef CONFIG_X86_TSC
- if (!cpu_has_tsc)
- return 0;
+ return 0;
#endif
rdtscll(ret);
@@ -39,8 +38,7 @@ static __always_inline cycles_t vget_cyc
* access boot_cpu_data (which is not VDSO-safe):
*/
#ifndef CONFIG_X86_TSC
- if (!cpu_has_tsc)
- return 0;
+ return 0;
#endif
return (cycles_t)__native_read_tsc();
}