From: Marek Vasut <marek.vasut@mailbox.org>
To: Geert Uytterhoeven <geert@linux-m68k.org>,
Marek Vasut <marek.vasut+renesas@mailbox.org>
Cc: linux-pci@vger.kernel.org,
"Krzysztof Wilczyński" <kwilczynski@kernel.org>,
"Bjorn Helgaas" <bhelgaas@google.com>,
"Geert Uytterhoeven" <geert+renesas@glider.be>,
"Lorenzo Pieralisi" <lpieralisi@kernel.org>,
"Magnus Damm" <magnus.damm@gmail.com>,
"Manivannan Sadhasivam" <mani@kernel.org>,
"Marek Vasut" <marek.vasut+renesas@gmail.com>,
"Rob Herring" <robh@kernel.org>,
"Yoshihiro Shimoda" <yoshihiro.shimoda.uh@renesas.com>,
linux-kernel@vger.kernel.org, linux-renesas-soc@vger.kernel.org
Subject: Re: [PATCH] PCI: rcar-host: Add static assertion to check !PCI_LOCKLESS_CONFIG
Date: Mon, 22 Sep 2025 17:48:40 +0200 [thread overview]
Message-ID: <974b6f7f-e769-48ff-9bd9-0ed0c8f48b1e@mailbox.org> (raw)
In-Reply-To: <CAMuHMdUG_y-gb6kGd+Bgo5AQvqv009RYwVjwN5dDC0WFOuyPcg@mail.gmail.com>
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@mailbox.org> 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@mailbox.org>
>
> 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.
next prev parent reply other threads:[~2025-09-22 15:48 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-22 15:33 [PATCH] PCI: rcar-host: Add static assertion to check !PCI_LOCKLESS_CONFIG Marek Vasut
2025-09-22 15:41 ` Geert Uytterhoeven
2025-09-22 15:48 ` Marek Vasut [this message]
2025-09-23 23:42 ` Marek Vasut
2025-09-23 11:06 ` kernel test robot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=974b6f7f-e769-48ff-9bd9-0ed0c8f48b1e@mailbox.org \
--to=marek.vasut@mailbox.org \
--cc=bhelgaas@google.com \
--cc=geert+renesas@glider.be \
--cc=geert@linux-m68k.org \
--cc=kwilczynski@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=linux-renesas-soc@vger.kernel.org \
--cc=lpieralisi@kernel.org \
--cc=magnus.damm@gmail.com \
--cc=mani@kernel.org \
--cc=marek.vasut+renesas@gmail.com \
--cc=marek.vasut+renesas@mailbox.org \
--cc=robh@kernel.org \
--cc=yoshihiro.shimoda.uh@renesas.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox