Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Manikanta Maddireddy <mmaddireddy@nvidia.com>
To: Thierry Reding <thierry.reding@kernel.org>
Cc: linux-pci@vger.kernel.org, devicetree@vger.kernel.org,
	linux-tegra@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	"Thierry Reding" <treding@nvidia.com>,
	"Bjorn Helgaas" <bhelgaas@google.com>,
	"Lorenzo Pieralisi" <lpieralisi@kernel.org>,
	"Krzysztof Wilczyński" <kwilczynski@kernel.org>,
	"Manivannan Sadhasivam" <mani@kernel.org>,
	"Rob Herring" <robh@kernel.org>,
	"Krzysztof Kozlowski" <krzk+dt@kernel.org>,
	"Conor Dooley" <conor+dt@kernel.org>,
	"Thierry Reding" <thierry.reding@gmail.com>,
	"Jonathan Hunter" <jonathanh@nvidia.com>,
	"Karthikeyan Mitran" <m.karthikeyan@mobiveil.co.in>,
	"Hou Zhiqiang" <Zhiqiang.Hou@nxp.com>,
	"Thomas Petazzoni" <thomas.petazzoni@bootlin.com>,
	"Pali Rohár" <pali@kernel.org>,
	"Michal Simek" <michal.simek@amd.com>,
	"Kevin Xie" <kevin.xie@starfivetech.com>,
	"Aksh Garg" <a-garg7@ti.com>
Subject: Re: [PATCH v8 4/6] PCI: tegra: Add Tegra264 support
Date: Tue, 28 Jul 2026 09:25:17 +0530	[thread overview]
Message-ID: <a12ed6d2-ceca-496b-b104-aa669cace5cd@nvidia.com> (raw)
In-Reply-To: <amd8FoDqTNV2z2vM@orome>



On 27/07/26 9:14 pm, Thierry Reding wrote:
>>> +static int tegra264_pcie_suspend(struct device *dev)
>>> +{
>>> +	/*
>>> +	 * No need to do anything device-specific here, BPMP handles the
>>> +	 * details of taking the link into L2.
>>> +	 */
>>> +
>>> +	return pinctrl_pm_select_sleep_state(dev);
>>> +}
>>> +
>>> +static int tegra264_pcie_resume(struct device *dev)
>>> +{
>>> +	struct tegra264_pcie *pcie = dev_get_drvdata(dev);
>>> +	int err;
>>> +
>>> +	err = pinctrl_pm_select_default_state(dev);
>>> +	if (err < 0) {
>>> +		dev_err(dev, "failed to configure sideband pins: %pe\n",
>>> +			ERR_PTR(err));
>>> +		return err;
>>> +	}
>>> +
>>> +	tegra264_pcie_init(pcie);
>>> +
>>> +	return 0;
>>> +}
>>> +
>>> +static DEFINE_SIMPLE_DEV_PM_OPS(tegra264_pcie_pm_ops,
>>> +				tegra264_pcie_suspend,
>>> +				tegra264_pcie_resume);
>> PCI subsystem registered pm_noirq callbacks. So, controller should also
>> register to pm_noirq callbacks.
> Unfortunately that causes illegal uses of msleep() in no-IRQ context.
> Sashiko complains about it and is right. I don't observe any runtime
> issues with switching to the _noirq variants, but it doesn't seem right
> to stick to it.
> 
> Is there any reason why this needs to be _noirq, or any benefits if it
> was?
> 
> Thierry

The PCI subsystem registers pci_pm_resume_noirq() as a noirq resume 
callback. This function accesses PCI configuration space to transition 
the device from D3hot to D0. Therefore, the controller driver must first 
bring the PCIe controller out of reset and make its configuration space 
accessible to the PCI subsystem.

Many other controller drivers in drivers/pci/controller/ are registering 
noirq callback.

Thanks,
Manikanta

-- 
nvpublic



  reply	other threads:[~2026-07-28  3:55 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-16 17:07 [PATCH v8 0/6] PCI: tegra: Add Tegra264 support Thierry Reding
2026-07-16 17:07 ` [PATCH v8 1/6] dt-bindings: pci: tegra264: Strictly distinguish C0 from C1-C5 Thierry Reding
2026-07-16 17:07 ` [PATCH v8 2/6] dt-bindings: pci: tegra264: Switch to PCIe root port bindings Thierry Reding
2026-07-22 17:53   ` Rob Herring
2026-07-16 17:07 ` [PATCH v8 3/6] PCI: Use standard wait times for PCIe link monitoring Thierry Reding
2026-07-16 17:07 ` [PATCH v8 4/6] PCI: tegra: Add Tegra264 support Thierry Reding
2026-07-22 16:44   ` Bjorn Helgaas
2026-07-27 15:39     ` Thierry Reding
2026-07-24  8:28   ` Manikanta Maddireddy
2026-07-27 15:44     ` Thierry Reding
2026-07-28  3:55       ` Manikanta Maddireddy [this message]
2026-07-16 17:07 ` [PATCH v8 5/6] arm64: tegra: Reorder reg and reg-names to match bindings Thierry Reding
2026-07-16 17:07 ` [PATCH v8 6/6] arm64: tegra: Add PCIe root ports on Tegra264 Thierry Reding

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=a12ed6d2-ceca-496b-b104-aa669cace5cd@nvidia.com \
    --to=mmaddireddy@nvidia.com \
    --cc=Zhiqiang.Hou@nxp.com \
    --cc=a-garg7@ti.com \
    --cc=bhelgaas@google.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=jonathanh@nvidia.com \
    --cc=kevin.xie@starfivetech.com \
    --cc=krzk+dt@kernel.org \
    --cc=kwilczynski@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=linux-tegra@vger.kernel.org \
    --cc=lpieralisi@kernel.org \
    --cc=m.karthikeyan@mobiveil.co.in \
    --cc=mani@kernel.org \
    --cc=michal.simek@amd.com \
    --cc=pali@kernel.org \
    --cc=robh@kernel.org \
    --cc=thierry.reding@gmail.com \
    --cc=thierry.reding@kernel.org \
    --cc=thomas.petazzoni@bootlin.com \
    --cc=treding@nvidia.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