diff options
author | Keir Fraser <keir.fraser@citrix.com> | 2008-08-04 17:04:21 +0100 |
---|---|---|
committer | Keir Fraser <keir.fraser@citrix.com> | 2008-08-04 17:04:21 +0100 |
commit | 1a380e6f2f5b43a4ed3087a9b261915894dd8b3a (patch) | |
tree | 4791cb20fd3a5d74723bfdef29cab87d0e308c33 | |
parent | 192191da8a36d8a618f2a218c003e31e4e874b9a (diff) | |
download | xen-1a380e6f2f5b43a4ed3087a9b261915894dd8b3a.tar.gz xen-1a380e6f2f5b43a4ed3087a9b261915894dd8b3a.tar.bz2 xen-1a380e6f2f5b43a4ed3087a9b261915894dd8b3a.zip |
Revert 18102:85a83b919653 (clocksource=tsc)
-rw-r--r-- | xen/arch/x86/time.c | 62 |
1 files changed, 0 insertions, 62 deletions
diff --git a/xen/arch/x86/time.c b/xen/arch/x86/time.c index 747e12be75..b9f6f6e9e3 100644 --- a/xen/arch/x86/time.c +++ b/xen/arch/x86/time.c @@ -481,35 +481,6 @@ static int init_pmtimer(struct platform_timesource *pts) } /************************************************************ - * PLATFORM TIMER 5: TSC - */ - -static const char plt_tsc_name[] = "TSC"; -#define platform_timer_is_tsc() (plt_src.name == plt_tsc_name) - -static int init_tsctimer(struct platform_timesource *pts) -{ - if ( !tsc_invariant ) - return 0; - - pts->name = (char *)plt_tsc_name; - return 1; -} - -static void make_tsctimer_record(void) -{ - struct cpu_time *t = &this_cpu(cpu_time); - s_time_t now; - u64 tsc; - - rdtscll(tsc); - now = scale_delta(tsc, &t->tsc_scale); - - t->local_tsc_stamp = tsc; - t->stime_local_stamp = t->stime_master_stamp = now; -} - -/************************************************************ * GENERIC PLATFORM TIMER INFRASTRUCTURE */ @@ -574,12 +545,6 @@ static void platform_time_calibration(void) static void resume_platform_timer(void) { - if ( platform_timer_is_tsc() ) - { - /* TODO: Save/restore TSC values. */ - return; - } - /* No change in platform_stime across suspend/resume. */ platform_timer_stamp = plt_stamp64; plt_stamp = plt_src.read_counter(); @@ -600,8 +565,6 @@ static void init_platform_timer(void) rc = init_cyclone(pts); else if ( !strcmp(opt_clocksource, "acpi") ) rc = init_pmtimer(pts); - else if ( !strcmp(opt_clocksource, "tsc") ) - rc = init_tsctimer(pts); if ( rc <= 0 ) printk("WARNING: %s clocksource '%s'.\n", @@ -615,12 +578,6 @@ static void init_platform_timer(void) !init_pmtimer(pts) ) init_pit(pts); - if ( platform_timer_is_tsc() ) - { - printk("Platform timer is TSC\n"); - return; - } - plt_mask = (u64)~0ull >> (64 - pts->counter_bits); set_time_scale(&plt_scale, pts->frequency); @@ -823,10 +780,6 @@ int cpu_frequency_change(u64 freq) struct cpu_time *t = &this_cpu(cpu_time); u64 curr_tsc; - /* Nothing to do if TSC is platform timer. Assume it is constant-rate. */ - if ( platform_timer_is_tsc() ) - return 0; - /* Sanity check: CPU frequency allegedly dropping below 1MHz? */ if ( freq < 1000000u ) { @@ -908,14 +861,6 @@ static void local_time_calibration(void *unused) /* The overall calibration scale multiplier. */ u32 calibration_mul_frac; - if ( platform_timer_is_tsc() ) - { - make_tsctimer_record(); - update_vcpu_system_time(current); - set_timer(&t->calibration_timer, NOW() + MILLISECS(10*1000)); - return; - } - prev_tsc = t->local_tsc_stamp; prev_local_stime = t->stime_local_stamp; prev_master_stime = t->stime_master_stamp; @@ -1033,12 +978,6 @@ void init_percpu_time(void) unsigned long flags; s_time_t now; - if ( platform_timer_is_tsc() ) - { - make_tsctimer_record(); - goto out; - } - local_irq_save(flags); rdtscll(t->local_tsc_stamp); now = !plt_src.read_counter ? 0 : read_platform_stime(); @@ -1047,7 +986,6 @@ void init_percpu_time(void) t->stime_master_stamp = now; t->stime_local_stamp = now; - out: init_timer(&t->calibration_timer, local_time_calibration, NULL, smp_processor_id()); set_timer(&t->calibration_timer, NOW() + EPOCH); |