[PATCH] x86, tsc: Remove checking cpu_has_tsc when CONFIG_X86_TSC=n.

From: Rakib Mullick
Date: Fri Oct 30 2009 - 11:19:03 EST


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 <rakib.mullick@xxxxxxxxx>

--- 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();
}
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/