diff options
| -rw-r--r-- | arch/i386/kernel/tsc.c | 20 | ||||
| -rw-r--r-- | include/asm-i386/msr.h | 3 |
2 files changed, 23 insertions, 0 deletions
diff --git a/arch/i386/kernel/tsc.c b/arch/i386/kernel/tsc.c index 22931d24027c..3082a418635c 100644 --- a/arch/i386/kernel/tsc.c +++ b/arch/i386/kernel/tsc.c | |||
| @@ -364,6 +364,25 @@ __cpuinit int unsynchronized_tsc(void) | |||
| 364 | return tsc_unstable; | 364 | return tsc_unstable; |
| 365 | } | 365 | } |
| 366 | 366 | ||
| 367 | /* | ||
| 368 | * Geode_LX - the OLPC CPU has a possibly a very reliable TSC | ||
| 369 | */ | ||
| 370 | #ifdef CONFIG_MGEODE_LX | ||
| 371 | /* RTSC counts during suspend */ | ||
| 372 | #define RTSC_SUSP 0x100 | ||
| 373 | |||
| 374 | static void __init check_geode_tsc_reliable(void) | ||
| 375 | { | ||
| 376 | unsigned long val; | ||
| 377 | |||
| 378 | rdmsrl(MSR_GEODE_BUSCONT_CONF0, val); | ||
| 379 | if ((val & RTSC_SUSP)) | ||
| 380 | clocksource_tsc.flags &= ~CLOCK_SOURCE_MUST_VERIFY; | ||
| 381 | } | ||
| 382 | #else | ||
| 383 | static inline void check_geode_tsc_reliable(void) { } | ||
| 384 | #endif | ||
| 385 | |||
| 367 | static int __init init_tsc_clocksource(void) | 386 | static int __init init_tsc_clocksource(void) |
| 368 | { | 387 | { |
| 369 | 388 | ||
| @@ -372,6 +391,7 @@ static int __init init_tsc_clocksource(void) | |||
| 372 | dmi_check_system(bad_tsc_dmi_table); | 391 | dmi_check_system(bad_tsc_dmi_table); |
| 373 | 392 | ||
| 374 | unsynchronized_tsc(); | 393 | unsynchronized_tsc(); |
| 394 | check_geode_tsc_reliable(); | ||
| 375 | current_tsc_khz = tsc_khz; | 395 | current_tsc_khz = tsc_khz; |
| 376 | clocksource_tsc.mult = clocksource_khz2mult(current_tsc_khz, | 396 | clocksource_tsc.mult = clocksource_khz2mult(current_tsc_khz, |
| 377 | clocksource_tsc.shift); | 397 | clocksource_tsc.shift); |
diff --git a/include/asm-i386/msr.h b/include/asm-i386/msr.h index 609a3899475c..6db40d0583f1 100644 --- a/include/asm-i386/msr.h +++ b/include/asm-i386/msr.h | |||
| @@ -307,4 +307,7 @@ static inline void wrmsrl (unsigned long msr, unsigned long long val) | |||
| 307 | #define MSR_CORE_PERF_GLOBAL_CTRL 0x38f | 307 | #define MSR_CORE_PERF_GLOBAL_CTRL 0x38f |
| 308 | #define MSR_CORE_PERF_GLOBAL_OVF_CTRL 0x390 | 308 | #define MSR_CORE_PERF_GLOBAL_OVF_CTRL 0x390 |
| 309 | 309 | ||
| 310 | /* Geode defined MSRs */ | ||
| 311 | #define MSR_GEODE_BUSCONT_CONF0 0x1900 | ||
| 312 | |||
| 310 | #endif /* __ASM_MSR_H */ | 313 | #endif /* __ASM_MSR_H */ |
