Re: [PATCH v8 3/3] firmware: qcom_scm: Check for waitq state in wait_for_wq_completion()

From: Bartosz Golaszewski
Date: Mon Nov 03 2025 - 10:57:42 EST


On Sun, Nov 2, 2025 at 9:19 AM Shivendra Pratap
<shivendra.pratap@xxxxxxxxxxxxxxxx> wrote:
>
> From: Unnathi Chalicheemala <unnathi.chalicheemala@xxxxxxxxxxxxxxxx>
>
> Modify wait_for_wq_completion() to check if task is in idle state using
> wait_for_completion_state().
>

This is not what's happening. wait_for_completion_state(comp,
TASK_IDLE) puts the waiting task into TASK_IDLE state. It's not
checking anything.

> This allows for detecting when waitq contexts are in idle state and
> propagates it to __scm_smc_do(), which is beneficial when task is idle
> and waiting for a kick to accept new requests.
>

Could you elaborate on what benefit exactly this is giving us? It's
not quite clear from this paragraph.

Bart