From: Marek Vasut <marek.vasut@mailbox.org>
To: Manivannan Sadhasivam <manivannan.sadhasivam@oss.qualcomm.com>,
sashiko-reviews@lists.linux.dev
Cc: Marek Vasut <marek.vasut+renesas@mailbox.org>,
wsa+renesas@sang-engineering.com, linux-pci@vger.kernel.org,
robh@kernel.org, conor+dt@kernel.org, devicetree@vger.kernel.org
Subject: Re: [PATCH v5] PCI: rcar-gen4: Add missing PM ops
Date: Fri, 16 Oct 2026 12:54:55 +0200 [thread overview]
Message-ID: <a5cbdf4e-ad1d-4e54-84b7-15f7841c414c@mailbox.org> (raw)
In-Reply-To: <179214090624.63727.1877053108500595755.b4-reply@b4>
On 10/16/26 10:55 AM, Manivannan Sadhasivam wrote:
> On 2026-10-04 01:31 +0000, sashiko-bot@kernel.org wrote:
>> Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
>> - [High] pcie: deadlocks due to ioremap and request_firmware in NOIRQ PM phase
>> --
>>
>> commit e6c055f1eedf6bd5c13e231da24f0c6a76a24ba2
>> Author: Marek Vasut <marek.vasut+renesas@mailbox.org>
>>
>> PCI: rcar-gen4: Add missing PM ops
>>
>> The R-Car Gen4 PCIe controller needs to gracefully suspend and resume its
>> link across system suspend/resume cycles to support power domains shutting
>> down. This patch adds suspend_noirq and resume_noirq PM operations to tear
>> down the link on suspend and restart it on resume.
>>
>>> diff --git a/drivers/pci/controller/dwc/pcie-rcar-gen4.c b/drivers/pci/controller/dwc/pcie-rcar-gen4.c
>>> index 2e7a8d85c0060..fceecbd16355c 100644
>>> --- a/drivers/pci/controller/dwc/pcie-rcar-gen4.c
>>> +++ b/drivers/pci/controller/dwc/pcie-rcar-gen4.c
>>
>> [ ... ]
>>
>>> @@ -1062,6 +1064,26 @@ static int rcar_gen4_pcie_ltssm_control(struct rcar_gen4_pcie *rcar, bool enable
>>> return 0;
>>> }
>>>
>>> +static int rcar_gen4_pcie_suspend_noirq(struct device *dev)
>>> +{
>>> + struct rcar_gen4_pcie *rcar = dev_get_drvdata(dev);
>>> +
>>> + if (rcar->drvdata->mode != DW_PCIE_RC_TYPE)
>>> + return 0;
>>> +
>>> + return dw_pcie_suspend_noirq(&rcar->dw);
>> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>>
>> [Severity: High]
>> Does this code trigger a deadlock or kernel panic during the NOIRQ PM phase?
>>
>> Setting pp->use_atu_msg to true causes dw_pcie_suspend_noirq() to eventually
>> call ioremap():
>>
>> dw_pcie_suspend_noirq()
>> dw_pcie_pme_turn_off()
>> ioremap()
>>
>> Since this runs during the suspend_noirq phase with local interrupts disabled
>> and the system frozen, ioremap() allocates memory with GFP_KERNEL and may
>> sleep, which is strictly prohibited in NOIRQ context.
>>
>
> What? Local CPU interrupts won't be disbled in the noirq phase, only the device
> interrupts will be. So this concern is utterly baseless.
Do you think we could get this patch into 7.4 since this is a bugfix ?
Thank you !
next prev parent reply other threads:[~2026-10-16 11:27 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-04 1:18 [PATCH v5] PCI: rcar-gen4: Add missing PM ops Marek Vasut
2026-10-04 1:31 ` sashiko-bot
2026-10-16 8:55 ` Manivannan Sadhasivam
2026-10-16 10:54 ` Marek Vasut [this message]
2026-10-17 5:08 ` Manivannan Sadhasivam
2026-10-17 5:18 ` Manivannan Sadhasivam
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=a5cbdf4e-ad1d-4e54-84b7-15f7841c414c@mailbox.org \
--to=marek.vasut@mailbox.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=manivannan.sadhasivam@oss.qualcomm.com \
--cc=marek.vasut+renesas@mailbox.org \
--cc=robh@kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
--cc=wsa+renesas@sang-engineering.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox