[PATCH] [15/35] i386: pit_latch_buggy has no effect

2007-04-28 Thread Andi Kleen

From: takada <[EMAIL PROTECTED]>

Eliminated the arch/i386/kernel/timers in 2.6.18, use clocksoures instead. 
pit_latch_buggy was referred in timers/timer_tsc.c, and currently removed. 
Therefore nobody refer it.

Until 2.6.17, MediaGX's TSC works correctly.  after 2.6.18, warned "TSC
appears to be running slowly.  Marking it as unstable".  So marked unstable
TSC when CS55x0.

Cc: Andi Kleen <[EMAIL PROTECTED]>
Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
Signed-off-by: Andi Kleen <[EMAIL PROTECTED]>

---

 arch/i386/kernel/cpu/cyrix.c |2 +-
 arch/i386/kernel/time.c  |2 --
 include/asm-i386/timer.h |2 --
 3 files changed, 1 insertion(+), 5 deletions(-)

Index: linux/arch/i386/kernel/cpu/cyrix.c
===
--- linux.orig/arch/i386/kernel/cpu/cyrix.c
+++ linux/arch/i386/kernel/cpu/cyrix.c
@@ -279,7 +279,7 @@ static void __cpuinit init_cyrix(struct 
 */  
if (vendor == PCI_VENDOR_ID_CYRIX &&
 (device == PCI_DEVICE_ID_CYRIX_5510 || device == 
PCI_DEVICE_ID_CYRIX_5520))
-   pit_latch_buggy = 1;
+   mark_tsc_unstable();
}
 #endif
c->x86_cache_size=16;   /* Yep 16K integrated cache thats it */
Index: linux/arch/i386/kernel/time.c
===
--- linux.orig/arch/i386/kernel/time.c
+++ linux/arch/i386/kernel/time.c
@@ -70,8 +70,6 @@
 
 #include 
 
-int pit_latch_buggy;  /* extern */
-
 #include "do_timer.h"
 
 unsigned int cpu_khz;  /* Detected as we calibrate the TSC */
Index: linux/include/asm-i386/timer.h
===
--- linux.orig/include/asm-i386/timer.h
+++ linux/include/asm-i386/timer.h
@@ -9,8 +9,6 @@ void setup_pit_timer(void);
 unsigned long long native_sched_clock(void);
 unsigned long native_calculate_cpu_khz(void);
 
-/* Modifiers for buggy PIT handling */
-extern int pit_latch_buggy;
 extern int timer_ack;
 extern int no_timer_check;
 extern int no_sync_cmos_clock;
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


i386: pit_latch_buggy has no effect.

2007-02-10 Thread takada
Hi.
Eliminated the arch/i386/kernel/timers in 2.6.18, use clocksoures instead.
pit_latch_buggy was referred in timers/timer_tsc.c, and currently removed.
Therefore nobody refer it.
Until 2.6.17, MediaGX's TSC works correctly. after 2.6.18, warned
"TSC appears to be running slowly. Marking it as unstable". So marked 
unstable TSC when CS55x0.


diff -Naru a/arch/i386/kernel/cpu/cyrix.c b/arch/i386/kernel/cpu/cyrix.c
--- a/arch/i386/kernel/cpu/cyrix.c  2007-02-05 03:44:54.0 +0900
+++ b/arch/i386/kernel/cpu/cyrix.c  2007-02-10 16:11:31.0 +0900
@@ -278,7 +278,7 @@
 *  The 5510/5520 companion chips have a funky PIT.
 */  
if (pci_dev_present(cyrix_55x0))
-   pit_latch_buggy = 1;
+   mark_tsc_unstable();
 #endif
c->x86_cache_size=16;   /* Yep 16K integrated cache thats it */
 
diff -Naru a/arch/i386/kernel/time.c b/arch/i386/kernel/time.c
--- a/arch/i386/kernel/time.c   2007-02-05 03:44:54.0 +0900
+++ b/arch/i386/kernel/time.c   2007-02-10 16:12:04.0 +0900
@@ -70,8 +70,6 @@
 
 #include 
 
-int pit_latch_buggy;  /* extern */
-
 #include "do_timer.h"
 
 unsigned int cpu_khz;  /* Detected as we calibrate the TSC */
diff -Naru a/include/asm-i386/timer.h b/include/asm-i386/timer.h
--- a/include/asm-i386/timer.h  2007-02-05 03:44:54.0 +0900
+++ b/include/asm-i386/timer.h  2007-02-10 16:12:21.0 +0900
@@ -5,8 +5,6 @@
 
 #define TICK_SIZE (tick_nsec / 1000)
 void setup_pit_timer(void);
-/* Modifiers for buggy PIT handling */
-extern int pit_latch_buggy;
 extern int timer_ack;
 extern int recalibrate_cpu_khz(void);
 

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