[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ebcvi2mput6dyx5omlcvapjt6mwzrpq4h6c4o3kyfdxfrin35x@d75pxu652f6u>
Date: Wed, 24 Sep 2025 08:55:54 +0530
From: Manivannan Sadhasivam <mani@...nel.org>
To: Marek Vasut <marek.vasut+renesas@...lbox.org>
Cc: linux-pci@...r.kernel.org,
Krzysztof Wilczyński <kwilczynski@...nel.org>, Bjorn Helgaas <bhelgaas@...gle.com>,
Geert Uytterhoeven <geert+renesas@...der.be>, Lorenzo Pieralisi <lpieralisi@...nel.org>,
Magnus Damm <magnus.damm@...il.com>, Marek Vasut <marek.vasut+renesas@...il.com>,
Rob Herring <robh@...nel.org>, Yoshihiro Shimoda <yoshihiro.shimoda.uh@...esas.com>,
linux-kernel@...r.kernel.org, linux-renesas-soc@...r.kernel.org
Subject: Re: [PATCH v2] PCI: rcar-host: Add static assertion to check
!PCI_LOCKLESS_CONFIG
On Wed, Sep 24, 2025 at 01:46:18AM +0200, Marek Vasut 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.
>
This limitation applies to almost all host controller drivers except those used
on Intel platforms like VMD and Hyper-V. So this would require adding the
Kconfig dependency for all those, not just for RCAR.
We could also add the dependency to the arch Kconfig, but there is still a
possibility that if the driver is used on a platform selecting
PCI_LOCKLESS_CONFIG, it would be broken silently. So adding the dependency to
the individual drivers that suffer from the limitation seems to be the right
thing to do.
Also, I'm not in favor of adding static_assert with Kconfig dependency in place.
- Mani
> Signed-off-by: Marek Vasut <marek.vasut+renesas@...lbox.org>
> ---
> Cc: "Krzysztof Wilczyński" <kwilczynski@...nel.org>
> Cc: Bjorn Helgaas <bhelgaas@...gle.com>
> Cc: Geert Uytterhoeven <geert+renesas@...der.be>
> Cc: Lorenzo Pieralisi <lpieralisi@...nel.org>
> Cc: Magnus Damm <magnus.damm@...il.com>
> Cc: Manivannan Sadhasivam <mani@...nel.org>
> Cc: Marek Vasut <marek.vasut+renesas@...il.com>
> Cc: Rob Herring <robh@...nel.org>
> Cc: Yoshihiro Shimoda <yoshihiro.shimoda.uh@...esas.com>
> Cc: linux-kernel@...r.kernel.org
> Cc: linux-pci@...r.kernel.org
> Cc: linux-renesas-soc@...r.kernel.org
> ---
> 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
>
--
மணிவண்ணன் சதாசிவம்
Powered by blists - more mailing lists