* [PATCH v2] PCI: rcar-gen4: Isolate driver to ARM64
@ 2026-07-14 13:19 Marek Vasut
2026-07-14 13:37 ` sashiko-bot
2026-07-14 21:10 ` Bjorn Helgaas
0 siblings, 2 replies; 3+ messages in thread
From: Marek Vasut @ 2026-07-14 13:19 UTC (permalink / raw)
To: linux-pci
Cc: Marek Vasut, kernel test robot, Krzysztof Wilczyński,
Bjorn Helgaas, Catalin Marinas, Conor Dooley, Geert Uytterhoeven,
Krzysztof Kozlowski, Lorenzo Pieralisi, Manivannan Sadhasivam,
Marc Zyngier, Rob Herring, Yoshihiro Shimoda, devicetree,
linux-arm-kernel, linux-doc, linux-kernel, linux-renesas-soc
The driver includes linux/irqchip/arm-gic-v3.h which pulls in headers
which are available only on ARM and ARM64, on other architectures the
headers are not present and the driver fails to build. This driver is
used only on ARM64 hardware, isolate its build only to ARM64 to avoid
build failures on other architectures.
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202607100310.iQw5m9Uo-lkp@intel.com/
Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
---
Cc: "Krzysztof Wilczyński" <kwilczynski@kernel.org>
Cc: Bjorn Helgaas <bhelgaas@google.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Conor Dooley <conor+dt@kernel.org>
Cc: Geert Uytterhoeven <geert+renesas@glider.be>
Cc: Krzysztof Kozlowski <krzk+dt@kernel.org>
Cc: Lorenzo Pieralisi <lpieralisi@kernel.org>
Cc: Manivannan Sadhasivam <mani@kernel.org>
Cc: Marc Zyngier <maz@kernel.org>
Cc: Rob Herring <robh@kernel.org>
Cc: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Cc: devicetree@vger.kernel.org
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-doc@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Cc: linux-pci@vger.kernel.org
Cc: linux-renesas-soc@vger.kernel.org
---
V2: This is a rework of PCI: rcar-gen4: Inline GIC_TRANSLATER offset macro
which isolates the driver build to ARM64 via Kconfig instead:
https://lore.kernel.org/linux-pci/CAMuHMdVvWE7YZgKvreSn_vJLOVD4eMmn3TCGOyqSXksqjBCwvg@mail.gmail.com/
https://lore.kernel.org/linux-pci/20260714110041.GA1349622@bhelgaas/
---
drivers/pci/controller/dwc/Kconfig | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/pci/controller/dwc/Kconfig b/drivers/pci/controller/dwc/Kconfig
index 49a7a2c50ca15..3260d916110b2 100644
--- a/drivers/pci/controller/dwc/Kconfig
+++ b/drivers/pci/controller/dwc/Kconfig
@@ -346,7 +346,7 @@ config PCIE_RCAR_GEN4
config PCIE_RCAR_GEN4_HOST
tristate "Renesas R-Car Gen4 PCIe controller (host mode)"
- depends on ARCH_RENESAS || COMPILE_TEST
+ depends on ARM64 && (ARCH_RENESAS || COMPILE_TEST)
depends on PCI_MSI
select PCIE_DW_HOST
select PCIE_RCAR_GEN4
@@ -357,7 +357,7 @@ config PCIE_RCAR_GEN4_HOST
config PCIE_RCAR_GEN4_EP
tristate "Renesas R-Car Gen4 PCIe controller (endpoint mode)"
- depends on ARCH_RENESAS || COMPILE_TEST
+ depends on ARM64 && (ARCH_RENESAS || COMPILE_TEST)
depends on PCI_ENDPOINT
select PCIE_DW_EP
select PCIE_RCAR_GEN4
--
2.53.0
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH v2] PCI: rcar-gen4: Isolate driver to ARM64
2026-07-14 13:19 [PATCH v2] PCI: rcar-gen4: Isolate driver to ARM64 Marek Vasut
@ 2026-07-14 13:37 ` sashiko-bot
2026-07-14 21:10 ` Bjorn Helgaas
1 sibling, 0 replies; 3+ messages in thread
From: sashiko-bot @ 2026-07-14 13:37 UTC (permalink / raw)
To: Marek Vasut; +Cc: devicetree, wsa+renesas, linux-pci, robh, conor+dt
Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
New issues:
- [Medium] Unjustified COMPILE_TEST restriction due to incorrect commit message claim.
Pre-existing issues:
- [High] Missing return in error handling path leads to endpoint notification on a de-initialized endpoint.
--
--- Patch [1]: [PATCH v2] PCI: rcar-gen4: Isolate driver to ARM64 ---
commit 9fa6f24cbaf3124b832a16ce500ea61d355eb4f5
Author: Marek Vasut <marek.vasut+renesas@mailbox.org>
PCI: rcar-gen4: Isolate driver to ARM64
The driver includes linux/irqchip/arm-gic-v3.h which pulls in headers
which are available only on ARM and ARM64, on other architectures the
headers are not present and the driver fails to build. This driver is
used only on ARM64 hardware, isolate its build only to ARM64 to avoid
build failures on other architectures.
Link: https://lore.kernel.org/oe-kbuild-all/202607100310.iQw5m9Uo-lkp@intel.com/
> The driver includes linux/irqchip/arm-gic-v3.h which pulls in headers
> which are available only on ARM and ARM64, on other architectures the
> headers are not present and the driver fails to build.
[Severity: Medium]
Is this description accurate for the current tree?
A review of drivers/pci/controller/dwc/pcie-rcar-gen4.c confirms it does not
actually include linux/irqchip/arm-gic-v3.h or use GIC-specific macros. Does
restricting COMPILE_TEST strictly to ARM64 needlessly degrade cross-architecture
build testing coverage?
> diff --git a/drivers/pci/controller/dwc/Kconfig b/drivers/pci/controller/dwc/Kconfig
> index aa0b784c85b47..0d4bf8d4cf565 100644
> --- a/drivers/pci/controller/dwc/Kconfig
> +++ b/drivers/pci/controller/dwc/Kconfig
> @@ -344,7 +344,7 @@ config PCIE_RCAR_GEN4
>
> config PCIE_RCAR_GEN4_HOST
> tristate "Renesas R-Car Gen4 PCIe controller (host mode)"
> - depends on ARCH_RENESAS || COMPILE_TEST
> + depends on ARM64 && (ARCH_RENESAS || COMPILE_TEST)
> depends on PCI_MSI
> select PCIE_DW_HOST
> select PCIE_RCAR_GEN4
> @@ -355,7 +355,7 @@ config PCIE_RCAR_GEN4_HOST
>
> config PCIE_RCAR_GEN4_EP
> tristate "Renesas R-Car Gen4 PCIe controller (endpoint mode)"
> - depends on ARCH_RENESAS || COMPILE_TEST
> + depends on ARM64 && (ARCH_RENESAS || COMPILE_TEST)
> depends on PCI_ENDPOINT
> select PCIE_DW_EP
> select PCIE_RCAR_GEN4
[Severity: High]
This isn't a bug introduced by this patch, but is it intentional that the error
path in rcar_gen4_add_dw_pcie_ep() falls through without returning?
drivers/pci/controller/dwc/pcie-rcar-gen4.c:rcar_gen4_add_dw_pcie_ep() {
...
ret = dw_pcie_ep_init_registers(ep);
if (ret) {
dev_err(dev, "Failed to initialize DWC endpoint registers\n");
dw_pcie_ep_deinit(ep);
rcar_gen4_pcie_ep_deinit(rcar);
}
pci_epc_init_notify(ep->epc);
...
}
If dw_pcie_ep_init_registers() fails, execution incorrectly falls through to
pci_epc_init_notify(), notifying any bound EPF devices that the endpoint is
ready. Since the hardware has just been de-initialized, could an EPF driver
attempting to interact with the EPC cause bus faults or use-after-free
conditions?
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260714131957.38067-1-marek.vasut+renesas@mailbox.org?part=1
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH v2] PCI: rcar-gen4: Isolate driver to ARM64
2026-07-14 13:19 [PATCH v2] PCI: rcar-gen4: Isolate driver to ARM64 Marek Vasut
2026-07-14 13:37 ` sashiko-bot
@ 2026-07-14 21:10 ` Bjorn Helgaas
1 sibling, 0 replies; 3+ messages in thread
From: Bjorn Helgaas @ 2026-07-14 21:10 UTC (permalink / raw)
To: Marek Vasut, Manivannan Sadhasivam
Cc: linux-pci, kernel test robot, Krzysztof Wilczyński,
Bjorn Helgaas, Catalin Marinas, Conor Dooley, Geert Uytterhoeven,
Krzysztof Kozlowski, Lorenzo Pieralisi, Manivannan Sadhasivam,
Marc Zyngier, Rob Herring, Yoshihiro Shimoda, devicetree,
linux-arm-kernel, linux-doc, linux-kernel, linux-renesas-soc
On Tue, Jul 14, 2026 at 03:19:27PM +0200, Marek Vasut wrote:
> The driver includes linux/irqchip/arm-gic-v3.h which pulls in headers
> which are available only on ARM and ARM64, on other architectures the
> headers are not present and the driver fails to build. This driver is
> used only on ARM64 hardware, isolate its build only to ARM64 to avoid
> build failures on other architectures.
>
> Reported-by: kernel test robot <lkp@intel.com>
> Closes: https://lore.kernel.org/oe-kbuild-all/202607100310.iQw5m9Uo-lkp@intel.com/
> Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Mani, I assume you'll squash this into 89bded511a66 ("PCI: rcar-gen4:
Configure AXIINTC if iMSI-RX is not used") so it's connected to the
addition of the linux/irqchip/arm-gic-v3.h include and there's no
bisection hole?
> ---
> Cc: "Krzysztof Wilczyński" <kwilczynski@kernel.org>
> Cc: Bjorn Helgaas <bhelgaas@google.com>
> Cc: Catalin Marinas <catalin.marinas@arm.com>
> Cc: Conor Dooley <conor+dt@kernel.org>
> Cc: Geert Uytterhoeven <geert+renesas@glider.be>
> Cc: Krzysztof Kozlowski <krzk+dt@kernel.org>
> Cc: Lorenzo Pieralisi <lpieralisi@kernel.org>
> Cc: Manivannan Sadhasivam <mani@kernel.org>
> Cc: Marc Zyngier <maz@kernel.org>
> Cc: Rob Herring <robh@kernel.org>
> Cc: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
> Cc: devicetree@vger.kernel.org
> Cc: linux-arm-kernel@lists.infradead.org
> Cc: linux-doc@vger.kernel.org
> Cc: linux-kernel@vger.kernel.org
> Cc: linux-pci@vger.kernel.org
> Cc: linux-renesas-soc@vger.kernel.org
> ---
> V2: This is a rework of PCI: rcar-gen4: Inline GIC_TRANSLATER offset macro
> which isolates the driver build to ARM64 via Kconfig instead:
> https://lore.kernel.org/linux-pci/CAMuHMdVvWE7YZgKvreSn_vJLOVD4eMmn3TCGOyqSXksqjBCwvg@mail.gmail.com/
> https://lore.kernel.org/linux-pci/20260714110041.GA1349622@bhelgaas/
> ---
> drivers/pci/controller/dwc/Kconfig | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/pci/controller/dwc/Kconfig b/drivers/pci/controller/dwc/Kconfig
> index 49a7a2c50ca15..3260d916110b2 100644
> --- a/drivers/pci/controller/dwc/Kconfig
> +++ b/drivers/pci/controller/dwc/Kconfig
> @@ -346,7 +346,7 @@ config PCIE_RCAR_GEN4
>
> config PCIE_RCAR_GEN4_HOST
> tristate "Renesas R-Car Gen4 PCIe controller (host mode)"
> - depends on ARCH_RENESAS || COMPILE_TEST
> + depends on ARM64 && (ARCH_RENESAS || COMPILE_TEST)
> depends on PCI_MSI
> select PCIE_DW_HOST
> select PCIE_RCAR_GEN4
> @@ -357,7 +357,7 @@ config PCIE_RCAR_GEN4_HOST
>
> config PCIE_RCAR_GEN4_EP
> tristate "Renesas R-Car Gen4 PCIe controller (endpoint mode)"
> - depends on ARCH_RENESAS || COMPILE_TEST
> + depends on ARM64 && (ARCH_RENESAS || COMPILE_TEST)
> depends on PCI_ENDPOINT
> select PCIE_DW_EP
> select PCIE_RCAR_GEN4
> --
> 2.53.0
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-07-14 21:10 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-14 13:19 [PATCH v2] PCI: rcar-gen4: Isolate driver to ARM64 Marek Vasut
2026-07-14 13:37 ` sashiko-bot
2026-07-14 21:10 ` Bjorn Helgaas
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox