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: NBabu Moger <babu.moger@oracle.com> Reviewed-by: NHåkon Bugge <haakon.bugge@oracle.com> Reviewed-by: NSteven Sistare <steven.sistare@oracle.com> Reviewed-by: NShannon Nelson <shannon.nelson@oracle.com> Reviewed-by: NJane Chu <jane.chu@oracle.com> Reviewed-by: NVijay Kumar <vijay.ac.kumar@oracle.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
Showing
想要评论请 注册 或 登录