Merge branch 'master' into devel and apply fixup from Stephen Rothwell:
[cascardo/linux.git] / arch / x86 / crypto / aesni-intel_glue.c
index 2577613..feee8ff 100644 (file)
@@ -94,6 +94,10 @@ asmlinkage void aesni_cbc_enc(struct crypto_aes_ctx *ctx, u8 *out,
                              const u8 *in, unsigned int len, u8 *iv);
 asmlinkage void aesni_cbc_dec(struct crypto_aes_ctx *ctx, u8 *out,
                              const u8 *in, unsigned int len, u8 *iv);
+
+int crypto_fpu_init(void);
+void crypto_fpu_exit(void);
+
 #ifdef CONFIG_X86_64
 asmlinkage void aesni_ctr_enc(struct crypto_aes_ctx *ctx, u8 *out,
                              const u8 *in, unsigned int len, u8 *iv);
@@ -1257,6 +1261,8 @@ static int __init aesni_init(void)
                return -ENODEV;
        }
 
+       if ((err = crypto_fpu_init()))
+               goto fpu_err;
        if ((err = crypto_register_alg(&aesni_alg)))
                goto aes_err;
        if ((err = crypto_register_alg(&__aesni_alg)))
@@ -1334,6 +1340,7 @@ blk_ecb_err:
 __aes_err:
        crypto_unregister_alg(&aesni_alg);
 aes_err:
+fpu_err:
        return err;
 }
 
@@ -1363,6 +1370,8 @@ static void __exit aesni_exit(void)
        crypto_unregister_alg(&blk_ecb_alg);
        crypto_unregister_alg(&__aesni_alg);
        crypto_unregister_alg(&aesni_alg);
+
+       crypto_fpu_exit();
 }
 
 module_init(aesni_init);