From: Keir Fraser Date: Sat, 13 Dec 2008 15:02:55 +0000 (+0000) Subject: x86: Fix early time initialisation after recent changes. X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~14026^2~28 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=cd914ce24934d5870ffa14d8c8d2b8a155b42a3e;p=xen.git x86: Fix early time initialisation after recent changes. Signed-off-by: Keir Fraser --- diff --git a/xen/arch/x86/time.c b/xen/arch/x86/time.c index f373636bad..b360c8874b 100644 --- a/xen/arch/x86/time.c +++ b/xen/arch/x86/time.c @@ -1131,6 +1131,9 @@ int __init init_xen_time(void) open_softirq(TIME_CALIBRATE_SOFTIRQ, local_time_calibration); + /* System time (get_s_time()) starts ticking from now. */ + rdtscll(this_cpu(cpu_time).local_tsc_stamp); + /* NB. get_cmos_time() can take over one second to execute. */ do_settime(get_cmos_time(), 0, NOW()); @@ -1146,12 +1149,9 @@ int __init init_xen_time(void) /* Early init function. */ void __init early_time_init(void) { - struct cpu_time *t = &this_cpu(cpu_time); u64 tmp = init_pit_and_calibrate_tsc(); - /* So we can use get_s_time() during early boot. */ - set_time_scale(&t->tsc_scale, tmp); - rdtscll(t->local_tsc_stamp); + set_time_scale(&this_cpu(cpu_time).tsc_scale, tmp); do_div(tmp, 1000); cpu_khz = (unsigned long)tmp;