Re: [PATCH 2/5] Glue code for optmized Chacha20 implementation for ppc64le.

2023-04-25 Thread Danny Tsen
Got it.  Will fix it. Thanks. -Danny On 4/25/23 12:41 AM, Herbert Xu wrote: On Mon, Apr 24, 2023 at 02:47:23PM -0400, Danny Tsen wrote: +static int chacha_p10_stream_xor(struct skcipher_request *req, +const struct chacha_ctx *ctx, const u8 *iv) +{ + stru

Re: [PATCH 2/5] Glue code for optmized Chacha20 implementation for ppc64le.

2023-04-24 Thread Herbert Xu
On Mon, Apr 24, 2023 at 02:47:23PM -0400, Danny Tsen wrote: > > +static int chacha_p10_stream_xor(struct skcipher_request *req, > + const struct chacha_ctx *ctx, const u8 *iv) > +{ > + struct skcipher_walk walk; > + u32 state[16]; > + int err; > + > + er

Re: [PATCH 2/5] Glue code for optmized Chacha20 implementation for ppc64le.

2023-04-24 Thread Herbert Xu
On Tue, Apr 25, 2023 at 01:37:22PM +0800, Herbert Xu wrote: > On Mon, Apr 24, 2023 at 02:47:23PM -0400, Danny Tsen wrote: > > > > +static int __init chacha_p10_init(void) > > +{ > > + static_branch_enable(&have_p10); > > + > > + return IS_REACHABLE(CONFIG_CRYPTO_SKCIPHER) ? > > + cryp

Re: [PATCH 2/5] Glue code for optmized Chacha20 implementation for ppc64le.

2023-04-24 Thread Herbert Xu
On Mon, Apr 24, 2023 at 02:47:23PM -0400, Danny Tsen wrote: > > +static int __init chacha_p10_init(void) > +{ > + static_branch_enable(&have_p10); > + > + return IS_REACHABLE(CONFIG_CRYPTO_SKCIPHER) ? > + crypto_register_skciphers(algs, ARRAY_SIZE(algs)) : 0; What is this for?

[PATCH 2/5] Glue code for optmized Chacha20 implementation for ppc64le.

2023-04-24 Thread Danny Tsen
Signed-off-by: Danny Tsen --- arch/powerpc/crypto/chacha-p10-glue.c | 223 ++ 1 file changed, 223 insertions(+) create mode 100644 arch/powerpc/crypto/chacha-p10-glue.c diff --git a/arch/powerpc/crypto/chacha-p10-glue.c b/arch/powerpc/crypto/chacha-p10-glue.c new file m