On 9/22/25 5:41 PM, Geert Uytterhoeven wrote:
Hello Geert,
On Mon, 22 Sept 2025 at 17:34, Marek Vasut
<marek.vasut+renesas@xxxxxxxxxxx> wrote:
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>
Thanks for your patch!
--- 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;
This causes a build failure when compile-testing, e.g. x86 allmodconfig.
Using "depends on !PCI_LOCKLESS_CONFIG" instead would avoid that,
but indeed has the disadvantage that it wouldn't complain loudly when
PCI_LOCKLESS_CONFIG would ever be enabled on ARM64...
All right, let's also wait for input from PCI maintainers. It seems both
alternatives -- static_assert() and !PCI_LOCKLESS_CONFIG have their own
disadvantages, maybe there is a third option.