diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-01-06 21:57:44 (GMT) |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-01-06 21:57:44 (GMT) |
commit | 376613e81ddc68f545fd5c87ffc3ad222b7abe5f (patch) | |
tree | e1cb1cd43d05f57e4584dd5f9ce3eb965d0ddff1 /arch/x86 | |
parent | 0db49b72bce26341274b74fd968501489a361ae3 (diff) | |
parent | 0518469d0a32be1e6dd8850ff274d52d72cdb52d (diff) | |
download | linux-376613e81ddc68f545fd5c87ffc3ad222b7abe5f.tar.xz |
Merge branch 'timers-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
* 'timers-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
x86, tsc: Skip TSC synchronization checks for tsc=reliable
clocksource: Convert tcb_clksrc to use clocksource_register_hz/khz
clocksource: cris: Convert to clocksource_register_khz
clocksource: xtensa: Convert to clocksource_register_hz/khz
clocksource: um: Convert to clocksource_register_hz/khz
clocksource: parisc: Convert to clocksource_register_hz/khz
clocksource: m86k: Convert to clocksource_register_hz/khz
time: x86: Replace LATCH with PIT_LATCH in i8253 clocksource driver
time: x86: Remove CLOCK_TICK_RATE from acpi_pm clocksource driver
time: x86: Remove CLOCK_TICK_RATE from mach_timer.h
time: x86: Remove CLOCK_TICK_RATE from tsc code
time: Fix spelling mistakes in new comments
time: fix bogus comment in timekeeping_get_ns_raw
Diffstat (limited to 'arch/x86')
-rw-r--r-- | arch/x86/include/asm/mach_timer.h | 2 | ||||
-rw-r--r-- | arch/x86/include/asm/tsc.h | 2 | ||||
-rw-r--r-- | arch/x86/kernel/tsc.c | 6 | ||||
-rw-r--r-- | arch/x86/kernel/tsc_sync.c | 4 |
4 files changed, 8 insertions, 6 deletions
diff --git a/arch/x86/include/asm/mach_timer.h b/arch/x86/include/asm/mach_timer.h index 8537285..88d0c3c 100644 --- a/arch/x86/include/asm/mach_timer.h +++ b/arch/x86/include/asm/mach_timer.h @@ -15,7 +15,7 @@ #define CALIBRATE_TIME_MSEC 30 /* 30 msecs */ #define CALIBRATE_LATCH \ - ((CLOCK_TICK_RATE * CALIBRATE_TIME_MSEC + 1000/2)/1000) + ((PIT_TICK_RATE * CALIBRATE_TIME_MSEC + 1000/2)/1000) static inline void mach_prepare_counter(void) { diff --git a/arch/x86/include/asm/tsc.h b/arch/x86/include/asm/tsc.h index 83e2efd..15d9915 100644 --- a/arch/x86/include/asm/tsc.h +++ b/arch/x86/include/asm/tsc.h @@ -51,6 +51,8 @@ extern int unsynchronized_tsc(void); extern int check_tsc_unstable(void); extern unsigned long native_calibrate_tsc(void); +extern int tsc_clocksource_reliable; + /* * Boot-time check whether the TSCs are synchronized across * all CPUs/cores: diff --git a/arch/x86/kernel/tsc.c b/arch/x86/kernel/tsc.c index db48336..2c9cf0f 100644 --- a/arch/x86/kernel/tsc.c +++ b/arch/x86/kernel/tsc.c @@ -35,7 +35,7 @@ static int __read_mostly tsc_unstable; erroneous rdtsc usage on !cpu_has_tsc processors */ static int __read_mostly tsc_disabled = -1; -static int tsc_clocksource_reliable; +int tsc_clocksource_reliable; /* * Scheduler clock - returns current time in nanosec units. */ @@ -178,11 +178,11 @@ static unsigned long calc_pmtimer_ref(u64 deltatsc, u64 pm1, u64 pm2) } #define CAL_MS 10 -#define CAL_LATCH (CLOCK_TICK_RATE / (1000 / CAL_MS)) +#define CAL_LATCH (PIT_TICK_RATE / (1000 / CAL_MS)) #define CAL_PIT_LOOPS 1000 #define CAL2_MS 50 -#define CAL2_LATCH (CLOCK_TICK_RATE / (1000 / CAL2_MS)) +#define CAL2_LATCH (PIT_TICK_RATE / (1000 / CAL2_MS)) #define CAL2_PIT_LOOPS 5000 diff --git a/arch/x86/kernel/tsc_sync.c b/arch/x86/kernel/tsc_sync.c index 0aa5fed8..9eba29b 100644 --- a/arch/x86/kernel/tsc_sync.c +++ b/arch/x86/kernel/tsc_sync.c @@ -113,7 +113,7 @@ void __cpuinit check_tsc_sync_source(int cpu) if (unsynchronized_tsc()) return; - if (boot_cpu_has(X86_FEATURE_TSC_RELIABLE)) { + if (tsc_clocksource_reliable) { if (cpu == (nr_cpu_ids-1) || system_state != SYSTEM_BOOTING) pr_info( "Skipped synchronization checks as TSC is reliable.\n"); @@ -172,7 +172,7 @@ void __cpuinit check_tsc_sync_target(void) { int cpus = 2; - if (unsynchronized_tsc() || boot_cpu_has(X86_FEATURE_TSC_RELIABLE)) + if (unsynchronized_tsc() || tsc_clocksource_reliable) return; /* |