summaryrefslogtreecommitdiff
path: root/arch/x86/crypto/camellia_aesni_avx_glue.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2015-10-23 04:57:50 (GMT)
committerTakashi Iwai <tiwai@suse.de>2015-10-23 04:57:50 (GMT)
commit274035751e25ee15a064e43cde7b4e7a9b75d921 (patch)
treebf5f3f18f14855043324ef02a116532d866e3dac /arch/x86/crypto/camellia_aesni_avx_glue.c
parent53e597b1d194910bef53ed0632da329fef497904 (diff)
parenta5be88f63eaff1c03774aecd7388015cb87f6b2c (diff)
downloadlinux-274035751e25ee15a064e43cde7b4e7a9b75d921.tar.xz
Merge branch 'topic/hw-constraint-single' into for-next
Diffstat (limited to 'arch/x86/crypto/camellia_aesni_avx_glue.c')
-rw-r--r--arch/x86/crypto/camellia_aesni_avx_glue.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/arch/x86/crypto/camellia_aesni_avx_glue.c b/arch/x86/crypto/camellia_aesni_avx_glue.c
index 80a0e43..bacaa13 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;