Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 48575
b: refs/heads/master
c: 07190a0
h: refs/heads/master
i:
  48573: ac76c1b
  48571: 9c40549
  48567: 1766a4b
  48559: 024e398
  48543: a64730d
  48511: dfc84b3
v: v3
  • Loading branch information
Marcelo Tosatti authored and Linus Torvalds committed Feb 16, 2007
1 parent 78f6f56 commit 949a613
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 5d8b34fdcb384161552d01ee8f34af5ff11f9684
refs/heads/master: 07190a08eef3666a8687070226c8d403c1d548b7
20 changes: 20 additions & 0 deletions trunk/arch/i386/kernel/tsc.c
Original file line number Diff line number Diff line change
Expand Up @@ -364,6 +364,25 @@ __cpuinit int unsynchronized_tsc(void)
return tsc_unstable;
}

/*
* Geode_LX - the OLPC CPU has a possibly a very reliable TSC
*/
#ifdef CONFIG_MGEODE_LX
/* RTSC counts during suspend */
#define RTSC_SUSP 0x100

static void __init check_geode_tsc_reliable(void)
{
unsigned long val;

rdmsrl(MSR_GEODE_BUSCONT_CONF0, val);
if ((val & RTSC_SUSP))
clocksource_tsc.flags &= ~CLOCK_SOURCE_MUST_VERIFY;
}
#else
static inline void check_geode_tsc_reliable(void) { }
#endif

static int __init init_tsc_clocksource(void)
{

Expand All @@ -372,6 +391,7 @@ static int __init init_tsc_clocksource(void)
dmi_check_system(bad_tsc_dmi_table);

unsynchronized_tsc();
check_geode_tsc_reliable();
current_tsc_khz = tsc_khz;
clocksource_tsc.mult = clocksource_khz2mult(current_tsc_khz,
clocksource_tsc.shift);
Expand Down
3 changes: 3 additions & 0 deletions trunk/include/asm-i386/msr.h
Original file line number Diff line number Diff line change
Expand Up @@ -307,4 +307,7 @@ static inline void wrmsrl (unsigned long msr, unsigned long long val)
#define MSR_CORE_PERF_GLOBAL_CTRL 0x38f
#define MSR_CORE_PERF_GLOBAL_OVF_CTRL 0x390

/* Geode defined MSRs */
#define MSR_GEODE_BUSCONT_CONF0 0x1900

#endif /* __ASM_MSR_H */

0 comments on commit 949a613

Please sign in to comment.