diff options
author | Christoph Lameter <cl@linux.com> | 2010-12-06 18:16:29 +0100 |
---|---|---|
committer | Tejun Heo <tj@kernel.org> | 2010-12-17 15:07:19 +0100 |
commit | 780f36d8b3fa9572f731d4fb85067b2e45e6f993 (patch) | |
tree | 26c2f80122cd863232de2e295e8435f06c9e2527 /arch/x86/xen/time.c | |
parent | fs: Use this_cpu_xx operations in buffer.c (diff) | |
download | linux-780f36d8b3fa9572f731d4fb85067b2e45e6f993.tar.xz linux-780f36d8b3fa9572f731d4fb85067b2e45e6f993.zip |
xen: Use this_cpu_ops
Use this_cpu_ops to reduce code size and simplify things in various places.
V3->V4:
Move instance of this_cpu_inc_return to a later patchset so that
this patch can be applied without infrastructure changes.
Cc: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Acked-by: H. Peter Anvin <hpa@zytor.com>
Signed-off-by: Christoph Lameter <cl@linux.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'arch/x86/xen/time.c')
-rw-r--r-- | arch/x86/xen/time.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/arch/x86/xen/time.c b/arch/x86/xen/time.c index b2bb5aa3b054..ef8930f51b09 100644 --- a/arch/x86/xen/time.c +++ b/arch/x86/xen/time.c @@ -135,24 +135,24 @@ static void do_stolen_accounting(void) /* Add the appropriate number of ticks of stolen time, including any left-overs from last time. */ - stolen = runnable + offline + __get_cpu_var(xen_residual_stolen); + stolen = runnable + offline + __this_cpu_read(xen_residual_stolen); if (stolen < 0) stolen = 0; ticks = iter_div_u64_rem(stolen, NS_PER_TICK, &stolen); - __get_cpu_var(xen_residual_stolen) = stolen; + __this_cpu_write(xen_residual_stolen, stolen); account_steal_ticks(ticks); /* Add the appropriate number of ticks of blocked time, including any left-overs from last time. */ - blocked += __get_cpu_var(xen_residual_blocked); + blocked += __this_cpu_read(xen_residual_blocked); if (blocked < 0) blocked = 0; ticks = iter_div_u64_rem(blocked, NS_PER_TICK, &blocked); - __get_cpu_var(xen_residual_blocked) = blocked; + __this_cpu_write(xen_residual_blocked, blocked); account_idle_ticks(ticks); } |