patches.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
From: Patrisious Haddad <phaddad@nvidia.com>
To: Arnd Bergmann <arnd@arndb.de>,
	Nathan Chancellor <nathan@kernel.org>,
	Jason Gunthorpe <jgg@nvidia.com>
Cc: Tariq Toukan <tariqt@nvidia.com>,
	Catalin Marinas <catalin.marinas@arm.com>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	Andrew Lunn <andrew+netdev@lunn.ch>,
	"David S . Miller" <davem@davemloft.net>,
	Saeed Mahameed <saeedm@nvidia.com>,
	Leon Romanovsky <leon@kernel.org>, Mark Bloch <mbloch@nvidia.com>,
	Sabrina Dubroca <sd@queasysnail.net>,
	Netdev <netdev@vger.kernel.org>,
	linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org,
	Gal Pressman <gal@nvidia.com>,
	Leon Romanovsky <leonro@nvidia.com>,
	Michael Guralnik <michaelgur@nvidia.com>,
	Moshe Shemesh <moshe@nvidia.com>, Will Deacon <will@kernel.org>,
	Alexander Gordeev <agordeev@linux.ibm.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	Christian Borntraeger <borntraeger@linux.ibm.com>,
	Borislav Petkov <bp@alien8.de>,
	Dave Hansen <dave.hansen@linux.intel.com>,
	Gerald Schaefer <gerald.schaefer@linux.ibm.com>,
	Vasily Gorbik <gor@linux.ibm.com>,
	Heiko Carstens <hca@linux.ibm.com>,
	"H. Peter Anvin" <hpa@zytor.com>,
	Justin Stitt <justinstitt@google.com>,
	linux-s390@vger.kernel.org, llvm@lists.linux.dev,
	Ingo Molnar <mingo@redhat.com>, Bill Wendling <morbo@google.com>,
	Nick Desaulniers <ndesaulniers@google.com>,
	Salil Mehta <salil.mehta@huawei.com>,
	Sven Schnelle <svens@linux.ibm.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	x86@kernel.org, Yisen Zhuang <yisen.zhuang@huawei.com>,
	Leon Romanovsky <leonro@mellanox.com>,
	Linux-Arch <linux-arch@vger.kernel.org>,
	linux-arm-kernel@lists.infradead.org,
	Mark Rutland <mark.rutland@arm.com>,
	Michael Guralnik <michaelgur@mellanox.com>,
	patches@lists.linux.dev, Niklas Schnelle <schnelle@linux.ibm.com>,
	Jijie Shao <shaojijie@huawei.com>
Subject: Re: [PATCH net-next V2] net/mlx5: Improve write-combining test reliability for ARM64 Grace CPUs
Date: Tue, 16 Sep 2025 12:47:17 +0300	[thread overview]
Message-ID: <0c61ff65-fdc7-43a3-a62b-75e0d76b95fd@nvidia.com> (raw)
In-Reply-To: <9d4cd8d2-343e-4448-ab59-65e69728c850@app.fastmail.com>


On 9/16/2025 11:58 AM, Arnd Bergmann wrote:
> External email: Use caution opening links or attachments
>
>
> On Tue, Sep 16, 2025, at 10:39, Patrisious Haddad wrote:
>> On 9/16/2025 2:15 AM, Nathan Chancellor wrote:
>>> External email: Use caution opening links or attachments
>> ifeq ($(ARCH),arm64)
>>           CFLAGS_lib/neon_iowrite64_copy.o += -ffreestanding
>>           CFLAGS_REMOVE_lib/neon_iowrite64_copy.o += -mgeneral-regs-only
>> endif
>>
>> Which is actually equivalent to the diff you sent, Thanks for the
>> heads-up will fix and resend.
>>
> I think it's better to handle this inside of the inline asm itself
> by adding
>
>        ".arch_extension simd;\n\t"
>
> at the start of it.

I don't get it why and how is that better - than using the correct CC 
flags for neon, also are you suggesting this in addition or instead of 
the CC flags fix natan sent above ?

Using the correct CC flags by itself is sufficient and correct - and I 
don't see other neon users using the ".arch_extension simd" you 
mentioned , so why do you think it is needed here ?

and I'm assuming you meant to add it like so? (incase it is really 
needed - I'm still not convinced it is ...)

diff --git 
a/drivers/net/ethernet/mellanox/mlx5/core/lib/wc_neon_iowrite64_copy.c 
b/drivers/net/ethernet/mellanox/mlx5/core/lib/wc_neon_iowrite64_copy.c
index 8c07d2040607..cde3d11909a8 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/lib/wc_neon_iowrite64_copy.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/lib/wc_neon_iowrite64_copy.c
@@ -6,7 +6,8 @@
  void mlx5_wc_neon_iowrite64_copy(void __iomem *to, const void *from)
  {
         asm volatile
-       ("ld1 {v0.16b, v1.16b, v2.16b, v3.16b}, [%0]\n\t"
+       (".arch_extension simd;\n\t"
+       "ld1 {v0.16b, v1.16b, v2.16b, v3.16b}, [%0]"
         "st1 {v0.16b, v1.16b, v2.16b, v3.16b}, [%1]"
         :
         : "r"(from), "r"(to)


Patrisious.

>
>       Arnd

  reply	other threads:[~2025-09-16  9:47 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-15  8:35 [PATCH net-next V2] net/mlx5: Improve write-combining test reliability for ARM64 Grace CPUs Tariq Toukan
2025-09-15 22:18 ` Nathan Chancellor
2025-09-15 22:27   ` Nathan Chancellor
2025-09-15 22:48     ` Jason Gunthorpe
2025-09-15 23:15       ` Nathan Chancellor
2025-09-16  8:39         ` Patrisious Haddad
2025-09-16  8:58           ` Arnd Bergmann
2025-09-16  9:47             ` Patrisious Haddad [this message]
2025-09-16 12:27               ` Jason Gunthorpe
2025-09-16 13:13                 ` Patrisious Haddad

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=0c61ff65-fdc7-43a3-a62b-75e0d76b95fd@nvidia.com \
    --to=phaddad@nvidia.com \
    --cc=agordeev@linux.ibm.com \
    --cc=akpm@linux-foundation.org \
    --cc=andrew+netdev@lunn.ch \
    --cc=arnd@arndb.de \
    --cc=borntraeger@linux.ibm.com \
    --cc=bp@alien8.de \
    --cc=catalin.marinas@arm.com \
    --cc=dave.hansen@linux.intel.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=gal@nvidia.com \
    --cc=gerald.schaefer@linux.ibm.com \
    --cc=gor@linux.ibm.com \
    --cc=hca@linux.ibm.com \
    --cc=hpa@zytor.com \
    --cc=jgg@nvidia.com \
    --cc=justinstitt@google.com \
    --cc=kuba@kernel.org \
    --cc=leon@kernel.org \
    --cc=leonro@mellanox.com \
    --cc=leonro@nvidia.com \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=linux-s390@vger.kernel.org \
    --cc=llvm@lists.linux.dev \
    --cc=mark.rutland@arm.com \
    --cc=mbloch@nvidia.com \
    --cc=michaelgur@mellanox.com \
    --cc=michaelgur@nvidia.com \
    --cc=mingo@redhat.com \
    --cc=morbo@google.com \
    --cc=moshe@nvidia.com \
    --cc=nathan@kernel.org \
    --cc=ndesaulniers@google.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=patches@lists.linux.dev \
    --cc=saeedm@nvidia.com \
    --cc=salil.mehta@huawei.com \
    --cc=schnelle@linux.ibm.com \
    --cc=sd@queasysnail.net \
    --cc=shaojijie@huawei.com \
    --cc=svens@linux.ibm.com \
    --cc=tariqt@nvidia.com \
    --cc=tglx@linutronix.de \
    --cc=will@kernel.org \
    --cc=x86@kernel.org \
    --cc=yisen.zhuang@huawei.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;
as well as URLs for NNTP newsgroup(s).