[PATCH v2 2/2] iopoll: Do not use timekeeping in read_poll_timeout_atomic()
Tony Lindgren
tony at atomide.com
Wed May 10 23:48:05 PDT 2023
Hi,
* Geert Uytterhoeven <geert+renesas at glider.be> [230510 13:23]:
> 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), timekeeping may be suspended, triggering the
> WARN_ON(timekeeping_suspended) in ktime_get():
Maybe add a comment to read_poll_timeout_atomic() saying it can be
used also with timekeeping_suspended?
Otherwise a few years later it might get broken when somebody goes
to patch it without testing it with timekeeping_suspended :)
Other than that looks good to me:
Reviewed-by: Tony Lindgren <tony at atomide.com>
More information about the linux-arm-kernel
mailing list