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

- From: Jason Gunthorpe \<jgg@nvidia.com\>
- Date: 2025-09-15 22:48:17 
- List: netdev
- Page: https://ratatoskr.run/netdev/2025/09/3217498
- Thread: https://ratatoskr.run/netdev/2025/09/3216134/t.md

```text
On Mon, Sep 15, 2025 at 03:27:58PM -0700, Nathan Chancellor wrote:
> On Mon, Sep 15, 2025 at 03:18:59PM -0700, Nathan Chancellor wrote:
> > On Mon, Sep 15, 2025 at 11:35:08AM +0300, Tariq Toukan wrote:
> > ...
> > > diff --git a/drivers/net/ethernet/mellanox/mlx5/core/Makefile b/drivers/net/ethernet/mellanox/mlx5/core/Makefile
> > > index d77696f46eb5..06d0eb190816 100644
> > > --- a/drivers/net/ethernet/mellanox/mlx5/core/Makefile
> > > +++ b/drivers/net/ethernet/mellanox/mlx5/core/Makefile
> > > @@ -176,3 +176,9 @@ mlx5_core-$(CONFIG_PCIE_TPH) += lib/st.o
> > >  
> > >  obj-$(CONFIG_MLX5_DPLL) += mlx5_dpll.o
> > >  mlx5_dpll-y :=	dpll.o
> > > +
> > > +#
> > > +# NEON WC specific for mlx5
> > > +#
> > > +mlx5_core-$(CONFIG_KERNEL_MODE_NEON) += lib/wc_neon_iowrite64_copy.o
> > > +FLAGS_lib/wc_neon_iowrite64_copy.o += $(CC_FLAGS_FPU)
> > 
> > Does this work as is? I think this needs to be CFLAGS instead of FLAGS
> > but I did not test to verify.
> 
> Also, Documentation/core-api/floating-point.rst states that code should
> also use CFLAGS_REMOVE_ for CC_FLAGS_NO_FPU as well as adding
> CC_FLAGS_FPU.
> 
>   CFLAGS_REMOVE_lib/wc_neon_iowrite64_copy.o += $(CC_FLAGS_NO_FPU)

I wondered if you needed the seperate compilation unit at all since it
it all done with inline assembly.. Since the makefile seems to have a
typo, it suggests you don't need the compilation unit and it could
just be a little inline protected by CONFIG_KERNEL_MODE_NEON.

Jason
```
