Commit 10206eba authored by Jeff Ohlstein's avatar Jeff Ohlstein
Browse files

msm: timer: use appropriate workaround for timer instability



We currently use a simple workaround for the timer instability, which
involves reading the timer twice, and returning the higher value if two
consecutive reads are within one tick of each other. However, this
sometimes fails to converge with the DGT. So, instead do three reads,
and return either if two of them are within one of each other, or t3 if
t3-t2 is equal to t2-t1. This should cover more of the valid cases,
while not allowing false positives to come through.

A compiler barrier is necessary to guarantee we get three ldr
instructions in a row.

Change-Id: I0d56e74bba339c42239a88dd495e4d0ed93416aa
Signed-off-by: default avatarJeff Ohlstein <johlstei@codeaurora.org>
parent ec6fd7af
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment