[PATCH v2] PCI: rcar-host: Add static assertion to check !PCI_LOCKLESS_CONFIG
From: Marek Vasut
Date: Tue Sep 23 2025 - 19:47:07 EST
This driver can not function correctly without PCIe subsystem level
config space access serialization. In case PCI_LOCKLESS_CONFIG is
ever enabled on ARM, complain loudly so the driver can be updated
accordingly.
Signed-off-by: Marek Vasut <marek.vasut+renesas@xxxxxxxxxxx>
---
Cc: "Krzysztof Wilczyński" <kwilczynski@xxxxxxxxxx>
Cc: Bjorn Helgaas <bhelgaas@xxxxxxxxxx>
Cc: Geert Uytterhoeven <geert+renesas@xxxxxxxxx>
Cc: Lorenzo Pieralisi <lpieralisi@xxxxxxxxxx>
Cc: Magnus Damm <magnus.damm@xxxxxxxxx>
Cc: Manivannan Sadhasivam <mani@xxxxxxxxxx>
Cc: Marek Vasut <marek.vasut+renesas@xxxxxxxxx>
Cc: Rob Herring <robh@xxxxxxxxxx>
Cc: Yoshihiro Shimoda <yoshihiro.shimoda.uh@xxxxxxxxxxx>
Cc: linux-kernel@xxxxxxxxxxxxxxx
Cc: linux-pci@xxxxxxxxxxxxxxx
Cc: linux-renesas-soc@xxxxxxxxxxxxxxx
---
V2: Add depends on !PCI_LOCKLESS_CONFIG into Kconfig file, to prevent
this from being built when PCI_LOCKLESS_CONFIG is not set at all
---
drivers/pci/controller/Kconfig | 1 +
drivers/pci/controller/pcie-rcar-host.c | 8 ++++++++
2 files changed, 9 insertions(+)
diff --git a/drivers/pci/controller/Kconfig b/drivers/pci/controller/Kconfig
index 41748d083b933..3f489bed289fb 100644
--- a/drivers/pci/controller/Kconfig
+++ b/drivers/pci/controller/Kconfig
@@ -244,6 +244,7 @@ config PCIE_RCAR_HOST
bool "Renesas R-Car PCIe controller (host mode)"
depends on ARCH_RENESAS || COMPILE_TEST
depends on PCI_MSI
+ depends on !PCI_LOCKLESS_CONFIG
select IRQ_MSI_LIB
help
Say Y here if you want PCIe controller support on R-Car SoCs in host
diff --git a/drivers/pci/controller/pcie-rcar-host.c b/drivers/pci/controller/pcie-rcar-host.c
index 213028052aa58..29e13f7ff7ff1 100644
--- a/drivers/pci/controller/pcie-rcar-host.c
+++ b/drivers/pci/controller/pcie-rcar-host.c
@@ -35,6 +35,14 @@
#include "pcie-rcar.h"
+/*
+ * This driver can not function correctly without PCIe subsystem level
+ * config space access serialization. In case PCI_LOCKLESS_CONFIG is
+ * ever enabled on ARM, complain loudly so the driver can be updated
+ * accordingly.
+ */
+static_assert(!IS_ENABLED(CONFIG_PCI_LOCKLESS_CONFIG));
+
struct rcar_msi {
DECLARE_BITMAP(used, INT_PCI_MSI_NR);
struct irq_domain *domain;
--
2.51.0