summaryrefslogtreecommitdiffstats
path: root/arch/powerpc/crypto
diff options
context:
space:
mode:
authorAnton Blanchard <anton@samba.org>2016-08-04 08:38:15 +0200
committerMichael Ellerman <mpe@ellerman.id.au>2016-08-09 06:50:17 +0200
commitd2cf5be07ff7c7cde8bef8551a30e8e86e2037a7 (patch)
tree0d6a33d015e3725334fe9686aa0e5b415f4cfdc9 /arch/powerpc/crypto
parentpowerpc/pasemi: Fix coherent_dma_mask for dma engine (diff)
downloadlinux-d2cf5be07ff7c7cde8bef8551a30e8e86e2037a7.tar.xz
linux-d2cf5be07ff7c7cde8bef8551a30e8e86e2037a7.zip
crypto: crc32c-vpmsum - Convert to CPU feature based module autoloading
This patch utilises the GENERIC_CPU_AUTOPROBE infrastructure to automatically load the crc32c-vpmsum module if the CPU supports it. Signed-off-by: Anton Blanchard <anton@samba.org> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Diffstat (limited to 'arch/powerpc/crypto')
-rw-r--r--arch/powerpc/crypto/crc32c-vpmsum_glue.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/powerpc/crypto/crc32c-vpmsum_glue.c b/arch/powerpc/crypto/crc32c-vpmsum_glue.c
index bfe3d37a24ef..9fa046d56eba 100644
--- a/arch/powerpc/crypto/crc32c-vpmsum_glue.c
+++ b/arch/powerpc/crypto/crc32c-vpmsum_glue.c
@@ -4,6 +4,7 @@
#include <linux/module.h>
#include <linux/string.h>
#include <linux/kernel.h>
+#include <linux/cpufeature.h>
#include <asm/switch_to.h>
#define CHKSUM_BLOCK_SIZE 1
@@ -157,7 +158,7 @@ static void __exit crc32c_vpmsum_mod_fini(void)
crypto_unregister_shash(&alg);
}
-module_init(crc32c_vpmsum_mod_init);
+module_cpu_feature_match(PPC_MODULE_FEATURE_VEC_CRYPTO, crc32c_vpmsum_mod_init);
module_exit(crc32c_vpmsum_mod_fini);
MODULE_AUTHOR("Anton Blanchard <anton@samba.org>");