parisc: Add lws_atomic_xchg and lws_atomic_store syscalls
authorJohn David Anglin <dave.anglin@bell.net>
Tue, 4 Jan 2022 21:48:11 +0000 (21:48 +0000)
committerHelge Deller <deller@gmx.de>
Fri, 7 Jan 2022 00:29:21 +0000 (01:29 +0100)
commit72c3dd8207de4178ae50553666129af7231f86e7
tree023307e7d55f51203c55ced80fc5006653a22086
parentd0585d742ff2d82accd26c661c60a6d260429c4a
parisc: Add lws_atomic_xchg and lws_atomic_store syscalls

This patch adds two new LWS routines - lws_atomic_xchg and lws_atomic_store.

These are simpler than the CAS routines.  Currently, we use the CAS
routines for atomic stores.  This is inefficient since it requires
both winning the spinlock and a successful CAS operation.

Change has been tested on c8000 and rp3440.

In v2, I moved the code to disble/enable page faults inside the spinlocks.

Signed-off-by: John David Anglin <dave.anglin@bell.net>
Signed-off-by: Helge Deller <deller@gmx.de>
arch/parisc/kernel/syscall.S