From a71852147516bc1cb5b0b3cbd13639bfd4022dc8 Mon Sep 17 00:00:00 2001 From: André Fabian Silva Delgado Date: Thu, 29 Oct 2015 13:45:54 -0300 Subject: Linux-libre 4.2.5-gnu --- arch/x86/crypto/camellia_aesni_avx_glue.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'arch/x86/crypto/camellia_aesni_avx_glue.c') diff --git a/arch/x86/crypto/camellia_aesni_avx_glue.c b/arch/x86/crypto/camellia_aesni_avx_glue.c index 80a0e4389..bacaa13ac 100644 --- a/arch/x86/crypto/camellia_aesni_avx_glue.c +++ b/arch/x86/crypto/camellia_aesni_avx_glue.c @@ -554,6 +554,11 @@ static int __init camellia_aesni_init(void) { const char *feature_name; + if (!cpu_has_avx || !cpu_has_aes || !cpu_has_osxsave) { + pr_info("AVX or AES-NI instructions are not detected.\n"); + return -ENODEV; + } + if (!cpu_has_xfeatures(XSTATE_SSE | XSTATE_YMM, &feature_name)) { pr_info("CPU feature '%s' is not supported.\n", feature_name); return -ENODEV; -- cgit v1.2.3-54-g00ecf