Thread (6 messages) 6 messages, 5 authors, 2025-09-25

Re: [PATCH net-next V5] net/mlx5: Improve write-combining test reliability for ARM64 Grace CPUs

From: "Arnd Bergmann" <arnd@arndb.de>
Date: 2025-09-25 13:06:25
Also in: linux-arch, linux-patches, linux-rdma, linux-s390, lkml, llvm

On Thu, Sep 25, 2025, at 14:21, Jason Gunthorpe wrote:
On Thu, Sep 25, 2025 at 03:15:46PM +0300, Patrisious Haddad wrote:
quoted
On 9/25/2025 2:54 PM, Jason Gunthorpe wrote:
quoted
On Thu, Sep 25, 2025 at 02:48:33PM +0300, Tariq Toukan wrote:
quoted
+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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help