Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
core: timeout_elapsed(): fix expiration threshold
Fix timeout threshold that should return once the time expires, not 1 tick after it has expired. This change makes udelay(0) to immediately return and not wait a generic timer counter increment. This change fixes an issue where a driver stops the counter feeding Arm generic timer counter and indirectly calls IO_READ32_POLL_TIMEOUT() with a delay of 0us. It that case, since counter never increments, the udelay(0) call in IO_READ32_POLL_TIMEOUT() never returns while we expect the macro to endlessly poll (as timeout would never be detected) until poll condition is met or system watchdog is triggered. Signed-off-by: Etienne Carriere <[email protected]> Acked-by: Jens Wiklander <[email protected]> Reviewed-by: Jerome Forissier <[email protected]>
- Loading branch information