Skip to contentSkip to conversation

Build failures in -next due to 'locking/atomic, arch/arc: Implement atomic_fetch_{add,sub,and,andnot,or,xor}()'

DISCUSSION Guenter Roeck 5 participants 21 messages Jun 17, 2016 – Jun 22, 2016

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

Hi Peter,

I am seeing build failures in -next when trying to build arc / arcv2 targets.

arch/arc/include/asm/atomic.h:74:2: error: ?SCOND_FAIL_RETRY_VAR_DEF? undeclared arch/arc/include/asm/atomic.h:87:2: error: expected ?:? or ?)? before ?SCOND_FAIL_RETRY_ASM?

Problems seem to be caused by 'locking/atomic, arch/arc: Implement atomic_fetch_{add,sub,and,andnot,or,xor}()'. Both SCOND_FAIL_RETRY_VAR_DEF and SCOND_FAIL_RETRY_ASM are undefined.

Guenter

maintainer
#1 lore raw
Quoted 10 lines · Guenter Roeck

Hi Peter,

I am seeing build failures in -next when trying to build arc / arcv2 targets.

arch/arc/include/asm/atomic.h:74:2: error: ?SCOND_FAIL_RETRY_VAR_DEF? undeclared arch/arc/include/asm/atomic.h:87:2: error: expected ?:? or ?)? before ?SCOND_FAIL_RETRY_ASM?

Problems seem to be caused by 'locking/atomic, arch/arc: Implement atomic_fetch_{add,sub,and,andnot,or,xor}()'. Both SCOND_FAIL_RETRY_VAR_DEF and SCOND_FAIL_RETRY_ASM are undefined.

Crud, I messed up the rebase against the backoff reverts. Lemme go do fixups.

maintainer
#2 lore raw
Quoted 8 lines · Peter Zijlstra
Quoted 7 lines · Guenter Roeck

Hi Peter,

I am seeing build failures in -next when trying to build arc / arcv2 targets.

arch/arc/include/asm/atomic.h:74:2: error: ?SCOND_FAIL_RETRY_VAR_DEF? undeclared arch/arc/include/asm/atomic.h:87:2: error: expected ?:? or ?)? before ?SCOND_FAIL_RETRY_ASM?

Quoted 6 lines
Quoted 3 lines

Problems seem to be caused by 'locking/atomic, arch/arc: Implement atomic_fetch_{add,sub,and,andnot,or,xor}()'. Both SCOND_FAIL_RETRY_VAR_DEF and SCOND_FAIL_RETRY_ASM are undefined.

Crud, I messed up the rebase against the backoff reverts. Lemme go do fixups.

I've misplaced my arc compiler, but does this make it go again?

---
 arch/arc/include/asm/atomic.h | 8 --------
 1 file changed, 8 deletions(-)
arch/arc/include/asm/atomic.h +0 -8
index bd9c51cb2bfd..4e3c1b6b0806 100644
@@ -71,7 +71,6 @@ static inline int atomic_##op##_return(int i, atomic_t *v)		\
 static inline int atomic_fetch_##op(int i, atomic_t *v)			\
 {									\
 	unsigned int val, orig;						\
-	SCOND_FAIL_RETRY_VAR_DEF                                        \
 									\
 	/*								\
 	 * Explicit full memory barrier needed before/after as		\
@@ -84,11 +83,8 @@ static inline int atomic_fetch_##op(int i, atomic_t *v)			\
 	"	" #asm_op " %[val], %[orig], %[i]	\n"		\
 	"	scond   %[val], [%[ctr]]		\n"		\
 	"						\n"		\
-	SCOND_FAIL_RETRY_ASM						\
-									\
 	: [val]	"=&r"	(val),						\
 	  [orig] "=&r" (orig)						\
-	  SCOND_FAIL_RETRY_VARS						\
 	: [ctr]	"r"	(&v->counter),					\
 	  [i]	"ir"	(i)						\
 	: "cc");							\
@@ -199,10 +195,6 @@ ATOMIC_OPS(andnot, &= ~, bic)
 ATOMIC_OPS(or, |=, or)
 ATOMIC_OPS(xor, ^=, xor)
 
-#undef SCOND_FAIL_RETRY_VAR_DEF
-#undef SCOND_FAIL_RETRY_ASM
-#undef SCOND_FAIL_RETRY_VARS
-
 #else /* CONFIG_ARC_PLAT_EZNPS */
 
 static inline int atomic_read(const atomic_t *v)
#3 lore raw
Quoted 9 lines · Peter Zijlstra
Quoted 8 lines · Peter Zijlstra
Quoted 7 lines · Guenter Roeck

Hi Peter,

I am seeing build failures in -next when trying to build arc / arcv2 targets.

arch/arc/include/asm/atomic.h:74:2: error: ?SCOND_FAIL_RETRY_VAR_DEF? undeclared arch/arc/include/asm/atomic.h:87:2: error: expected ?:? or ?)? before ?SCOND_FAIL_RETRY_ASM?

Quoted 9 lines
Quoted 6 lines
Quoted 3 lines

Problems seem to be caused by 'locking/atomic, arch/arc: Implement atomic_fetch_{add,sub,and,andnot,or,xor}()'. Both SCOND_FAIL_RETRY_VAR_DEF and SCOND_FAIL_RETRY_ASM are undefined.

Crud, I messed up the rebase against the backoff reverts. Lemme go do fixups.

I've misplaced my arc compiler, but does this make it go again?

Looks like it, yes. Build still fails for another reason, but this problem is gone. I can not do any runtime tests, though, only build tests.

Guenter

Quoted 41 lines
---
  arch/arc/include/asm/atomic.h | 8 --------
  1 file changed, 8 deletions(-)
arch/arc/include/asm/atomic.h +0 -8
index bd9c51cb2bfd..4e3c1b6b0806 100644
@@ -71,7 +71,6 @@ static inline int atomic_##op##_return(int i, atomic_t *v)		\
  static inline int atomic_fetch_##op(int i, atomic_t *v)			\
  {									\
  	unsigned int val, orig;						\
-	SCOND_FAIL_RETRY_VAR_DEF                                        \
  									\
  	/*								\
  	 * Explicit full memory barrier needed before/after as		\
@@ -84,11 +83,8 @@ static inline int atomic_fetch_##op(int i, atomic_t *v)			\
  	"	" #asm_op " %[val], %[orig], %[i]	\n"		\
  	"	scond   %[val], [%[ctr]]		\n"		\
  	"						\n"		\
-	SCOND_FAIL_RETRY_ASM						\
-									\
  	: [val]	"=&r"	(val),						\
  	  [orig] "=&r" (orig)						\
-	  SCOND_FAIL_RETRY_VARS						\
  	: [ctr]	"r"	(&v->counter),					\
  	  [i]	"ir"	(i)						\
  	: "cc");							\
@@ -199,10 +195,6 @@ ATOMIC_OPS(andnot, &= ~, bic)
  ATOMIC_OPS(or, |=, or)
  ATOMIC_OPS(xor, ^=, xor)
 
-#undef SCOND_FAIL_RETRY_VAR_DEF
-#undef SCOND_FAIL_RETRY_ASM
-#undef SCOND_FAIL_RETRY_VARS
-
  #else /* CONFIG_ARC_PLAT_EZNPS */
 
  static inline int atomic_read(const atomic_t *v)
#4 lore raw
Quoted 9 lines · Guenter Roeck
Quoted 5 lines
Quoted 2 lines

Crud, I messed up the rebase against the backoff reverts. Lemme go do fixups.

I've misplaced my arc compiler, but does this make it go again?

Looks like it, yes. Build still fails for another reason, but this problem is gone. I can not do any runtime tests, though, only build tests.

Guenter

We can do that once Peter adjusts his patch !

-Vineet

maintainer
#5 lore raw

Question; why does atomic_read() have a full memory clobber on arc?

Will thinks its because you don't use a memory constraint for *v.

#6 lore raw
Quoted 3 lines · Peter Zijlstra

Question; why does atomic_read() have a full memory clobber on arc?

Will thinks its because you don't use a memory constraint for *v.

So that is only for CONFIG_ARC_PLAT_EZNPS and very liekly not needed. Although NPS has some design constraints which Noam knows of better !

#7 lore raw
In reply to Peter Zijlstra
Quoted 9 lines · Peter Zijlstra
Quoted 8 lines · Peter Zijlstra
Quoted 7 lines · Guenter Roeck

Hi Peter,

I am seeing build failures in -next when trying to build arc / arcv2 targets.

arch/arc/include/asm/atomic.h:74:2: error: ?SCOND_FAIL_RETRY_VAR_DEF? undeclared arch/arc/include/asm/atomic.h:87:2: error: expected ?:? or ?)? before ?SCOND_FAIL_RETRY_ASM?

Quoted 8 lines
Quoted 6 lines
Quoted 3 lines

Problems seem to be caused by 'locking/atomic, arch/arc: Implement atomic_fetch_{add,sub,and,andnot,or,xor}()'. Both SCOND_FAIL_RETRY_VAR_DEF and SCOND_FAIL_RETRY_ASM are undefined.

Crud, I messed up the rebase against the backoff reverts. Lemme go do fixups.

I've misplaced my arc compiler, but does this make it go again?

There's no arc compiler on korg's cross-building directory.

Thanks,

Ingo

maintainer
#8 lore raw
Quoted 1 line · Ingo Molnar

There's no arc compiler on korg's cross-building directory.

I always build my own cross compiler set, but it looks like the last time I build a set ARC didn't build.

This frequently happens (that a number of archs fail to build that is).

#9 lore raw
In reply to Ingo Molnar
Quoted 2 lines · Ingo Molnar
Quoted 1 line

I've misplaced my arc compiler, but does this make it go again?

There's no arc compiler on korg's cross-building directory.

Yeah, I'd requested that a few times...

However we do have ARC kernels building at atleast 2 places
1. Guenther's build service which sent this error report
2. kisskb build by Michale Ellerman

Although I don't know if it is possible to download cross tools from either of above.

@Peter, upstream buildroot allows you to build toolchain for ARC ! Trust me it does build :-)

#10 lore raw
Quoted 4 lines · Vineet Gupta
Quoted 2 lines · Ingo Molnar
Quoted 1 line

I've misplaced my arc compiler, but does this make it go again?

There's no arc compiler on korg's cross-building directory.

Quoted 8 lines

Yeah, I'd requested that a few times...

However we do have ARC kernels building at atleast 2 places
1. Guenther's build service which sent this error report
2. kisskb build by Michale Ellerman

Although I don't know if it is possible to download cross tools from either of above.

Unfortunately no for mine. I tried to put the toolchains I use on github, but the images are too large, and I hit the github repository size limit.

Guenter

maintainer
#11 lore raw
In reply to Vineet Gupta
Quoted 6 lines · Vineet Gupta
Quoted 2 lines · Ingo Molnar
Quoted 1 line

I've misplaced my arc compiler, but does this make it go again?

There's no arc compiler on korg's cross-building directory.

Yeah, I'd requested that a few times...

Quoted 8 lines

However we do have ARC kernels building at atleast 2 places
1. Guenther's build service which sent this error report
2. kisskb build by Michale Ellerman

Although I don't know if it is possible to download cross tools from either of above.

@Peter, upstream buildroot allows you to build toolchain for ARC ! Trust me it does build :-)

I use segher's buildall script.

buildroot doesn't look useful. I seems to build to only build one target at a time, and build a crapload of cross-userspace, I just want a compiler. And I'm most certainly not going to build the compilers one by one.

The buildall script I put to work and after about an hour I have however many of the 20+ targets that build with gcc.git and binutils.git cross compilers.

maintainer
#12 lore raw

cross compilers [was build failure of sorts]

Quoted 6 lines · Peter Zijlstra

I use segher's buildall script.

The buildall script I put to work and after about an hour I have however many of the 20+ targets that build with gcc.git and binutils.git cross compilers.

Like the below...

(the native ones worked after I upgraded a lib and installed 32bit libs because it wanted to build a multilib version)

As you can see, arc doesn't even build upstream binutils :/ (binutils-2_26-branch as of today).

/usr/local/src/buildall# time ./buildall --toolchain ================== Primary platforms ========================= Building arm... (target arm-linux-gnueabi)
binutils: configure [00:03] build [01:25] install [00:08]

       gcc: configure [00:04] build [01:14] install [00:12]
  OK
Building i386... (target i386-linux)
  binutils: configure [00:03] build [01:23] install [00:08]
       gcc: configure [00:03] build [01:22]  FAILED
Building mips... (target mips-linux)
  binutils: configure [00:05] build [01:26] install [00:08]
       gcc: configure [00:04] build [01:26] install [00:11]
  OK
Building mips64... (target mips64-linux)
  binutils: configure [00:03] build [01:29] install [00:07]
       gcc: configure [00:04] build [01:28] install [00:15]
  OK
Building powerpc... (target powerpc-linux)
  binutils: configure [00:03] build [01:36] install [00:07]
       gcc: configure [00:04] build [01:27] install [00:09]
  OK
Building powerpc64... (target powerpc64-linux)
  binutils: configure [00:03] build [01:37] install [00:08]
       gcc: configure [00:04] build [01:26] install [00:09]
  OK
Building sparc... (target sparc-linux)
  binutils: configure [00:03] build [01:21] install [00:08]
       gcc: configure [00:03] build [01:13] install [00:09]
  OK
Building sparc64... (target sparc64-linux)
  binutils: configure [00:03] build [01:23] install [00:08]
       gcc: configure [00:04] build [01:13] install [00:08]
  OK
Building x86_64... (target x86_64-linux)
  binutils: configure [00:03] build [02:16] install [00:09]
       gcc: configure [00:04]  FAILED
================== Secondary platforms =======================
Building arm64... (target aarch64-linux)
  binutils: configure [00:03] build [01:23] install [00:08]
       gcc: configure [00:04] build [01:12] install [00:20]
  OK
Building s390... (target s390-linux)
  binutils: configure [00:03] build [01:24] install [00:07]
       gcc: configure [00:04] build [02:03] install [00:09]

OK
================== Tertiary platforms ======================== Building alpha... (target alpha-linux)
binutils: configure [00:03] build [01:23] install [00:08]

       gcc: configure [00:04] build [01:10] install [00:08]

OK
Building arc... (target arc-elf)
binutils: configure [00:04] build [00:57] FAILED
Building blackfin... (target bfin-uclinux)
binutils: configure [00:02] build [01:27] install [00:08]

       gcc: configure [00:04] build [01:37] install [00:08]
  OK
Building c6x... (target c6x-elf)
  binutils: configure [00:03] build [01:24] install [00:07]
       gcc: configure [00:04] build [01:39]  FAILED
Building cris... (target cris-linux)
  binutils: configure [00:03] build [01:28] install [00:07]
       gcc: configure [00:04] build [01:11] install [00:09]
  OK
Building frv... (target frv-linux)
  binutils: configure [00:03] build [01:32] install [00:08]
       gcc: configure [00:04] build [01:10] install [00:10]
  OK
Building h8300... (target h8300-linux)
  binutils: configure [00:03] build [01:26] install [00:07]
       gcc: configure [00:04] build [01:17] install [00:09]
  OK
Building ia64... (target ia64-linux)
  binutils: configure [00:03] build [01:23] install [00:07]
       gcc: configure [00:04] build [01:10] install [00:08]

OK
Building m32r... (target m32r-linux)
binutils: configure [00:03] build [01:18] FAILED
Building m68k... (target m68k-linux)
binutils: configure [00:03] build [01:24] install [00:07]

       gcc: configure [00:04] build [01:17] install [00:09]
  OK
Building mn10300... (target am33_2.0-linux)
  binutils: configure [00:03] build [01:22] install [00:08]
       gcc: configure [00:04] build [01:08] install [00:08]
  OK
Building nios2... (target nios2-linux)
  binutils: configure [00:05] build [01:23] install [00:07]
       gcc: configure [00:05] build [01:10] install [00:08]
  OK
Building parisc... (target hppa-linux)
  binutils: configure [00:04] build [01:26] install [00:07]
       gcc: configure [00:04] build [01:12] install [00:08]
  OK
Building parisc64... (target hppa64-linux)
  binutils: configure [00:03] build [01:24] install [00:07]
       gcc: configure [00:05] build [01:11] install [00:08]
  OK
Building sh... (target sh4-linux)
  binutils: configure [00:04] build [01:27] install [00:07]
       gcc: configure [00:05] build [01:09] install [00:09]
  OK
Building shnommu... (target sh2-linux)
  binutils: configure [00:03] build [01:27] install [00:08]
       gcc: configure [00:04] build [01:15] install [00:08]

OK
Building sh64... (target sh64-linux)
binutils: configure [00:03] build [01:17] FAILED
Building tile... (target tilegx-linux)
binutils: configure [00:03] build [01:24] install [00:07]

       gcc: configure [00:04] build [01:32] install [00:09]
  OK
Building xtensa... (target xtensa-linux)
  binutils: configure [00:03] build [01:27] install [00:07]
       gcc: configure [00:05] build [01:09] install [00:08]

OK
================== Imaginary platforms ======================= Building microblaze... (target microblaze-linux)
binutils: configure [00:03] build [01:25] install [00:07]

       gcc: configure [00:05] build [01:27] install [00:09]

OK

real    91m18.406s
user    376m21.856s
sys     50m34.916s
#13 lore raw

Re: cross compilers [was build failure of sorts]

Quoted 2 lines · Peter Zijlstra

As you can see, arc doesn't even build upstream binutils :/ (binutils-2_26-branch as of today).

Hmm - we are still in fight w.r.t. upstreaming gcc fully (ARCv2 gcc support) although ARCompact has been there for some time. binutils upstream should work - I'll check why the buildall stuff fails.

We currently have our tools on github but presume that won't work for you due to non canonical location / version !

-Vineet

maintainer
#14 lore raw

Re: cross compilers [was build failure of sorts]

Quoted 7 lines · Vineet Gupta
Quoted 2 lines · Peter Zijlstra

As you can see, arc doesn't even build upstream binutils :/ (binutils-2_26-branch as of today).

Hmm - we are still in fight w.r.t. upstreaming gcc fully (ARCv2 gcc support) although ARCompact has been there for some time. binutils upstream should work - I'll check why the buildall stuff fails.

I can run that build again and send you the resulting log files in private.

Quoted 2 lines

We currently have our tools on github but presume that won't work for you due to non canonical location / version !

Right, I have binutils and gcc git, I update those, checkout the latest 'stable' branches and run buildall.

And I do this maybe once or twice a year, mostly when I really need a newer compiler -- this time I needed GCC-6 (I have 6.1.1 now) in order to play with new inline asm bits.

Anything that fails, doesn't get compile coverage on my machines (although the 0day built bot does catch some of the fallout).

#15 lore raw

Re: cross compilers [was build failure of sorts]

Quoted 10 lines · Peter Zijlstra
Quoted 7 lines · Vineet Gupta
Quoted 7 lines · Peter Zijlstra
Quoted 2 lines
Quoted 2 lines

As you can see, arc doesn't even build upstream binutils :/ (binutils-2_26-branch as of today).

Hmm - we are still in fight w.r.t. upstreaming gcc fully (ARCv2 gcc support) although ARCompact has been there for some time. binutils upstream should work - I'll check why the buildall stuff fails.

I can run that build again and send you the resulting log files in private.

Thx for the off-list log. The issue is gdb not yet upstream. So it seems we will have to wait for things on upstreaming to settle down before I can formally update segher's scripts to support ARC.

-Vineet

maintainer
#16 lore raw

Re: cross compilers [was build failure of sorts]

Quoted 9 lines · Vineet Gupta
Quoted 8 lines · Peter Zijlstra
Quoted 7 lines · Vineet Gupta
Quoted 7 lines · Peter Zijlstra
Quoted 2 lines
Quoted 2 lines

As you can see, arc doesn't even build upstream binutils :/ (binutils-2_26-branch as of today).

Hmm - we are still in fight w.r.t. upstreaming gcc fully (ARCv2 gcc support) although ARCompact has been there for some time. binutils upstream should work - I'll check why the buildall stuff fails.

Quoted 6 lines
Quoted 2 lines

I can run that build again and send you the resulting log files in private.

Thx for the off-list log. The issue is gdb not yet upstream. So it seems we will have to wait for things on upstreaming to settle down before I can formally update segher's scripts to support ARC.

Ah, lemme add --disable-gdb to the binutils build.

Should arc-*-* list gdb in their noconfigdirs like many other archs do too?

#17 lore raw

Re: cross compilers [was build failure of sorts]

Quoted 10 lines · Peter Zijlstra
Quoted 9 lines · Vineet Gupta
Quoted 8 lines · Peter Zijlstra
Quoted 7 lines · Vineet Gupta
Quoted 7 lines · Peter Zijlstra
Quoted 2 lines
Quoted 2 lines

As you can see, arc doesn't even build upstream binutils :/ (binutils-2_26-branch as of today).

Hmm - we are still in fight w.r.t. upstreaming gcc fully (ARCv2 gcc support) although ARCompact has been there for some time. binutils upstream should work - I'll check why the buildall stuff fails.

Quoted 8 lines
Quoted 6 lines
Quoted 2 lines

I can run that build again and send you the resulting log files in private.

Thx for the off-list log. The issue is gdb not yet upstream. So it seems we will have to wait for things on upstreaming to settle down before I can formally update segher's scripts to support ARC.

Ah, lemme add --disable-gdb to the binutils build.

Right - that works around gdb, but gcc upstream still has partial support for ARCv2 with patches being reviewed very sloooowly by the old ARC port maintainer. You could give it a try though !

Quoted 2 lines

Should arc-*-* list gdb in their noconfigdirs like many other archs do too?

Yeah indeed that chould be done while gdb upstream is waiting. @Anton can we do that - update binutils/configure.ac to not configure gdb for ARC.

maintainer
#18 lore raw

Re: cross compilers [was build failure of sorts]

In reply to Peter Zijlstra
Quoted 2 lines · Peter Zijlstra

Should arc-*-* list gdb in their noconfigdirs like many other archs do too?

Something like so I suppose.

---
 configure.ac |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
configure.ac +2 -1
index 4977d97..464eab5 100644
@@ -1088,8 +1088,9 @@ case "${target}" in
   sh*-*-pe|mips*-*-pe|*arm-wince-pe)
     noconfigdirs="$noconfigdirs tcl tk itcl libgui sim"
     ;;
+    # The arc target doesn't support gdb yet.
   arc-*-*|arceb-*-*)
-    noconfigdirs="$noconfigdirs target-libgloss"
+    noconfigdirs="$noconfigdirs gdb target-libgloss"
     ;;
   arm-*-pe*)
     noconfigdirs="$noconfigdirs target-libgloss"
#19 lore raw
In reply to Peter Zijlstra
Quoted 9 lines · Peter Zijlstra
Quoted 8 lines · Peter Zijlstra
Quoted 7 lines · Guenter Roeck

Hi Peter,

I am seeing build failures in -next when trying to build arc / arcv2 targets.

arch/arc/include/asm/atomic.h:74:2: error: ?SCOND_FAIL_RETRY_VAR_DEF? undeclared arch/arc/include/asm/atomic.h:87:2: error: expected ?:? or ?)? before ?SCOND_FAIL_RETRY_ASM?

Quoted 8 lines
Quoted 6 lines
Quoted 3 lines

Problems seem to be caused by 'locking/atomic, arch/arc: Implement atomic_fetch_{add,sub,and,andnot,or,xor}()'. Both SCOND_FAIL_RETRY_VAR_DEF and SCOND_FAIL_RETRY_ASM are undefined.

Crud, I messed up the rebase against the backoff reverts. Lemme go do fixups.

I've misplaced my arc compiler, but does this make it go again?

Peter the fixlet below doesn't show up in linux-next yet. Could you please do that soon. Our internal build lords are yelling at me :-)

To keep things bisectable, it would be desirable to squash this with the orig commit !

Quoted 47 lines

---
 arch/arc/include/asm/atomic.h | 8 --------
 1 file changed, 8 deletions(-)
arch/arc/include/asm/atomic.h +0 -8
index bd9c51cb2bfd..4e3c1b6b0806 100644
@@ -71,7 +71,6 @@ static inline int atomic_##op##_return(int i, atomic_t *v)		\
 static inline int atomic_fetch_##op(int i, atomic_t *v)			\
 {									\
 	unsigned int val, orig;						\
-	SCOND_FAIL_RETRY_VAR_DEF                                        \
 									\
 	/*								\
 	 * Explicit full memory barrier needed before/after as		\
@@ -84,11 +83,8 @@ static inline int atomic_fetch_##op(int i, atomic_t *v)			\
 	"	" #asm_op " %[val], %[orig], %[i]	\n"		\
 	"	scond   %[val], [%[ctr]]		\n"		\
 	"						\n"		\
-	SCOND_FAIL_RETRY_ASM						\
-									\
 	: [val]	"=&r"	(val),						\
 	  [orig] "=&r" (orig)						\
-	  SCOND_FAIL_RETRY_VARS						\
 	: [ctr]	"r"	(&v->counter),					\
 	  [i]	"ir"	(i)						\
 	: "cc");							\
@@ -199,10 +195,6 @@ ATOMIC_OPS(andnot, &= ~, bic)
 ATOMIC_OPS(or, |=, or)
 ATOMIC_OPS(xor, ^=, xor)
 
-#undef SCOND_FAIL_RETRY_VAR_DEF
-#undef SCOND_FAIL_RETRY_ASM
-#undef SCOND_FAIL_RETRY_VARS
-
 #else /* CONFIG_ARC_PLAT_EZNPS */
 
 static inline int atomic_read(const atomic_t *v)

_______________________________________________
linux-snps-arc mailing list
linux-snps-arc at lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-snps-arc

maintainer
#20 lore raw
Quoted 5 lines · Vineet Gupta

Peter the fixlet below doesn't show up in linux-next yet. Could you please do that soon. Our internal build lords are yelling at me :-)

To keep things bisectable, it would be desirable to squash this with the orig commit !

The fix seems to be in tip/locking/arch-atomic, albeit not squashed.

Ingo?

if you're going to rebase that branch, I have one more fix for tilepro, so let me know.

Quoted 39 lines
Quoted 39 lines
---
 arch/arc/include/asm/atomic.h | 8 --------
 1 file changed, 8 deletions(-)
arch/arc/include/asm/atomic.h +0 -8
index bd9c51cb2bfd..4e3c1b6b0806 100644
@@ -71,7 +71,6 @@ static inline int atomic_##op##_return(int i, atomic_t *v)		\
 static inline int atomic_fetch_##op(int i, atomic_t *v)			\
 {									\
 	unsigned int val, orig;						\
-	SCOND_FAIL_RETRY_VAR_DEF                                        \
 									\
 	/*								\
 	 * Explicit full memory barrier needed before/after as		\
@@ -84,11 +83,8 @@ static inline int atomic_fetch_##op(int i, atomic_t *v)			\
 	"	" #asm_op " %[val], %[orig], %[i]	\n"		\
 	"	scond   %[val], [%[ctr]]		\n"		\
 	"						\n"		\
-	SCOND_FAIL_RETRY_ASM						\
-									\
 	: [val]	"=&r"	(val),						\
 	  [orig] "=&r" (orig)						\
-	  SCOND_FAIL_RETRY_VARS						\
 	: [ctr]	"r"	(&v->counter),					\
 	  [i]	"ir"	(i)						\
 	: "cc");							\
@@ -199,10 +195,6 @@ ATOMIC_OPS(andnot, &= ~, bic)
 ATOMIC_OPS(or, |=, or)
 ATOMIC_OPS(xor, ^=, xor)
 
-#undef SCOND_FAIL_RETRY_VAR_DEF
-#undef SCOND_FAIL_RETRY_ASM
-#undef SCOND_FAIL_RETRY_VARS
-
 #else /* CONFIG_ARC_PLAT_EZNPS */
 
 static inline int atomic_read(const atomic_t *v)