lkml.org 
[lkml]   [2023]   [Jan]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH V7 2/2] firmware: qcom: scm: Add wait-queue handling logic
On Jan 10 2023 11:54, Bjorn Andersson wrote:
> On Tue, Jan 10, 2023 at 12:14:11AM -0800, Guru Das Srinagesh wrote:
> > On Jan 10 2023 12:07, Sibi Sankar wrote:
> >
> > ...
> >
> > > +static int __scm_smc_do_quirk_handle_waitq(struct device *dev, struct arm_smccc_args *waitq,
> > > + struct arm_smccc_res *res)
> > > +{
> > > + int ret;
> > > + struct arm_smccc_args resume;
> > > + u32 wq_ctx, smc_call_ctx, flags;
> > > + struct arm_smccc_args *smc = waitq;
> > > +
> > > + do {
> > > + __scm_smc_do_quirk(smc, res);
> > > +
> > > + if (res->a0 == QCOM_SCM_WAITQ_SLEEP) {
> > > + wq_ctx = res->a1;
> > > + smc_call_ctx = res->a2;
> > > + flags = res->a3;
> > > +
> > > + if (!dev)
> > > + return -EPROBE_DEFER;
> > > +
> > > + ret = qcom_scm_lookup_completion(wq_ctx);
> >
> > I see that this function has been created in response to Bjorn's comment [1]
> > about avoiding the dev_get_drvdata() call, but I would prefer to not use this
> > function as it hides the fact that the wait_for_completion() is occurring here.
> >
>
> My reasoning here is that I don't want the waiting for the completion
> that happen in one part of the driver and the completion happening in a
> completely different one.

ACK.

Thank you.

Guru Das.

\
 
 \ /
  Last update: 2023-03-26 23:35    [W:0.035 / U:0.252 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site