Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 6de67a72 authored by Matt Wagantall's avatar Matt Wagantall Committed by Stephen Boyd
Browse files

iopoll: Make readl_poll_timeout() and friends preemption-safe



With the previous implementation, pre-emption was possible
between reading the register value and evaluating the break
condition for the timeout. If jiffies advanced sufficiently to
expire the timeout before the polling thread was rescheduled,
the macro would return -ETIMEDOUT incorrectly.

Fix this by re-reading the register value again after evaluating
the timeout condition as true.

Change-Id: I58a42798235db3606373a2f689f7d6c95475702e
Signed-off-by: default avatarMatt Wagantall <mattw@codeaurora.org>
parent da2be566
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment