lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4811be6f-7e86-2a62-94cf-98504d5e64e7@linaro.org>
Date:   Fri, 25 Feb 2022 18:03:25 +0000
From:   Srinivas Kandagatla <srinivas.kandagatla@...aro.org>
To:     Pierre-Louis Bossart <pierre-louis.bossart@...ux.intel.com>,
        Srinivasa Rao Mandadapu <quic_srivasam@...cinc.com>,
        agross@...nel.org, bjorn.andersson@...aro.org, lgirdwood@...il.com,
        broonie@...nel.org, robh+dt@...nel.org, quic_plai@...cinc.com,
        bgoswami@...eaurora.org, perex@...ex.cz, tiwai@...e.com,
        rohitkr@...eaurora.org, linux-arm-msm@...r.kernel.org,
        alsa-devel@...a-project.org, devicetree@...r.kernel.org,
        linux-kernel@...r.kernel.org, swboyd@...omium.org,
        judyhsiao@...omium.org, yung-chuan.liao@...ux.intel.com,
        sanyog.r.kale@...el.com
Cc:     Venkata Prasad Potturu <quic_potturu@...cinc.com>
Subject: Re: [PATCH v2] soundwire: qcom: remove redundant wait for completion



On 25/02/2022 15:43, Pierre-Louis Bossart wrote:
> 
> 
> On 2/25/22 08:45, Srinivas Kandagatla wrote:
>>
>>
>> On 25/02/2022 14:44, Srinivasa Rao Mandadapu wrote:
>>> Remove wait_for_completion_timeout from soundwire probe as it seems
>>> unnecessary and device enumeration is anyway not happening here,
>>> hence this api is blocking till it completes max wait time.
>>> Also, as device enumeration event is dependent on wcd938x probe to be
>>> completed, its of no use waiting here.
>>> Waiting here increasing the boot time almost 4 seconds and impacting
>>> other modules like touch screen.
>>>
>>> Fixes: 06dd96738d618 ("soundwire: qcom: wait for enumeration to be
>>> complete in probe")
>>>
>>> Signed-off-by: Srinivasa Rao Mandadapu <quic_srivasam@...cinc.com>
>>> Co-developed-by: Venkata Prasad Potturu <quic_potturu@...cinc.com>
>>> Signed-off-by: Venkata Prasad Potturu <quic_potturu@...cinc.com>
>>
>> LGTM,
>>
>> Reviewed-by: Srinivas Kandagatla <srinivas.kandagatla@...aro.org>
> 
> I don't get the idea, sorry.
> 
> If you look at the code, these are the cases where this 'struct
> completion' is used
> 
> 	struct completion enumeration;
> 	complete(&ctrl->enumeration);
> 	/* Enable Auto enumeration */
> 	init_completion(&ctrl->enumeration);
> 	wait_for_completion_timeout(&ctrl->enumeration,
> 
> 
> so if you remove the wait_for_completeion, then you might just as well
> remove the whole thing and revert 06dd96738d618
> 
> what am I missing?
Yes, that makes more sense to revert it, as it is the only user of this 
completion.
We could add it back when we really need this again in pm runtime setup 
if required.

--srini
> 
> 
>>> ---
>>>    drivers/soundwire/qcom.c | 2 --
>>>    1 file changed, 2 deletions(-)
>>>
>>> diff --git a/drivers/soundwire/qcom.c b/drivers/soundwire/qcom.c
>>> index 5481341..9a32a24 100644
>>> --- a/drivers/soundwire/qcom.c
>>> +++ b/drivers/soundwire/qcom.c
>>> @@ -1309,8 +1309,6 @@ static int qcom_swrm_probe(struct
>>> platform_device *pdev)
>>>        }
>>>          qcom_swrm_init(ctrl);
>>> -    wait_for_completion_timeout(&ctrl->enumeration,
>>> -                    msecs_to_jiffies(TIMEOUT_MS));
>>>        ret = qcom_swrm_register_dais(ctrl);
>>>        if (ret)
>>>            goto err_master_add;

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ