#define pr_fmt(fmt) …
#include <crypto/internal/hash.h>
#include <crypto/internal/simd.h>
#include <linux/init.h>
#include <linux/module.h>
#include <linux/mm.h>
#include <linux/types.h>
#include <crypto/sha2.h>
#include <crypto/sha256_base.h>
#include <linux/string.h>
#include <asm/cpu_device_id.h>
#include <asm/simd.h>
asmlinkage void sha256_transform_ssse3(struct sha256_state *state,
const u8 *data, int blocks);
static const struct x86_cpu_id module_cpu_ids[] = …;
MODULE_DEVICE_TABLE(x86cpu, module_cpu_ids);
static int _sha256_update(struct shash_desc *desc, const u8 *data,
unsigned int len, sha256_block_fn *sha256_xform)
{ … }
static int sha256_finup(struct shash_desc *desc, const u8 *data,
unsigned int len, u8 *out, sha256_block_fn *sha256_xform)
{ … }
static int sha256_ssse3_update(struct shash_desc *desc, const u8 *data,
unsigned int len)
{ … }
static int sha256_ssse3_finup(struct shash_desc *desc, const u8 *data,
unsigned int len, u8 *out)
{ … }
static int sha256_ssse3_final(struct shash_desc *desc, u8 *out)
{ … }
static int sha256_ssse3_digest(struct shash_desc *desc, const u8 *data,
unsigned int len, u8 *out)
{ … }
static struct shash_alg sha256_ssse3_algs[] = …;
static int register_sha256_ssse3(void)
{ … }
static void unregister_sha256_ssse3(void)
{ … }
asmlinkage void sha256_transform_avx(struct sha256_state *state,
const u8 *data, int blocks);
static int sha256_avx_update(struct shash_desc *desc, const u8 *data,
unsigned int len)
{ … }
static int sha256_avx_finup(struct shash_desc *desc, const u8 *data,
unsigned int len, u8 *out)
{ … }
static int sha256_avx_final(struct shash_desc *desc, u8 *out)
{ … }
static int sha256_avx_digest(struct shash_desc *desc, const u8 *data,
unsigned int len, u8 *out)
{ … }
static struct shash_alg sha256_avx_algs[] = …;
static bool avx_usable(void)
{ … }
static int register_sha256_avx(void)
{ … }
static void unregister_sha256_avx(void)
{ … }
asmlinkage void sha256_transform_rorx(struct sha256_state *state,
const u8 *data, int blocks);
static int sha256_avx2_update(struct shash_desc *desc, const u8 *data,
unsigned int len)
{ … }
static int sha256_avx2_finup(struct shash_desc *desc, const u8 *data,
unsigned int len, u8 *out)
{ … }
static int sha256_avx2_final(struct shash_desc *desc, u8 *out)
{ … }
static int sha256_avx2_digest(struct shash_desc *desc, const u8 *data,
unsigned int len, u8 *out)
{ … }
static struct shash_alg sha256_avx2_algs[] = …;
static bool avx2_usable(void)
{ … }
static int register_sha256_avx2(void)
{ … }
static void unregister_sha256_avx2(void)
{ … }
#ifdef CONFIG_AS_SHA256_NI
asmlinkage void sha256_ni_transform(struct sha256_state *digest,
const u8 *data, int rounds);
static int sha256_ni_update(struct shash_desc *desc, const u8 *data,
unsigned int len)
{ … }
static int sha256_ni_finup(struct shash_desc *desc, const u8 *data,
unsigned int len, u8 *out)
{ … }
static int sha256_ni_final(struct shash_desc *desc, u8 *out)
{ … }
static int sha256_ni_digest(struct shash_desc *desc, const u8 *data,
unsigned int len, u8 *out)
{ … }
static struct shash_alg sha256_ni_algs[] = …;
static int register_sha256_ni(void)
{ … }
static void unregister_sha256_ni(void)
{ … }
#else
static inline int register_sha256_ni(void) { return 0; }
static inline void unregister_sha256_ni(void) { }
#endif
static int __init sha256_ssse3_mod_init(void)
{ … }
static void __exit sha256_ssse3_mod_fini(void)
{ … }
module_init(…) …;
module_exit(sha256_ssse3_mod_fini);
MODULE_LICENSE(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_ALIAS_CRYPTO(…) …;
MODULE_ALIAS_CRYPTO(…) …;
MODULE_ALIAS_CRYPTO(…) …;
MODULE_ALIAS_CRYPTO(…) …;
MODULE_ALIAS_CRYPTO(…) …;
MODULE_ALIAS_CRYPTO(…) …;
MODULE_ALIAS_CRYPTO(…) …;
MODULE_ALIAS_CRYPTO(…) …;
#ifdef CONFIG_AS_SHA256_NI
MODULE_ALIAS_CRYPTO(…) …;
MODULE_ALIAS_CRYPTO(…) …;
#endif