Re: [PATCH v2] PCI: rcar-host: Add static assertion to check !PCI_LOCKLESS_CONFIG

From: Manivannan Sadhasivam

Date: Wed Sep 24 2025 - 00:01:06 EST


On Wed, Sep 24, 2025 at 05:34:55AM +0200, Marek Vasut wrote:
> Hello Manivannan,
>
> On 9/24/25 5:25 AM, Manivannan Sadhasivam wrote:
> > 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.
>
> Correct.
>
> > 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.
>
> Would you like me to send a few more patches which add !PCI_LOCKLESS_CONFIG
> into per-driver Kconfig entries, at least for drivers where I am sure they
> suffer from this currently hypothetical issue ...
>

Sure.

> > Also, I'm not in favor of adding static_assert with Kconfig dependency in place.
> ... and drop the static assert ?
>
> Then the drivers would at least be marked accordingly.

Yes. Better than what we have currently.

- Mani

--
மணிவண்ணன் சதாசிவம்