aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKeir Fraser <keir.fraser@citrix.com>2008-07-21 10:00:18 +0100
committerKeir Fraser <keir.fraser@citrix.com>2008-07-21 10:00:18 +0100
commit7f6d517c52302528257cf78be40b1079f592fcde (patch)
tree242cb3a0c93bfeb6dce3ac4dabf164e1435650e9
parent6bee9dd132b7c1a333f79e08cb2876aaad2f32de (diff)
downloadxen-7f6d517c52302528257cf78be40b1079f592fcde.tar.gz
xen-7f6d517c52302528257cf78be40b1079f592fcde.tar.bz2
xen-7f6d517c52302528257cf78be40b1079f592fcde.zip
Revert accidental commit from 18096:fa66b33f975a8f
-rw-r--r--xen/arch/x86/time.c54
1 files changed, 2 insertions, 52 deletions
diff --git a/xen/arch/x86/time.c b/xen/arch/x86/time.c
index 24bd8f8acb..3ae67e4ad4 100644
--- a/xen/arch/x86/time.c
+++ b/xen/arch/x86/time.c
@@ -481,46 +481,6 @@ static int init_pmtimer(struct platform_timesource *pts)
}
/************************************************************
- * 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,9 +978,6 @@ 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 = !plt_src.read_counter ? 0 : read_platform_stime();
@@ -1047,11 +998,11 @@ 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*/
if ( cpuid_edx(0x80000007) & (1U<<8) )
@@ -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);