[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aByiNZNxqyTerdYG@gondor.apana.org.au>
Date: Thu, 8 May 2025 20:23:17 +0800
From: Herbert Xu <herbert@...dor.apana.org.au>
To: Venkat Rao Bagalkote <venkat88@...ux.ibm.com>
Cc: Thorsten Leemhuis <linux@...mhuis.info>,
Linux Crypto Mailing List <linux-crypto@...r.kernel.org>,
LKML <linux-kernel@...r.kernel.org>,
Linux Next Mailing List <linux-next@...r.kernel.org>,
Madhavan Srinivasan <maddy@...ux.ibm.com>,
Stephen Rothwell <sfr@...b.auug.org.au>
Subject: [PATCH] crypto: powerpc/poly1305 - Restore crypto_simd_usable test
On Thu, May 08, 2025 at 05:27:13PM +0530, Venkat Rao Bagalkote wrote:
>
> Yes, its was on the same machine, next-20250506 passed.
OK I found one bug in my patches, I incorrectly removed the simd
tests for powerpc. Does this patch help?
---8<---
Restore the crypto_simd_usable test as powerpc needs it.
Fixes: 14d31979145d ("crypto: powerpc/poly1305 - Add block-only interface")
Signed-off-by: Herbert Xu <herbert@...dor.apana.org.au>
diff --git a/arch/powerpc/lib/crypto/poly1305-p10-glue.c b/arch/powerpc/lib/crypto/poly1305-p10-glue.c
index 7cea0ebcc6bc..154eced0bf9e 100644
--- a/arch/powerpc/lib/crypto/poly1305-p10-glue.c
+++ b/arch/powerpc/lib/crypto/poly1305-p10-glue.c
@@ -6,6 +6,7 @@
*/
#include <asm/switch_to.h>
#include <crypto/internal/poly1305.h>
+#include <crypto/internal/simd.h>
#include <linux/cpufeature.h>
#include <linux/jump_label.h>
#include <linux/kernel.h>
@@ -51,7 +52,7 @@ void poly1305_blocks_arch(struct poly1305_block_state *state, const u8 *src,
if (!static_key_enabled(&have_p10))
return poly1305_blocks_generic(state, src, len, padbit);
vsx_begin();
- if (len >= POLY1305_BLOCK_SIZE * 4) {
+ if (crypto_simd_usable() && len >= POLY1305_BLOCK_SIZE * 4) {
poly1305_p10le_4blocks(state, src, len);
src += len - (len % (POLY1305_BLOCK_SIZE * 4));
len %= POLY1305_BLOCK_SIZE * 4;
--
Email: Herbert Xu <herbert@...dor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
Powered by blists - more mailing lists