Messages in this thread | | | From | Doug Anderson <> | Date | Fri, 24 Jul 2020 13:31:39 -0700 | Subject | Re: [PATCH] soc: qcom: rpmh-rsc: Sleep waiting for tcs slots to be free |
| |
Hi,
On Fri, Jul 24, 2020 at 1:27 PM Stephen Boyd <swboyd@chromium.org> wrote: > > Quoting Doug Anderson (2020-07-24 13:11:59) > > > > I wasn't suggesting adding a timeout. I was just saying that if > > claim_tcs_for_req() were to ever return an error code other than > > -EBUSY that we'd need a check for it because otherwise we'd interpret > > the result as a tcs_id. > > > > Ok that sounds like you don't want a check for -EBUSY so I'll leave this > as >= 0.
To clarify, I'd be OK with either of these (slight preference towards #2, but not a strong one):
1. Your current code and a REALLY OBVIOUS comment in claim_tcs_for_req() saying that we'd better not return any error codes other than -EBUSY (because we'll just blindly retry on all of them).
- or -
2. Handling error codes other than -EBUSY, like this:
wait_event_lock_irq(drv->tcs_wait, (tcs_id = claim_tcs_for_req(drv, tcs, msg)) != -EBUSY, drv->lock); if (tcs_id < 0) goto unlock;
-Doug
| |