[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <13c5072c-dc93-477c-b72e-02156a0ecc2e@app.fastmail.com>
Date: Thu, 25 Sep 2025 15:05:52 +0200
From: "Arnd Bergmann" <arnd@...db.de>
To: "Jason Gunthorpe" <jgg@...dia.com>,
"Patrisious Haddad" <phaddad@...dia.com>
Cc: "Tariq Toukan" <tariqt@...dia.com>,
"Catalin Marinas" <catalin.marinas@....com>,
"Eric Dumazet" <edumazet@...gle.com>, "Jakub Kicinski" <kuba@...nel.org>,
"Paolo Abeni" <pabeni@...hat.com>, "Andrew Lunn" <andrew+netdev@...n.ch>,
"David S . Miller" <davem@...emloft.net>,
"Saeed Mahameed" <saeedm@...dia.com>,
"Leon Romanovsky" <leon@...nel.org>, "Mark Bloch" <mbloch@...dia.com>,
Netdev <netdev@...r.kernel.org>, linux-rdma@...r.kernel.org,
linux-kernel@...r.kernel.org, "Gal Pressman" <gal@...dia.com>,
"Leon Romanovsky" <leonro@...dia.com>,
"Michael Guralnik" <michaelgur@...dia.com>,
"Moshe Shemesh" <moshe@...dia.com>, "Will Deacon" <will@...nel.org>,
"Alexander Gordeev" <agordeev@...ux.ibm.com>,
"Andrew Morton" <akpm@...ux-foundation.org>,
"Christian Borntraeger" <borntraeger@...ux.ibm.com>,
"Borislav Petkov" <bp@...en8.de>,
"Dave Hansen" <dave.hansen@...ux.intel.com>,
"Gerald Schaefer" <gerald.schaefer@...ux.ibm.com>,
"Vasily Gorbik" <gor@...ux.ibm.com>,
"Heiko Carstens" <hca@...ux.ibm.com>, "H. Peter Anvin" <hpa@...or.com>,
"Justin Stitt" <justinstitt@...gle.com>, linux-s390@...r.kernel.org,
llvm@...ts.linux.dev, "Ingo Molnar" <mingo@...hat.com>,
"Bill Wendling" <morbo@...gle.com>,
"Nathan Chancellor" <nathan@...nel.org>,
"Nick Desaulniers" <ndesaulniers@...gle.com>,
"Salil Mehta" <salil.mehta@...wei.com>,
"Sven Schnelle" <svens@...ux.ibm.com>,
"Thomas Gleixner" <tglx@...utronix.de>, x86@...nel.org,
"Yisen Zhuang" <yisen.zhuang@...wei.com>,
"Leon Romanovsky" <leonro@...lanox.com>,
Linux-Arch <linux-arch@...r.kernel.org>,
linux-arm-kernel@...ts.infradead.org,
"Mark Rutland" <mark.rutland@....com>,
"Michael Guralnik" <michaelgur@...lanox.com>, patches@...ts.linux.dev,
"Niklas Schnelle" <schnelle@...ux.ibm.com>,
"Jijie Shao" <shaojijie@...wei.com>, "Simon Horman" <horms@...nel.org>
Subject: Re: [PATCH net-next V5] net/mlx5: Improve write-combining test reliability for
ARM64 Grace CPUs
On Thu, Sep 25, 2025, at 14:21, Jason Gunthorpe wrote:
> On Thu, Sep 25, 2025 at 03:15:46PM +0300, Patrisious Haddad wrote:
>>
>> On 9/25/2025 2:54 PM, Jason Gunthorpe wrote:
>> > On Thu, Sep 25, 2025 at 02:48:33PM +0300, Tariq Toukan wrote:
>> > > +static void mlx5_iowrite64_copy(struct mlx5_wc_sq *sq, __be32 mmio_wqe[16],
>> > > + size_t mmio_wqe_size, unsigned int offset)
>> > > +{
>> > > +#if defined(CONFIG_KERNEL_MODE_NEON) && defined(CONFIG_ARM64)
>> > IS_ENABLED() not defined()
>> I just wonder why, Is there a preference in the driver from like
>> aesthetic/convention point of view?
>> Since here it technically doesnt matter - IS_ENABLED have no functional
>> difference from defined since these are boolean configs not *tristate*ones
>> (cant be loaded as module).
>
> I think it is an aesthetic convention to avoid defined(CONFIG_*) as
> the reasoning it is not tristate is a bit tricky.
In my impression there is no general agreement on this, I would
probably have picked defined() here myself but don't mind the
IS_ENABLED() variant either.
On the other hand, I would in general strongly prefer
if (IS_ENABLED(CONFIG_FOO)) {
...
}
over any of the preprocessor conditionals, both for readability
and for improving compile-time coverage of the conditional code.
Unfortunately that does not work here because kernel_neon_begin()
etc are only defined on Arm.
Arnd
Powered by blists - more mailing lists