]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commitc32c75af5758b2c2afc2794c4e309b11dde029e4
tree023307e7d55f51203c55ced80fc5006653a22086
parentd96f768ea84795022639ea194242d4accf2fed0b
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