From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Cooper Subject: [PATCH v2 1/5] x86/time: Avoid redundant this_cpu() Date: Fri, 28 Feb 2014 18:57:00 +0000 Message-ID: <1393613824-13230-2-git-send-email-andrew.cooper3@citrix.com> References: <1393613824-13230-1-git-send-email-andrew.cooper3@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1393613824-13230-1-git-send-email-andrew.cooper3@citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Xen-devel Cc: Andrew Cooper , Keir Fraser , Jan Beulich , Tim Deegan List-Id: xen-devel@lists.xenproject.org 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 CC: Keir Fraser CC: Jan Beulich CC: Tim Deegan --- 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 82492c1..883c135 100644 --- a/xen/arch/x86/time.c +++ b/xen/arch/x86/time.c @@ -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); -- 1.7.10.4