[PATCHv5 07/16] arm: arch_timer: add isbs to register accessors
Catalin Marinas
catalin.marinas at arm.com
Thu Jan 31 10:35:45 EST 2013
On Thu, Jan 31, 2013 at 12:15:30PM +0000, Mark Rutland wrote:
> Without the isbs in arch_timer_get_cnt{p,v}ct the cpu may speculate
> reads and return stale values. This could be bad for code sensitive to
> changes in expected deltas between calls (e.g. the delay loop).
>
> Without isbs in arch_timer_reg_write the processor may reorder
> instructions around enabling/disabling of the timer or writing the
> compare value, which we probably don't want.
>
> This patch adds isbs to prevent those issues.
>
> Signed-off-by: Mark Rutland <mark.rutland at arm.com>
Acked-by: Catalin Marinas <catalin.marinas at arm.com>
More information about the linux-arm-kernel
mailing list