[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aMuz/C1iT8JtjXbQ@trex>
Date: Thu, 18 Sep 2025 09:25:48 +0200
From: Jorge Ramirez <jorge.ramirez@....qualcomm.com>
To: Praveen Talari <praveen.talari@....qualcomm.com>
Cc: Krzysztof Kozlowski <krzk@...nel.org>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Jiri Slaby <jirislaby@...nel.org>,
Bryan O'Donoghue <bryan.odonoghue@...aro.org>,
Praveen Talari <quic_ptalari@...cinc.com>,
linux-arm-msm@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-serial@...r.kernel.org, alexey.klimov@...aro.org,
jorge.ramirez@....qualcomm.com, dmitry.baryshkov@....qualcomm.com,
andersson@...nel.org, psodagud@...cinc.com, djaggi@...cinc.com,
quic_msavaliy@...cinc.com, quic_vtanuku@...cinc.com,
quic_arandive@...cinc.com, quic_shazhuss@...cinc.com,
quic_cchiluve@...cinc.com
Subject: Re: [PATCH v2] serial: qcom_geni: Fix pinctrl deadlock on runtime
resume
On 18/09/25 09:25:53, Praveen Talari wrote:
> Hi Krzysztof,
>
> On 9/18/2025 5:28 AM, Krzysztof Kozlowski wrote:
> > On 18/09/2025 03:51, Praveen Talari wrote:
> > > A stall was observed in disable_irq() during
> > > pinctrl_pm_select_default_state(), triggered by wakeup IRQ being active
> > > while the UART port was not yet active. This led to a hang in
> > > __synchronize_irq(), as shown in the following trace:
> > >
> > > Call trace:
> > > __switch_to+0xe0/0x120
> > > __schedule+0x39c/0x978
> > > schedule+0x5c/0xf8
> > > __synchronize_irq+0x88/0xb4
> > > disable_irq+0x3c/0x4c
> > > msm_pinmux_set_mux+0x508/0x644
> > > pinmux_enable_setting+0x190/0x2dc
> > > pinctrl_commit_state+0x13c/0x208
> > > pinctrl_pm_select_default_state+0x4c/0xa4
> > > geni_se_resources_on+0xe8/0x154
> > > qcom_geni_serial_runtime_resume+0x4c/0x88
> > > pm_generic_runtime_resume+0x2c/0x44
> > > __genpd_runtime_resume+0x30/0x80
> > > genpd_runtime_resume+0x114/0x29c
> > > __rpm_callback+0x48/0x1d8
> > > rpm_callback+0x6c/0x78
> > > rpm_resume+0x530/0x750
> > > __pm_runtime_resume+0x50/0x94
> > > handle_threaded_wake_irq+0x30/0x94
> > > irq_thread_fn+0x2c/0xa8
> > > irq_thread+0x160/0x248
> > > kthread+0x110/0x114
> > > ret_from_fork+0x10/0x20
> > >
> > > To fix this, wakeup IRQ setup is moved from probe to UART startup,
> > > ensuring it is only configured when the port is active. Correspondingly,
> > > the wakeup IRQ is cleared during shutdown. This avoids premature IRQ
> > > disable during pinctrl setup and prevents the observed stall. The probe
> > > and remove pathsare simplified by removing redundant wakeup IRQ handling.
> > >
> > > Fixes: 1afa70632c39 ("serial: qcom-geni: Enable PM runtime for serial driver")
> > > Reported-by: Alexey Klimov <alexey.klimov@...aro.org>
> > > Closes: https://lore.kernel.org/all/DC0D53ZTNOBU.E8LSD5E5Z8TX@linaro.org/
> > > Tested-by: Jorge Ramirez <jorge.ramirez@....qualcomm.com>
> >
> > Where did you receive this tag for this patch exactly?
>
> Since Jorge was involved in validating the change, I’ve added him under the
> Tested-by tag.
>
> Please correct me if I’m not supposed to add this tag myself.
let's test a bit further Praveen - we need to validate/trace the wake
path on a real scenairo to make sure it is not cpu intensive (although I
suspect the 2% was due to the storm you described more than to the code
path itself)
I can then provide the tested-by on the list.
Powered by blists - more mailing lists