Patch "metag: Fix atomic_*_return inline asm constraints" has been added to the 4.4-stable tree
Subsystems (2)
This is a note to let you know that I've just added the patch titled
metag: Fix atomic_*_return inline asm constraints
to the 4.4-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
metag-fix-atomic_-_return-inline-asm-constraints.patch
and it can be found in the queue-4.4 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.
Quoted 1 line
From
096a8b6d5e7ab9f8ca3d2474b3ca6a1fe79e0371Mon Sep 17 00:00:00 2001
From: James Hogan <[email protected]>
Date: Tue, 3 May 2016 09:11:21 +0100
Subject: metag: Fix atomic_*_return inline asm constraints
From: James Hogan <[email protected]>
commit 096a8b6d5e7ab9f8ca3d2474b3ca6a1fe79e0371 upstream.
The argument i of atomic_*_return() operations is given to inline asm with the "bd" constraint, which means "An Op2 register where Op1 is a data unit register and the instruction supports O2R", however Op1 is constrained by "da" which allows an address unit register to be used.
Fix the constraint to use "br", meaning "An Op2 register and the instruction supports O2R", i.e. not requiring Op1 to be a data unit register.
--- arch/metag/include/asm/atomic_lnkget.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/metag/include/asm/atomic_lnkget.h +1 -1
@@ -61,7 +61,7 @@ static inline int atomic_##op##_return(i" CMPT %0, #HI(0x02000000)\n" \" BNZ 1b\n" \ : "=&d" (temp), "=&da" (result) \ -: " da" (&v->counter), " bd" (i) \ +: " da" (&v->counter), " br" (i) \ : "cc"); \ \ smp_mb(); \
Patches currently in stable-queue which might be from [email protected] are
queue-4.4/metag-fix-atomic_-_return-inline-asm-constraints.patch