kernel-ark/arch/mips/include/uapi/asm
WANG Xuerui f06da27eb8 MIPS: Expose Loongson CPUCFG availability via HWCAP
The point is to allow userspace to probe for CPUCFG without possibly
triggering invalid instructions. In addition to that, future Loongson
feature bits could all be stuffed into CPUCFG bit fields (or "leaves"
in x86-speak) if Loongson does not make mistakes, so ELF HWCAP bits are
conserved.

Userspace can determine native CPUCFG availability by checking the LCSRP
(Loongson CSR Present) bit in CPUCFG output after seeing CPUCFG bit in
HWCAP. Native CPUCFG always sets the LCSRP bit, as CPUCFG is part of the
Loongson CSR ASE, while the emulation intentionally leaves this bit
clear.

The other existing Loongson-specific HWCAP bits are, to my best
knowledge, unused, as

(1) they are fairly recent additions,
(2) Loongson never back-ported the patch into their kernel fork, and
(3) Loongson's existing installed base rarely upgrade, if ever;

However, they are still considered userspace ABI, hence unfortunately
unremovable. But hopefully at least we could stop adding new Loongson
HWCAP bits in the future.

Cc: Paul Burton <paulburton@kernel.org>
Cc: Jiaxun Yang <jiaxun.yang@flygoat.com>
Cc: Huacai Chen <chenhc@lemote.com>
Signed-off-by: WANG Xuerui <git@xen0n.name>
Reviewed-by: Huacai Chen <chenhc@lemote.com>
Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
2020-05-31 10:53:56 +02:00
..
auxvec.h
bitfield.h
bitsperlong.h
break.h
byteorder.h
cachectl.h
errno.h
fcntl.h
hwcap.h MIPS: Expose Loongson CPUCFG availability via HWCAP 2020-05-31 10:53:56 +02:00
inst.h MIPS: Loongson-3: Add some unaligned instructions emulation 2020-04-24 18:18:38 +02:00
ioctl.h
ioctls.h
Kbuild
kvm_para.h
kvm.h
mman.h mm: introduce MADV_PAGEOUT 2019-09-25 17:51:41 -07:00
msgbuf.h arch: msgbuf.h: make uapi asm/msgbuf.h self-contained 2019-12-04 19:44:14 -08:00
param.h
poll.h
posix_types.h
ptrace.h
reg.h
resource.h
sembuf.h arch: sembuf.h: make uapi asm/sembuf.h self-contained 2019-12-04 19:44:14 -08:00
setup.h
sgidefs.h
shmbuf.h y2038: ipc: remove __kernel_time_t reference from headers 2019-11-15 14:38:28 +01:00
sigcontext.h
siginfo.h
signal.h
socket.h bpf: net: Add SO_DETACH_REUSEPORT_BPF 2019-06-15 01:21:19 +02:00
sockios.h
stat.h y2038: stat: avoid 'time_t' in 'struct stat' 2019-11-15 14:38:28 +01:00
statfs.h
swab.h
sysmips.h
termbits.h
termios.h
types.h
ucontext.h
unistd.h