summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Biggers <ebiggers@kernel.org>2025-07-11 14:28:22 -0700
committerEric Biggers <ebiggers@kernel.org>2025-07-14 08:20:00 -0700
commit6e07c5e166597de1d7943ecf2539cad18c0e2ce1 (patch)
treea7a9f08be5b71623f795ab24fff63f2e1ffedc96
parent9f65592b7e1f24569bb6ced064df5b4319f725ce (diff)
lib/crypto: arm/poly1305: Remove unneeded empty weak function
Fix poly1305-armv4.pl to not do '.globl poly1305_blocks_neon' when poly1305_blocks_neon() is not defined. Then, remove the empty __weak definition of poly1305_blocks_neon(), which was still needed only because of that unnecessary globl statement. (It also used to be needed because the compiler could generate calls to it when CONFIG_KERNEL_MODE_NEON=n, but that has been fixed.) Thanks to Arnd Bergmann for reporting that the globl statement in the asm file was still depending on the weak symbol. Acked-by: Ard Biesheuvel <ardb@kernel.org> Link: https://lore.kernel.org/r/20250711212822.6372-1-ebiggers@kernel.org Signed-off-by: Eric Biggers <ebiggers@kernel.org>
-rw-r--r--lib/crypto/arm/poly1305-armv4.pl2
-rw-r--r--lib/crypto/arm/poly1305-glue.c5
2 files changed, 1 insertions, 6 deletions
diff --git a/lib/crypto/arm/poly1305-armv4.pl b/lib/crypto/arm/poly1305-armv4.pl
index d57c6e2fc84a..dd7a996361a7 100644
--- a/lib/crypto/arm/poly1305-armv4.pl
+++ b/lib/crypto/arm/poly1305-armv4.pl
@@ -46,7 +46,6 @@ $code.=<<___;
# define poly1305_init poly1305_block_init_arch
# define poly1305_blocks poly1305_blocks_arm
# define poly1305_emit poly1305_emit_arch
-.globl poly1305_blocks_neon
#endif
#if defined(__thumb2__)
@@ -722,6 +721,7 @@ poly1305_init_neon:
ret @ bx lr
.size poly1305_init_neon,.-poly1305_init_neon
+.globl poly1305_blocks_neon
.type poly1305_blocks_neon,%function
.align 5
poly1305_blocks_neon:
diff --git a/lib/crypto/arm/poly1305-glue.c b/lib/crypto/arm/poly1305-glue.c
index ca6dc5533705..2d86c78af883 100644
--- a/lib/crypto/arm/poly1305-glue.c
+++ b/lib/crypto/arm/poly1305-glue.c
@@ -28,11 +28,6 @@ asmlinkage void poly1305_emit_arch(const struct poly1305_state *state,
const u32 nonce[4]);
EXPORT_SYMBOL_GPL(poly1305_emit_arch);
-void __weak poly1305_blocks_neon(struct poly1305_block_state *state,
- const u8 *src, u32 len, u32 hibit)
-{
-}
-
static __ro_after_init DEFINE_STATIC_KEY_FALSE(have_neon);
void poly1305_blocks_arch(struct poly1305_block_state *state, const u8 *src,