Messages in this thread | | | Date | Thu, 31 Aug 2023 16:53:14 +0300 | From | Andy Shevchenko <> | Subject | Re: [PATCH 1/3] platform/x86: intel_scu_ipc: Check status after timeouts in busy_loop() |
| |
On Wed, Aug 30, 2023 at 06:14:01PM -0700, Stephen Boyd wrote: > It's possible for the polling loop in busy_loop() to get scheduled away > for a long time. > > status = ipc_read_status(scu); > <long time scheduled away> > if (!(status & IPC_STATUS_BUSY)) > > If this happens, then the status bit could change and this function > would never test it again after checking the jiffies against the timeout > limit. Polling code should check the condition one more time after the > timeout in case this happens. > > The read_poll_timeout() helper implements this logic, and is shorter, so > simply use that helper here.
I don't remember by heart, but on some older Intel hardware this might have been called during early stages where ktime() is not functional yet.
Is this still a case here?
...
Codewise change looks good to me.
-- With Best Regards, Andy Shevchenko
| |