powerpc/dexcr: Add DEXCR prctl interface
authorBenjamin Gray <bgray@linux.ibm.com>
Wed, 17 Apr 2024 11:23:20 +0000 (21:23 +1000)
committerMichael Ellerman <mpe@ellerman.id.au>
Mon, 6 May 2024 12:04:31 +0000 (22:04 +1000)
commit628d701f2de5b9a16d1dd82bea68fd895f56f1a1
tree367c1d60f25cb18d0f31279f6ef0b44ce0cd3178
parentbbd99922d0f4518518282217159666c679c6a0d1
powerpc/dexcr: Add DEXCR prctl interface

Now that we track a DEXCR on a per-task basis, individual tasks are free
to configure it as they like.

The interface is a pair of getter/setter prctl's that work on a single
aspect at a time (multiple aspects at once is more difficult if there
are different rules applied for each aspect, now or in future). The
getter shows the current state of the process config, and the setter
allows setting/clearing the aspect.

Signed-off-by: Benjamin Gray <bgray@linux.ibm.com>
[mpe: Account for PR_RISCV_SET_ICACHE_FLUSH_CTX, shrink some longs lines]
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://msgid.link/20240417112325.728010-5-bgray@linux.ibm.com
arch/powerpc/include/asm/processor.h
arch/powerpc/kernel/dexcr.c
include/uapi/linux/prctl.h
kernel/sys.c