WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-unstable] x86: Remove clocksource=tsc for now.

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] x86: Remove clocksource=tsc for now.
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Fri, 18 Jul 2008 11:30:07 -0700
Delivery-date: Fri, 18 Jul 2008 11:29:53 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1216380409 -3600
# Node ID 7f766b4a170b3eda8bd8803d058a26c5746a561d
# Parent  b896b39470f0e1c957c82db30d915875b00c3776
x86: Remove clocksource=tsc for now.
Signed-off-by: Keir Fraser <keir.fraser@xxxxxxxxxx>
---
 xen/arch/x86/domain.c |    4 ---
 xen/arch/x86/time.c   |   56 ++------------------------------------------------
 2 files changed, 3 insertions(+), 57 deletions(-)

diff -r b896b39470f0 -r 7f766b4a170b xen/arch/x86/domain.c
--- a/xen/arch/x86/domain.c     Fri Jul 18 11:24:13 2008 +0100
+++ b/xen/arch/x86/domain.c     Fri Jul 18 12:26:49 2008 +0100
@@ -286,10 +286,6 @@ int vcpu_initialise(struct vcpu *v)
 
     v->arch.flags = TF_kernel_mode;
 
-    /* Ensure that update_vcpu_system_time() fires at least once. */
-    if ( !is_idle_domain(d) )
-        vcpu_info(v, time).tsc_timestamp = ~0ull;
-
 #if defined(__i386__)
     mapcache_vcpu_init(v);
 #endif
diff -r b896b39470f0 -r 7f766b4a170b xen/arch/x86/time.c
--- a/xen/arch/x86/time.c       Fri Jul 18 11:24:13 2008 +0100
+++ b/xen/arch/x86/time.c       Fri Jul 18 12:26:49 2008 +0100
@@ -481,46 +481,6 @@ static int init_pmtimer(struct platform_
 }
 
 /************************************************************
- * PLATFORM TIMER 5: TSC
- */
-
-#define platform_timer_is_tsc() (!strcmp(plt_src.name, "TSC"))
-static u64 tsc_freq;
-
-static u64 read_tsc_count(void)
-{
-    u64 tsc;
-    rdtscll(tsc);
-    return tsc;
-}
-
-static int init_tsctimer(struct platform_timesource *pts)
-{
-    unsigned int cpu;
-
-    /*
-     * TODO: evaluate stability of TSC here, return 0 if not stable.
-     * For now we assume all TSCs are synchronised and hence can all share
-     * CPU 0's calibration values.
-     */
-    for_each_cpu ( cpu )
-    {
-        if ( cpu == 0 )
-            continue;
-        memcpy(&per_cpu(cpu_time, cpu),
-               &per_cpu(cpu_time, 0),
-               sizeof(struct cpu_time));
-    }
-
-    pts->name = "TSC";
-    pts->frequency = tsc_freq;
-    pts->read_counter = read_tsc_count;
-    pts->counter_bits = 64;
-
-    return 1;
-}
-
-/************************************************************
  * GENERIC PLATFORM TIMER INFRASTRUCTURE
  */
 
@@ -605,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",
@@ -822,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 )
     {
@@ -1024,12 +978,9 @@ void init_percpu_time(void)
     unsigned long flags;
     s_time_t now;
 
-    if ( platform_timer_is_tsc() )
-        return;
-
     local_irq_save(flags);
     rdtscll(t->local_tsc_stamp);
-    now = read_platform_stime();
+    now = !plt_src.read_counter ? 0 : read_platform_stime();
     local_irq_restore(flags);
 
     t->stime_master_stamp = now;
@@ -1047,10 +998,10 @@ int __init init_xen_time(void)
 
     local_irq_disable();
 
+    init_percpu_time();
+
     stime_platform_stamp = 0;
     init_platform_timer();
-
-    init_percpu_time();
 
     /* check if TSC is invariant during deep C state
        this is a new feature introduced by Nehalem*/
@@ -1068,7 +1019,6 @@ void __init early_time_init(void)
 {
     u64 tmp = init_pit_and_calibrate_tsc();
 
-    tsc_freq = tmp;
     set_time_scale(&this_cpu(cpu_time).tsc_scale, tmp);
 
     do_div(tmp, 1000);

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] x86: Remove clocksource=tsc for now., Xen patchbot-unstable <=