powerpc: Add AT_HWCAP2 to indicate V.CRYPTO category support
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>
Tue, 10 Jun 2014 05:04:40 +0000 (15:04 +1000)
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>
Wed, 11 Jun 2014 06:31:20 +0000 (16:31 +1000)
The Vector Crypto category instructions are supported by current POWER8
chips, advertise them to userspace using a specific bit to properly
differentiate with chips of the same architecture level that might not
have them.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
CC: <stable@vger.kernel.org> [v3.10+]
arch/powerpc/include/uapi/asm/cputable.h
arch/powerpc/kernel/cputable.c

index 5b7657959faad198796fdc868f03f66eaf9db854..de2c0e4ee1aab1c13d0ac60d0d2300849665c48c 100644 (file)
@@ -41,5 +41,6 @@
 #define PPC_FEATURE2_EBB               0x10000000
 #define PPC_FEATURE2_ISEL              0x08000000
 #define PPC_FEATURE2_TAR               0x04000000
+#define PPC_FEATURE2_VEC_CRYPTO                0x02000000
 
 #endif /* _UAPI__ASM_POWERPC_CPUTABLE_H */
index c1faade6506dd581e3baf2aebfd93c7972fbd6dc..11da04a4625a9ff78459d6d5fe18166ac06ad536 100644 (file)
@@ -109,7 +109,8 @@ extern void __restore_cpu_e6500(void);
                                 PPC_FEATURE_PSERIES_PERFMON_COMPAT)
 #define COMMON_USER2_POWER8    (PPC_FEATURE2_ARCH_2_07 | \
                                 PPC_FEATURE2_HTM_COMP | PPC_FEATURE2_DSCR | \
-                                PPC_FEATURE2_ISEL | PPC_FEATURE2_TAR)
+                                PPC_FEATURE2_ISEL | PPC_FEATURE2_TAR | \
+                                PPC_FEATURE2_VEC_CRYPTO)
 #define COMMON_USER_PA6T       (COMMON_USER_PPC64 | PPC_FEATURE_PA6T |\
                                 PPC_FEATURE_TRUE_LE | \
                                 PPC_FEATURE_HAS_ALTIVEC_COMP)