read_poll_timeout_atomic() uses ktime_get() to implement the timeout feature, just like its non-atomic counterpart. However, there are several issues with this, due to its use in atomic contexts: 1. When called in the s2ram path (as typically done by clock or PM domain drivers), ti...
Use readl_poll_timeout_atomic() instead of open-coding the same operation. As typically no retries are needed, 10 µs is a suitable timeout value. Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Link: https://lore.kernel.org/r/bce7d0bdd80c800aa150f1868b610b7d94f4cc66.1...
if (__timeout_us && \ ktime_compare(ktime_get(), __timeout) > 0) { \ (val) = op(addr); \ break; \ } \ if (__delay_us) \ udelay(__delay_us); \ } \ (cond) ? 0 : -ETIMEDOUT; \ }) read_poll_timeout_atomic(op, val, cond, delay_us, timeout_us, false, addr...
read_poll_timeout_atomic() uses ktime_get() to implement the timeout feature, just like its non-atomic counterpart. However, there are several issues with this, due to its use in atomic contexts: 1. When called in the s2ram path (as typically done by clock or PM domain drivers), ti...
Arguments description of read_poll_timeout_atomic() is out of date, update it. Cc: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com> Link: https://lore.kernel.org/r/1600668815-12135-11-git-send-email-chunfeng.yun@mediatek.com Signed-off-by:...