Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1741173

Re: [PATCH] sparc: Provide cmpxchg64 for 32-bit builds

From David Miller <davem@davemloft.net>
Newsgroups linux.kernel
Subject Re: [PATCH] sparc: Provide cmpxchg64 for 32-bit builds
Date 2017-09-28 06:40 +0200
Message-ID <uuyM9-4cw-9@gated-at.bofh.it> (permalink)
References <utj2O-391-15@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


From: Guenter Roeck <linux@roeck-us.net>
Date: Sun, 24 Sep 2017 10:29:31 -0700

> Fix the following build error, seen when building sparc32:allmodconfig.
> 
> drivers/net/ethernet/intel/i40e/i40e_ethtool.c:
> 	In function 'i40e_set_priv_flags':
> drivers/net/ethernet/intel/i40e/i40e_ethtool.c:4150:2: error:
> 	implicit declaration of function 'cmpxchg64'
> 
> Signed-off-by: Guenter Roeck <linux@roeck-us.net>

That fixes the build:

> @@ -72,5 +72,6 @@ __cmpxchg(volatile void *ptr, unsigned long old, unsigned long new_, int size)
>  	((__typeof__(*(ptr)))__cmpxchg_local_generic((ptr), (unsigned long)(o),\
>  			(unsigned long)(n), sizeof(*(ptr))))
>  #define cmpxchg64_local(ptr, o, n) __cmpxchg64_local_generic((ptr), (o), (n))
> +#define cmpxchg64(ptr, o, n)	cmpxchg64_local((ptr), (o), (n))
>  
>  #endif /* __ARCH_SPARC_CMPXCHG__ */

but it's wrong.  cmpxchg64_local() is only atomic on the current cpu
so using it for plain cmpxchg64() is not going to work.

Back to linux.kernel | Previous | NextNext in thread | Find similar | Unroll thread


Thread

Re: [PATCH] sparc: Provide cmpxchg64 for 32-bit builds David Miller <davem@davemloft.net> - 2017-09-28 06:40 +0200
  Re: [PATCH] sparc: Provide cmpxchg64 for 32-bit builds Guenter Roeck <linux@roeck-us.net> - 2017-09-28 07:00 +0200
    Re: [PATCH] sparc: Provide cmpxchg64 for 32-bit builds David Miller <davem@davemloft.net> - 2017-09-28 07:30 +0200

csiph-web