Searched hist:a75748346692554f662003ffc4306c3e667783a9 (Results 1 – 1 of 1) sorted by relevance
| /optee_os/core/include/kernel/ |
| H A D | delay.h | a75748346692554f662003ffc4306c3e667783a9 Wed Sep 18 07:52:02 UTC 2024 Etienne Carriere <etienne.carriere@foss.st.com> 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 <etienne.carriere@foss.st.com> Acked-by: Jens Wiklander <jens.wiklander@linaro.org> Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org>
|