From: Herbert Xu <herbert@gondor.apana.org.au>
To: Christian Lamparter <chunkeey@gmail.com>
Cc: linux-crypto@vger.kernel.org
Subject: Re: [PATCH 1/2] crypto: crypto4xx - reduce memory fragmentation
Date: Thu, 9 Jan 2020 13:14:27 +0800 [thread overview]
Message-ID: <20200109051427.2ojms7r2xonz4esh@gondor.apana.org.au> (raw)
In-Reply-To: <3913dbe4b3256ead342572f7aba726a60ab5fd43.1577917078.git.chunkeey@gmail.com>
On Wed, Jan 01, 2020 at 11:27:01PM +0100, Christian Lamparter wrote:
> With recent kernels (>5.2), the driver fails to probe, as the
> allocation of the driver's scatter buffer fails with -ENOMEM.
>
> This happens in crypto4xx_build_sdr(). Where the driver tries
> to get 512KiB (=PPC4XX_SD_BUFFER_SIZE * PPC4XX_NUM_SD) of
> continuous memory. This big chunk is by design, since the driver
> uses this circumstance in the crypto4xx_copy_pkt_to_dst() to
> its advantage:
> "all scatter-buffers are all neatly organized in one big
> continuous ringbuffer; So scatterwalk_map_and_copy() can be
> instructed to copy a range of buffers in one go."
>
> The PowerPC arch does not have support for DMA_CMA. Hence,
> this patch reorganizes the order in which the memory
> allocations are done. Since the driver itself is responsible
> for some of the issues.
>
> Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
> ---
> drivers/crypto/amcc/crypto4xx_core.c | 27 +++++++++++++--------------
> 1 file changed, 13 insertions(+), 14 deletions(-)
All applied. Thanks.
--
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
prev parent reply other threads:[~2020-01-09 5:14 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-01 22:27 [PATCH 1/2] crypto: crypto4xx - reduce memory fragmentation Christian Lamparter
2020-01-01 22:27 ` [PATCH 2/2] crypto: crypto4xx - use GFP_KERNEL for big allocations Christian Lamparter
2020-01-09 5:14 ` Herbert Xu [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200109051427.2ojms7r2xonz4esh@gondor.apana.org.au \
--to=herbert@gondor.apana.org.au \
--cc=chunkeey@gmail.com \
--cc=linux-crypto@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).