[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-unstable] Revert 18102:85a83b919653 (clocksource=tsc)



# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1217865861 -3600
# Node ID 25d347497f900eff41112b62cb0a0d5ee30287a8
# Parent  2f29a049b812c053f179658acf6cecfef2c8851a
Revert 18102:85a83b919653 (clocksource=tsc)
---
 xen/arch/x86/time.c |   62 ----------------------------------------------------
 1 files changed, 62 deletions(-)

diff -r 2f29a049b812 -r 25d347497f90 xen/arch/x86/time.c
--- a/xen/arch/x86/time.c       Mon Aug 04 16:57:42 2008 +0100
+++ b/xen/arch/x86/time.c       Mon Aug 04 17:04:21 2008 +0100
@@ -481,35 +481,6 @@ static int init_pmtimer(struct platform_
 }
 
 /************************************************************
- * 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(vo
 
 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",
@@ -614,12 +577,6 @@ static void init_platform_timer(void)
          !init_hpet(pts) &&
          !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);
 
@@ -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 
     /* 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);

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.