diff options
author | Nicholas Piggin <npiggin@gmail.com> | 2017-05-20 00:29:49 -0400 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2017-05-25 09:07:45 -0400 |
commit | a4700a26107241cc7b9ac8528b2c6714ff99983d (patch) | |
tree | 06e152b268a8bb2d1dfc77bd3541f5a88becb810 | |
parent | d75e4919cc0b6fbcbc8d6654ef66d87a9dbf1526 (diff) |
powerpc: Add PPC_FEATURE userspace bits for SCV and DARN instructions
Providing "scv" support to userspace requires kernel support, so it
must be advertised as independently to the base ISA 3 instruction set.
The darn instruction relies on firmware enablement, so it has been
decided to split this out from the core ISA 3 feature as well.
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
-rw-r--r-- | arch/powerpc/include/uapi/asm/cputable.h | 2 | ||||
-rw-r--r-- | arch/powerpc/kernel/cputable.c | 3 |
2 files changed, 4 insertions, 1 deletions
diff --git a/arch/powerpc/include/uapi/asm/cputable.h b/arch/powerpc/include/uapi/asm/cputable.h index 3e7ce86d5c13..4d877144f377 100644 --- a/arch/powerpc/include/uapi/asm/cputable.h +++ b/arch/powerpc/include/uapi/asm/cputable.h | |||
@@ -46,6 +46,8 @@ | |||
46 | #define PPC_FEATURE2_HTM_NOSC 0x01000000 | 46 | #define PPC_FEATURE2_HTM_NOSC 0x01000000 |
47 | #define PPC_FEATURE2_ARCH_3_00 0x00800000 /* ISA 3.00 */ | 47 | #define PPC_FEATURE2_ARCH_3_00 0x00800000 /* ISA 3.00 */ |
48 | #define PPC_FEATURE2_HAS_IEEE128 0x00400000 /* VSX IEEE Binary Float 128-bit */ | 48 | #define PPC_FEATURE2_HAS_IEEE128 0x00400000 /* VSX IEEE Binary Float 128-bit */ |
49 | #define PPC_FEATURE2_DARN 0x00200000 /* darn random number insn */ | ||
50 | #define PPC_FEATURE2_SCV 0x00100000 /* scv syscall */ | ||
49 | 51 | ||
50 | /* | 52 | /* |
51 | * IMPORTANT! | 53 | * IMPORTANT! |
diff --git a/arch/powerpc/kernel/cputable.c b/arch/powerpc/kernel/cputable.c index 9b3e88b1a9c8..6f849832a669 100644 --- a/arch/powerpc/kernel/cputable.c +++ b/arch/powerpc/kernel/cputable.c | |||
@@ -124,7 +124,8 @@ extern void __restore_cpu_e6500(void); | |||
124 | #define COMMON_USER_POWER9 COMMON_USER_POWER8 | 124 | #define COMMON_USER_POWER9 COMMON_USER_POWER8 |
125 | #define COMMON_USER2_POWER9 (COMMON_USER2_POWER8 | \ | 125 | #define COMMON_USER2_POWER9 (COMMON_USER2_POWER8 | \ |
126 | PPC_FEATURE2_ARCH_3_00 | \ | 126 | PPC_FEATURE2_ARCH_3_00 | \ |
127 | PPC_FEATURE2_HAS_IEEE128) | 127 | PPC_FEATURE2_HAS_IEEE128 | \ |
128 | PPC_FEATURE2_DARN ) | ||
128 | 129 | ||
129 | #ifdef CONFIG_PPC_BOOK3E_64 | 130 | #ifdef CONFIG_PPC_BOOK3E_64 |
130 | #define COMMON_USER_BOOKE (COMMON_USER_PPC64 | PPC_FEATURE_BOOKE) | 131 | #define COMMON_USER_BOOKE (COMMON_USER_PPC64 | PPC_FEATURE_BOOKE) |