All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: vladimir.oltean@nxp.com
Cc: linux-pci@vger.kernel.org
Subject: Re: [PATCH 2/3] PCI: dra7xx: Remove device links to PHY
Date: Sat, 12 Sep 2026 16:25:38 +0000	[thread overview]
Message-ID: <20260912162538.6EBB51F00893@smtp.kernel.org> (raw)
In-Reply-To: <20260912161440.1032188-3-vladimir.oltean@nxp.com>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:

Pre-existing issues:
- [High] Shared IRQ handler accesses hardware registers without checking if the device is runtime active.
--

commit 5052482ced4c68a6a0a92320a0f14365dce06957
Author: vladimir.oltean@nxp.com <vladimir.oltean@nxp.com>

PCI: dra7xx: Remove device links to PHY

This is a full revert of commit 7a4db656a635 ("PCI: dra7xx: Create
functional dependency between PCIe and PHY"). The reverted functionality
is redundant since the PHY core now adds a device link to order PHY
provider and consumer suspend/resume operations.

> diff --git a/drivers/pci/controller/dwc/pci-dra7xx.c b/drivers/pci/controller/dwc/pci-dra7xx.c
> index 6ae5b27e27b32..6c9e881776002 100644
> --- a/drivers/pci/controller/dwc/pci-dra7xx.c
> +++ b/drivers/pci/controller/dwc/pci-dra7xx.c

[ ... ]

[Severity: High]
This is a pre-existing issue, but does the shared IRQ handler access hardware
registers without checking if the device is runtime active?

If another device sharing the same IRQ line triggers an interrupt during or
after shutdown, the handler unconditionally accesses the powered-off registers:

drivers/pci/controller/dwc/pci-dra7xx.c:dra7xx_pcie_irq_handler() {
	...
	reg = dra7xx_pcie_readl(dra7xx, PCIECTRL_DRA7XX_CONF_IRQSTATUS_MAIN);
	...
}

In the driver's shutdown callback, the device is powered off
(pm_runtime_put_sync, clk_disable_unprepare) but the devm-managed IRQ is never
freed.

Could this lead to a kernel panic (precise data abort on ARM) due to reading
from unclocked hardware registers, or spurious interrupt storms? Should the
handler use pm_runtime_get_if_active() before accessing registers?

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260912161440.1032188-1-vladimir.oltean@nxp.com?part=2

  reply	other threads:[~2026-09-12 16:25 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-12 16:14 [PATCH 0/3] PCI: Remove device links to Generic PHY vladimir.oltean
2026-09-12 16:14 ` [PATCH 1/3] PCI: cadence: Remove device links to PHY vladimir.oltean
2026-09-12 16:24   ` sashiko-bot
2026-09-12 16:27     ` Vladimir Oltean
2026-09-12 16:14 ` [PATCH 2/3] PCI: dra7xx: " vladimir.oltean
2026-09-12 16:25   ` sashiko-bot [this message]
2026-09-12 16:14 ` [PATCH 3/3] PCI: keystone: " vladimir.oltean
2026-09-12 16:27   ` sashiko-bot

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=20260912162538.6EBB51F00893@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    --cc=vladimir.oltean@nxp.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.