]> www.infradead.org Git - users/jedix/linux-maple.git/commit
arch/sparc: Introduce xchg16 for SPARC
authorBabu Moger <babu.moger@oracle.com>
Tue, 30 May 2017 20:59:02 +0000 (13:59 -0700)
committerAllen Pais <allen.pais@oracle.com>
Fri, 16 Jun 2017 08:47:15 +0000 (14:17 +0530)
commit348f252e9927b4b3f7dca7652476c812af950656
tree9813a5a73ea13d5d4c20447a3a124bec362ae6d1
parent043053adcca301cbe1dbd77afb5e46da1562f9d0
arch/sparc: Introduce xchg16 for SPARC

SPARC supports 32 bit and 64 bit xchg right now. Add the support
for 16 bit (2 byte) xchg. This is required to support queued spinlock
feature which uses 2 byte xchg. This is achieved using 4 byte cas
instructions with byte manipulations.

Also re-arranged the code to call __cmpxchg_u32 inside xchg16.

Signed-off-by: Babu Moger <babu.moger@oracle.com>
Reviewed-by: HÃ¥kon Bugge <haakon.bugge@oracle.com>
Reviewed-by: Steven Sistare <steven.sistare@oracle.com>
Reviewed-by: Shannon Nelson <shannon.nelson@oracle.com>
Reviewed-by: Jane Chu <jane.chu@oracle.com>
Reviewed-by: Vijay Kumar <vijay.ac.kumar@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit 79d39e2bab60d18a68a5abc00be4506864397efc)

Conflicts:

arch/sparc/include/asm/cmpxchg_64.h

Orabug: 26183741
Signed-off-by: Allen Pais <allen.pais@oracle.com>
arch/sparc/include/asm/cmpxchg_64.h