Merge tag 'powerpc-6.10-1' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc...
[sfrench/cifs-2.6.git] / include / uapi / linux / prctl.h
index 370ed14b1ae0928ce23312ac8a882db89a78dfdc..713d28788df7426754ea4cce5d0a30435f99e3c9 100644 (file)
@@ -306,4 +306,20 @@ struct prctl_mm_map {
 # define PR_RISCV_V_VSTATE_CTRL_NEXT_MASK      0xc
 # define PR_RISCV_V_VSTATE_CTRL_MASK           0x1f
 
+/* PowerPC Dynamic Execution Control Register (DEXCR) controls */
+#define PR_PPC_GET_DEXCR               72
+#define PR_PPC_SET_DEXCR               73
+/* DEXCR aspect to act on */
+# define PR_PPC_DEXCR_SBHE             0 /* Speculative branch hint enable */
+# define PR_PPC_DEXCR_IBRTPD           1 /* Indirect branch recurrent target prediction disable */
+# define PR_PPC_DEXCR_SRAPD            2 /* Subroutine return address prediction disable */
+# define PR_PPC_DEXCR_NPHIE            3 /* Non-privileged hash instruction enable */
+/* Action to apply / return */
+# define PR_PPC_DEXCR_CTRL_EDITABLE     0x1 /* Aspect can be modified with PR_PPC_SET_DEXCR */
+# define PR_PPC_DEXCR_CTRL_SET          0x2 /* Set the aspect for this process */
+# define PR_PPC_DEXCR_CTRL_CLEAR        0x4 /* Clear the aspect for this process */
+# define PR_PPC_DEXCR_CTRL_SET_ONEXEC   0x8 /* Set the aspect on exec */
+# define PR_PPC_DEXCR_CTRL_CLEAR_ONEXEC        0x10 /* Clear the aspect on exec */
+# define PR_PPC_DEXCR_CTRL_MASK                0x1f
+
 #endif /* _LINUX_PRCTL_H */