diff mbox

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

Message ID 20160617144136.GK30927@twins.programming.kicks-ass.net
State New
Headers show

Commit Message

Peter Zijlstra June 17, 2016, 2:41 p.m. UTC
On Fri, Jun 17, 2016 at 04:39:42PM +0200, Peter Zijlstra wrote:
> On Fri, Jun 17, 2016 at 07:36:56AM -0700, Guenter Roeck wrote:
> > 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.

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(-)

Comments

Guenter Roeck June 17, 2016, 2:52 p.m. UTC | #1
On 06/17/2016 07:41 AM, Peter Zijlstra wrote:
> On Fri, Jun 17, 2016 at 04:39:42PM +0200, Peter Zijlstra wrote:
>> On Fri, Jun 17, 2016 at 07:36:56AM -0700, Guenter Roeck wrote:
>>> 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.
>
> 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

>
> ---
>   arch/arc/include/asm/atomic.h | 8 --------
>   1 file changed, 8 deletions(-)
>
> diff --git a/arch/arc/include/asm/atomic.h b/arch/arc/include/asm/atomic.h
> index bd9c51cb2bfd..4e3c1b6b0806 100644
> --- a/arch/arc/include/asm/atomic.h
> +++ b/arch/arc/include/asm/atomic.h
> @@ -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)
>
Vineet Gupta June 17, 2016, 3 p.m. UTC | #2
On Friday 17 June 2016 04:52 PM, Guenter Roeck wrote:
>>> 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
Peter Zijlstra June 17, 2016, 3:22 p.m. UTC | #3
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.
Vineet Gupta June 17, 2016, 3:36 p.m. UTC | #4
On Friday 17 June 2016 05:22 PM, Peter Zijlstra wrote:
> 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 !
Ingo Molnar June 17, 2016, 4:04 p.m. UTC | #5
* Peter Zijlstra <peterz@infradead.org> wrote:

> On Fri, Jun 17, 2016 at 04:39:42PM +0200, Peter Zijlstra wrote:
> > On Fri, Jun 17, 2016 at 07:36:56AM -0700, Guenter Roeck wrote:
> > > 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.
> 
> 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
Peter Zijlstra June 17, 2016, 4:13 p.m. UTC | #6
On Fri, Jun 17, 2016 at 06:04:38PM +0200, Ingo Molnar wrote:

> 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).
Vineet Gupta June 17, 2016, 8:22 p.m. UTC | #7
On Friday 17 June 2016 06:04 PM, Ingo Molnar wrote:
>> 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 :-)
Guenter Roeck June 17, 2016, 9:27 p.m. UTC | #8
On Fri, Jun 17, 2016 at 10:22:46PM +0200, Vineet Gupta wrote:
> On Friday 17 June 2016 06:04 PM, Ingo Molnar wrote:
> >> 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.
> 
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
Peter Zijlstra June 18, 2016, 7:05 a.m. UTC | #9
On Fri, Jun 17, 2016 at 10:22:46PM +0200, Vineet Gupta wrote:
> On Friday 17 June 2016 06:04 PM, Ingo Molnar wrote:
> >> 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 :-)

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.
Peter Zijlstra June 18, 2016, 10:17 a.m. UTC | #10
On Sat, Jun 18, 2016 at 09:05:01AM +0200, Peter Zijlstra wrote:

> 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
Vineet Gupta June 21, 2016, 5:29 a.m. UTC | #11
On Saturday 18 June 2016 03:47 PM, Peter Zijlstra wrote:
> 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
Peter Zijlstra June 21, 2016, 7:43 a.m. UTC | #12
On Tue, Jun 21, 2016 at 05:29:28AM +0000, Vineet Gupta wrote:
> On Saturday 18 June 2016 03:47 PM, Peter Zijlstra wrote:
> > 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.

> 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).
Vineet Gupta June 21, 2016, 9:28 a.m. UTC | #13
On Tuesday 21 June 2016 01:13 PM, Peter Zijlstra wrote:
> On Tue, Jun 21, 2016 at 05:29:28AM +0000, Vineet Gupta wrote:
>> > On Saturday 18 June 2016 03:47 PM, Peter Zijlstra wrote:
>>> > > 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
Peter Zijlstra June 21, 2016, 9:45 a.m. UTC | #14
On Tue, Jun 21, 2016 at 09:28:56AM +0000, Vineet Gupta wrote:
> On Tuesday 21 June 2016 01:13 PM, Peter Zijlstra wrote:
> > On Tue, Jun 21, 2016 at 05:29:28AM +0000, Vineet Gupta wrote:
> >> > On Saturday 18 June 2016 03:47 PM, Peter Zijlstra wrote:
> >>> > > 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.

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

Should arc-*-* list gdb in their noconfigdirs like many other archs do
too?
Vineet Gupta June 21, 2016, 9:59 a.m. UTC | #15
On Tuesday 21 June 2016 03:15 PM, Peter Zijlstra wrote:
> On Tue, Jun 21, 2016 at 09:28:56AM +0000, Vineet Gupta wrote:
>> On Tuesday 21 June 2016 01:13 PM, Peter Zijlstra wrote:
>>> On Tue, Jun 21, 2016 at 05:29:28AM +0000, Vineet Gupta wrote:
>>>>> On Saturday 18 June 2016 03:47 PM, Peter Zijlstra wrote:
>>>>>>> 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.
> 
> 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 !

> 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.
Vineet Gupta June 22, 2016, 10:04 a.m. UTC | #16
On Friday 17 June 2016 08:11 PM, Peter Zijlstra wrote:
> On Fri, Jun 17, 2016 at 04:39:42PM +0200, Peter Zijlstra wrote:
>> On Fri, Jun 17, 2016 at 07:36:56AM -0700, Guenter Roeck wrote:
>>> 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.
> 
> 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 !

> 
> 
> ---
>  arch/arc/include/asm/atomic.h | 8 --------
>  1 file changed, 8 deletions(-)
> 
> diff --git a/arch/arc/include/asm/atomic.h b/arch/arc/include/asm/atomic.h
> index bd9c51cb2bfd..4e3c1b6b0806 100644
> --- a/arch/arc/include/asm/atomic.h
> +++ b/arch/arc/include/asm/atomic.h
> @@ -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@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-snps-arc
>
Peter Zijlstra June 22, 2016, 10:24 a.m. UTC | #17
On Wed, Jun 22, 2016 at 03:34:54PM +0530, Vineet Gupta wrote:
> 
> 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.

> > ---
> >  arch/arc/include/asm/atomic.h | 8 --------
> >  1 file changed, 8 deletions(-)
> > 
> > diff --git a/arch/arc/include/asm/atomic.h b/arch/arc/include/asm/atomic.h
> > index bd9c51cb2bfd..4e3c1b6b0806 100644
> > --- a/arch/arc/include/asm/atomic.h
> > +++ b/arch/arc/include/asm/atomic.h
> > @@ -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)
diff mbox

Patch

diff --git a/arch/arc/include/asm/atomic.h b/arch/arc/include/asm/atomic.h
index bd9c51cb2bfd..4e3c1b6b0806 100644
--- a/arch/arc/include/asm/atomic.h
+++ b/arch/arc/include/asm/atomic.h
@@ -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)