]> xenbits.xensource.com Git - xen.git/commit
x86/time: Adjust init-time handling of pit0_ticks
authorAndrew Cooper <andrew.cooper3@citrix.com>
Wed, 7 Dec 2016 13:52:02 +0000 (13:52 +0000)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Wed, 8 Feb 2017 17:45:50 +0000 (17:45 +0000)
commit11c397c207dda26084be8a5da5bd78c74b4b3651
tree88fa53578f1d1f551d76ba090cd8cc3437528b86
parent58b4db0832de1ee355a342feea7e1545219bef12
x86/time: Adjust init-time handling of pit0_ticks

There is no need for the volatile cast in the timer interrupt; the compiler
may not elide the update.  This reduces the generated assembly from a read,
local modify, write to a single add instruction.

Drop the memory barriers from timer_irq_works(), as they are not needed.
pit0_ticks is only modified by timer_interrupt() running on the same CPU, so
all that is required is a volatile reference to prevent the compiler from
eliding the second read.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
xen/arch/x86/io_apic.c
xen/arch/x86/time.c
xen/include/xen/lib.h