Skip to contentSkip to conversation

lockmeter does not require CONFIG_X86_TSC

PATCH New Martin J. Bligh 1 participant 1 message Dec 28, 2003

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 lockmeter does not require CONFIG_X86_TSC

Due to the extreme twistedness of the world, CONFIG_X86_TSC doesn't mean "I have a TSC", it means "I compiled out PIT support completely". Don't ask me why.

However, this means that the check for it in the lockmeter code is invalid - it's perfectly valid to use a i386 compiled kernel on a 686, where CONFIG_X86_TSC is off, but we have both TSC and PIT support.

Patch simply removes the #error check.

M.

include/asm-i386/lockmeter.h +0 -4
diff -urpN -X /home/fletch/.diff.exclude 620-force_wholefrag/include/asm-i386/lockmeter.h 630-lockmeter_notsc/include/asm-i386/lockmeter.h
@@ -108,9 +108,6 @@ extern inline int rwlock_readers(rwlock_
 /* this is a lot of typing just to get gcc to emit "rdtsc" */
 static inline long long get_cycles64 (void)
 {
-#ifndef CONFIG_X86_TSC
-	#error this code requires CONFIG_X86_TSC
-#else
 	union longlong_u {
 		long long intlong;
 		struct intint_s {
@@ -121,7 +118,6 @@ static inline long long get_cycles64 (vo
 
 	rdtsc(longlong.intint.eax,longlong.intint.edx);
 	return longlong.intlong;
-#endif
 }
 
 #endif /* _I386_LOCKMETER_H */