From f53d6f8b4d43f0313b06d780dae4124560a9fa63 Mon Sep 17 00:00:00 2001 From: Keir Fraser Date: Mon, 1 Oct 2007 09:32:25 +0100 Subject: [PATCH] x86: Fix time going backwards on CPU frequency change. Signed-off-by: Keir Fraser --- xen/arch/x86/time.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xen/arch/x86/time.c b/xen/arch/x86/time.c index 7b23426c6e..d0f45fb018 100644 --- a/xen/arch/x86/time.c +++ b/xen/arch/x86/time.c @@ -728,11 +728,11 @@ int cpu_frequency_change(u64 freq) u64 curr_tsc; local_irq_disable(); - set_time_scale(&t->tsc_scale, freq); rdtscll(curr_tsc); t->local_tsc_stamp = curr_tsc; t->stime_local_stamp = get_s_time(); t->stime_master_stamp = read_platform_stime(); + set_time_scale(&t->tsc_scale, freq); local_irq_enable(); /* A full epoch should pass before we check for deviation. */ -- 2.39.5