]> git.baikalelectronics.ru Git - kernel.git/commit
sh: add AT_HWCAP flag for J-Core cas.l instruction
authorRich Felker <dalias@libc.org>
Fri, 22 Apr 2016 23:29:13 +0000 (23:29 +0000)
committerRich Felker <dalias@libc.org>
Fri, 5 Aug 2016 03:29:32 +0000 (03:29 +0000)
commit03a7fe28632f138f290201bbff65f01b4c257dc1
tree86014306af44c06b216683dfbc20aa2a8e997b18
parent818f2828f8e02dbff6c1e50c5a72a9cfb0a623a8
sh: add AT_HWCAP flag for J-Core cas.l instruction

The J-Core cpu has, as an ISA extension, an atomic compare-and-swap
instruction cas.l which applications need to use (instead the imask or
gusa atomic models, which are fundamentally limited to UP) for
synchronization in order to be compatible with SMP systems. Provide a
hwcap flag so that it's possible to do runtime selection and support
both.

Signed-off-by: Rich Felker <dalias@libc.org>
arch/sh/include/uapi/asm/cpu-features.h
arch/sh/kernel/cpu/sh2/probe.c