]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - arch/x86/crypto/camellia_aesni_avx_glue.c
Merge branch 'x86-fpu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git...
[karo-tx-linux.git] / arch / x86 / crypto / camellia_aesni_avx_glue.c
index 12e729bfe71b7b1f744972e48295989f41932d70..93d8f295784e399c2fc363d8b5602fede9039529 100644 (file)
@@ -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(XFEATURE_MASK_SSE | XFEATURE_MASK_YMM,
                                &feature_name)) {
                pr_info("CPU feature '%s' is not supported.\n", feature_name);