]> xenbits.xensource.com Git - people/royger/xen.git/commitdiff
x86/time: avoid redundant this_cpu()
authorAndrew Cooper <andrew.cooper3@citrix.com>
Tue, 4 Mar 2014 09:55:56 +0000 (10:55 +0100)
committerJan Beulich <jbeulich@suse.com>
Tue, 4 Mar 2014 09:55:56 +0000 (10:55 +0100)
this_cpu() makes use of RELOC_HIDE() to prevent unsafe optimisations, forcing
a recalculation of the per-cpu data area.  Don't use it needlessly.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
xen/arch/x86/time.c

index b2c8dc7359109560167bc0fe35f731830afe2362..000191b945432f8b33a844c86b628ac3007d2d57 100644 (file)
@@ -1323,7 +1323,7 @@ void init_percpu_time(void)
     s_time_t now;
 
     /* Initial estimate for TSC rate. */
-    this_cpu(cpu_time).tsc_scale = per_cpu(cpu_time, 0).tsc_scale;
+    t->tsc_scale = per_cpu(cpu_time, 0).tsc_scale;
 
     local_irq_save(flags);
     rdtscll(t->local_tsc_stamp);