Skip to content

Commit a4700a2

Browse files
npigginmpe
authored andcommitted
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>
1 parent d75e491 commit a4700a2

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

arch/powerpc/include/uapi/asm/cputable.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,8 @@
4646
#define PPC_FEATURE2_HTM_NOSC 0x01000000
4747
#define PPC_FEATURE2_ARCH_3_00 0x00800000 /* ISA 3.00 */
4848
#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 */
4951

5052
/*
5153
* IMPORTANT!

arch/powerpc/kernel/cputable.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,8 @@ extern void __restore_cpu_e6500(void);
124124
#define COMMON_USER_POWER9 COMMON_USER_POWER8
125125
#define COMMON_USER2_POWER9 (COMMON_USER2_POWER8 | \
126126
PPC_FEATURE2_ARCH_3_00 | \
127-
PPC_FEATURE2_HAS_IEEE128)
127+
PPC_FEATURE2_HAS_IEEE128 | \
128+
PPC_FEATURE2_DARN )
128129

129130
#ifdef CONFIG_PPC_BOOK3E_64
130131
#define COMMON_USER_BOOKE (COMMON_USER_PPC64 | PPC_FEATURE_BOOKE)

0 commit comments

Comments
 (0)