diff options
Diffstat (limited to 'arch/x86/crypto/aesni-intel_glue.c')
-rw-r--r-- | arch/x86/crypto/aesni-intel_glue.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/arch/x86/crypto/aesni-intel_glue.c b/arch/x86/crypto/aesni-intel_glue.c index 2577613fb32b..cbc60ef359bc 100644 --- a/arch/x86/crypto/aesni-intel_glue.c +++ b/arch/x86/crypto/aesni-intel_glue.c | |||
@@ -140,6 +140,9 @@ asmlinkage void aesni_gcm_dec(void *ctx, u8 *out, | |||
140 | u8 *hash_subkey, const u8 *aad, unsigned long aad_len, | 140 | u8 *hash_subkey, const u8 *aad, unsigned long aad_len, |
141 | u8 *auth_tag, unsigned long auth_tag_len); | 141 | u8 *auth_tag, unsigned long auth_tag_len); |
142 | 142 | ||
143 | int crypto_fpu_init(void); | ||
144 | void crypto_fpu_exit(void); | ||
145 | |||
143 | static inline struct | 146 | static inline struct |
144 | aesni_rfc4106_gcm_ctx *aesni_rfc4106_gcm_ctx_get(struct crypto_aead *tfm) | 147 | aesni_rfc4106_gcm_ctx *aesni_rfc4106_gcm_ctx_get(struct crypto_aead *tfm) |
145 | { | 148 | { |
@@ -1257,6 +1260,8 @@ static int __init aesni_init(void) | |||
1257 | return -ENODEV; | 1260 | return -ENODEV; |
1258 | } | 1261 | } |
1259 | 1262 | ||
1263 | if ((err = crypto_fpu_init())) | ||
1264 | goto fpu_err; | ||
1260 | if ((err = crypto_register_alg(&aesni_alg))) | 1265 | if ((err = crypto_register_alg(&aesni_alg))) |
1261 | goto aes_err; | 1266 | goto aes_err; |
1262 | if ((err = crypto_register_alg(&__aesni_alg))) | 1267 | if ((err = crypto_register_alg(&__aesni_alg))) |
@@ -1334,6 +1339,7 @@ blk_ecb_err: | |||
1334 | __aes_err: | 1339 | __aes_err: |
1335 | crypto_unregister_alg(&aesni_alg); | 1340 | crypto_unregister_alg(&aesni_alg); |
1336 | aes_err: | 1341 | aes_err: |
1342 | fpu_err: | ||
1337 | return err; | 1343 | return err; |
1338 | } | 1344 | } |
1339 | 1345 | ||
@@ -1363,6 +1369,8 @@ static void __exit aesni_exit(void) | |||
1363 | crypto_unregister_alg(&blk_ecb_alg); | 1369 | crypto_unregister_alg(&blk_ecb_alg); |
1364 | crypto_unregister_alg(&__aesni_alg); | 1370 | crypto_unregister_alg(&__aesni_alg); |
1365 | crypto_unregister_alg(&aesni_alg); | 1371 | crypto_unregister_alg(&aesni_alg); |
1372 | |||
1373 | crypto_fpu_exit(); | ||
1366 | } | 1374 | } |
1367 | 1375 | ||
1368 | module_init(aesni_init); | 1376 | module_init(aesni_init); |