diff options
author | Jason A. Donenfeld <Jason@zx2c4.com> | 2018-10-05 03:13:30 +0200 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2018-10-06 02:19:47 +0200 |
commit | 97e9a61fd5631985232923cff83b2ddc0ca476c0 (patch) | |
tree | b05245f7be911d091cc0f4e4b6bc3d04db385e9e /src/crypto/zinc/chacha20/chacha20.c | |
parent | global: rename include'd C files to be .c (diff) | |
download | wireguard-monolithic-historical-97e9a61fd5631985232923cff83b2ddc0ca476c0.tar.xz wireguard-monolithic-historical-97e9a61fd5631985232923cff83b2ddc0ca476c0.zip |
crypto: test all SIMD combinations
Diffstat (limited to 'src/crypto/zinc/chacha20/chacha20.c')
-rw-r--r-- | src/crypto/zinc/chacha20/chacha20.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/crypto/zinc/chacha20/chacha20.c b/src/crypto/zinc/chacha20/chacha20.c index bc7e9be..971391c 100644 --- a/src/crypto/zinc/chacha20/chacha20.c +++ b/src/crypto/zinc/chacha20/chacha20.c @@ -8,6 +8,7 @@ */ #include <zinc/chacha20.h> +#include "../selftest/run.h" #include <linux/kernel.h> #include <linux/module.h> @@ -22,6 +23,7 @@ #elif defined(CONFIG_ZINC_ARCH_MIPS) #include "chacha20-mips-glue.c" #else +static bool *const chacha20_nobs[] __initconst = { }; static void __init chacha20_fpu_init(void) { } @@ -171,10 +173,9 @@ static int __init mod_init(void) { if (!nosimd) chacha20_fpu_init(); -#ifdef CONFIG_ZINC_SELFTEST - if (WARN_ON(!chacha20_selftest())) + if (!selftest_run("chacha20", chacha20_selftest, chacha20_nobs, + ARRAY_SIZE(chacha20_nobs))) return -ENOTRECOVERABLE; -#endif return 0; } |