Skip to content

Commit

Permalink
x86/xen: Fix incorrect per_cpu accessor in xen_clocksource_read()
Browse files Browse the repository at this point in the history
Commit 89cbc76 ("x86: Replace __get_cpu_var uses") replaced
__get_cpu_var() with this_cpu_ptr() in xen_clocksource_read() in such a
way that instead of accessing a structure pointed to by a per-cpu pointer
we are trying to get to a per-cpu structure.

__this_cpu_read() of the pointer is the more appropriate accessor.

Signed-off-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Signed-off-by: David Vrabel <david.vrabel@citrix.com>
  • Loading branch information
Boris Ostrovsky authored and David Vrabel committed Oct 23, 2014
1 parent 3a0e94f commit 3251f20
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/x86/xen/time.c
Original file line number Diff line number Diff line change
@@ -158,7 +158,7 @@ cycle_t xen_clocksource_read(void)
cycle_t ret;

preempt_disable_notrace();
src = this_cpu_ptr(&xen_vcpu->time);
src = &__this_cpu_read(xen_vcpu)->time;
ret = pvclock_clocksource_read(src);
preempt_enable_notrace();
return ret;

0 comments on commit 3251f20

Please sign in to comment.