aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/crypto/zinc/chacha20
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2018-09-30 04:28:35 +0200
committerJason A. Donenfeld <Jason@zx2c4.com>2018-10-02 14:37:53 +0200
commit1399b10a7dbc65de238cf3af8da959d50473b56a (patch)
treeb8d462c019cf75c8abf7fe9810ce6556f239379a /src/crypto/zinc/chacha20
parentchacha20: no need to align ctx (diff)
downloadwireguard-monolithic-historical-1399b10a7dbc65de238cf3af8da959d50473b56a.tar.xz
wireguard-monolithic-historical-1399b10a7dbc65de238cf3af8da959d50473b56a.zip
crypto: use ZINC_ARCH macros
Diffstat (limited to 'src/crypto/zinc/chacha20')
-rw-r--r--src/crypto/zinc/chacha20/chacha20-arm-glue.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/crypto/zinc/chacha20/chacha20-arm-glue.h b/src/crypto/zinc/chacha20/chacha20-arm-glue.h
index 2504448..163815f 100644
--- a/src/crypto/zinc/chacha20/chacha20-arm-glue.h
+++ b/src/crypto/zinc/chacha20/chacha20-arm-glue.h
@@ -5,7 +5,7 @@
#include <asm/hwcap.h>
#include <asm/neon.h>
-#if defined(CONFIG_ARM)
+#if defined(CONFIG_ZINC_ARCH_ARM)
#include <asm/system_info.h>
#include <asm/cputype.h>
#endif
@@ -20,9 +20,9 @@ static bool chacha20_use_neon __ro_after_init;
static void __init chacha20_fpu_init(void)
{
-#if defined(CONFIG_ARM64)
+#if defined(CONFIG_ZINC_ARCH_ARM64)
chacha20_use_neon = elf_hwcap & HWCAP_ASIMD;
-#elif defined(CONFIG_ARM)
+#elif defined(CONFIG_ZINC_ARCH_ARM)
switch (read_cpuid_part()) {
case ARM_CPU_PART_CORTEX_A7:
case ARM_CPU_PART_CORTEX_A5:
@@ -73,7 +73,7 @@ static inline bool hchacha20_arch(u32 derived_key[CHACHA20_KEY_WORDS],
const u8 key[HCHACHA20_KEY_SIZE],
simd_context_t *simd_context)
{
- if (IS_ENABLED(CONFIG_ARM)) {
+ if (IS_ENABLED(CONFIG_ZINC_ARCH_ARM)) {
u32 x[] = { CHACHA20_CONSTANT_EXPA,
CHACHA20_CONSTANT_ND_3,
CHACHA20_CONSTANT_2_BY,