]> git.baikalelectronics.ru Git - kernel.git/commit
parisc: Fix double-word compare and exchange in LWS code on 32-bit kernels
authorJohn David Anglin <dave.anglin@bell.net>
Sat, 30 Sep 2017 21:24:23 +0000 (17:24 -0400)
committerHelge Deller <deller@gmx.de>
Thu, 19 Oct 2017 06:48:44 +0000 (08:48 +0200)
commitb0d262bc878dc941e8b6482ec880048155cd289c
treef3bf23769e2de1a8e6c8e3b9486a7221e6fc56cf
parent01a60763610b738b56ccf9e994d2961af3d8d1c9
parisc: Fix double-word compare and exchange in LWS code on 32-bit kernels

As discussed on the debian-hppa list, double-wordcompare and exchange
operations fail on 32-bit kernels.  Looking at the code, I realized that
the ",ma" completer does the wrong thing in the  "ldw,ma  4(%r26), %r29"
instruction.  This increments %r26 and causes the following store to
write to the wrong location.

Note by Helge Deller:
The patch applies cleanly to stable kernel series if this upstream
commit is merged in advance:
9c721a3befe5 ("parisc: Avoid trashing sr2 and sr3 in LWS code").

Signed-off-by: John David Anglin <dave.anglin@bell.net>
Tested-by: Christoph Biedl <debian.axhn@manchmal.in-ulm.de>
Fixes: 0d4bf02dff12 ("parisc: Implement new LWS CAS supporting 64 bit operations.")
Cc: stable@vger.kernel.org # 3.13+
Signed-off-by: Helge Deller <deller@gmx.de>
arch/parisc/kernel/syscall.S