Commit 07190a08 authored by Marcelo Tosatti's avatar Marcelo Tosatti Committed by Linus Torvalds
Browse files

[PATCH] Mark TSC on GeodeLX reliable

The Geode can safely use the TSC for highres, since:

1) Does not support frequency scaling,

2) The TSC _does_ count when the CPU is halted.  Furthermore, the Geode
   supports a mode called "suspension on halt", where Suspend mode (which
   interacts with the power management states) is entered.  TSC counting
   during suspend mode is controlled by bit 8 of the Bus Controller
   Configuration Register #0 (thanks Tom!).

3) no SMP :)

Check if "RTSC counts during suspension" and remove the requirement for
verification, so the clocksource code can safely select it as an timesource
for the highres timers subsystem.
Signed-off-by: default avatarMarcelo Tosatti <>
Signed-off-by: default avatarThomas Gleixner <>
Signed-off-by: default avatarIngo Molnar <>
Cc: john stultz <>
Cc: Roman Zippel <>
Signed-off-by: default avatarAndrew Morton <>
Signed-off-by: default avatarLinus Torvalds <>
parent 5d8b34fd
......@@ -364,6 +364,25 @@ __cpuinit int unsynchronized_tsc(void)
return tsc_unstable;
* Geode_LX - the OLPC CPU has a possibly a very reliable TSC
/* RTSC counts during suspend */
#define RTSC_SUSP 0x100
static void __init check_geode_tsc_reliable(void)
unsigned long val;
if ((val & RTSC_SUSP))
clocksource_tsc.flags &= ~CLOCK_SOURCE_MUST_VERIFY;
static inline void check_geode_tsc_reliable(void) { }
static int __init init_tsc_clocksource(void)
......@@ -372,6 +391,7 @@ static int __init init_tsc_clocksource(void)
current_tsc_khz = tsc_khz;
clocksource_tsc.mult = clocksource_khz2mult(current_tsc_khz,
......@@ -307,4 +307,7 @@ static inline void wrmsrl (unsigned long msr, unsigned long long val)
/* Geode defined MSRs */
#define MSR_GEODE_BUSCONT_CONF0 0x1900
#endif /* __ASM_MSR_H */
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment