[PATCH v2 4/4] crypto: starfive - Add hash and HMAC support

JiaJie Ho jiajie.ho at starfivetech.com
Thu Feb 9 17:05:35 PST 2023



> -----Original Message-----
> From: Herbert Xu <herbert at gondor.apana.org.au>
> Sent: 9 February, 2023 5:44 PM
> To: JiaJie Ho <jiajie.ho at starfivetech.com>
> Cc: David S . Miller <davem at davemloft.net>; Rob Herring
> <robh+dt at kernel.org>; Krzysztof Kozlowski
> <krzysztof.kozlowski+dt at linaro.org>; Emil Renner Berthing
> <kernel at esmil.dk>; Conor Dooley <conor.dooley at microchip.com>; linux-
> crypto at vger.kernel.org; devicetree at vger.kernel.org; linux-
> kernel at vger.kernel.org; linux-riscv at lists.infradead.org
> Subject: Re: [PATCH v2 4/4] crypto: starfive - Add hash and HMAC support
> 
> On Thu, Feb 09, 2023 at 09:33:06AM +0000, JiaJie Ho wrote:
> >
> > The DMA can only support 32-bit addressing.
> > So, I am copying everything in case kernel allocated memory region >32-bit
> for a user app.
> 
> Does your hardware support scatter-and-gather? If so you should at least
> allocate individual pages rather than one contiguous buffer.
> 
> Then you can allocate them on-demand rather than before-hand.
> 
> It would also be nice to not do the copy if the input you were given was in
> low memory (and contiguous if your hardware doesn't do SG).
> 

I'll try this then.

Thanks,
Jia Jie



More information about the linux-riscv mailing list