|
@@ -15,6 +15,7 @@
|
|
#include <crypto/cryptd.h>
|
|
#include <crypto/cryptd.h>
|
|
#include <crypto/internal/hash.h>
|
|
#include <crypto/internal/hash.h>
|
|
#include <crypto/gf128mul.h>
|
|
#include <crypto/gf128mul.h>
|
|
|
|
+#include <linux/cpufeature.h>
|
|
#include <linux/crypto.h>
|
|
#include <linux/crypto.h>
|
|
#include <linux/module.h>
|
|
#include <linux/module.h>
|
|
|
|
|
|
@@ -311,9 +312,6 @@ static int __init ghash_ce_mod_init(void)
|
|
{
|
|
{
|
|
int err;
|
|
int err;
|
|
|
|
|
|
- if (!(elf_hwcap2 & HWCAP2_PMULL))
|
|
|
|
- return -ENODEV;
|
|
|
|
-
|
|
|
|
err = crypto_register_shash(&ghash_alg);
|
|
err = crypto_register_shash(&ghash_alg);
|
|
if (err)
|
|
if (err)
|
|
return err;
|
|
return err;
|
|
@@ -334,5 +332,5 @@ static void __exit ghash_ce_mod_exit(void)
|
|
crypto_unregister_shash(&ghash_alg);
|
|
crypto_unregister_shash(&ghash_alg);
|
|
}
|
|
}
|
|
|
|
|
|
-module_init(ghash_ce_mod_init);
|
|
|
|
|
|
+module_cpu_feature_match(PMULL, ghash_ce_mod_init);
|
|
module_exit(ghash_ce_mod_exit);
|
|
module_exit(ghash_ce_mod_exit);
|