From: Steffen Trumtrar <s.trumtrar@pengutronix.de>
To: Victoria Milhoan <vicki.milhoan@freescale.com>
Cc: linux-crypto@vger.kernel.org, herbert@gondor.apana.org.au,
horia.geanta@freescale.com, ruchika.gupta@freescale.com
Subject: Re: [PATCH RFC 05/11] crypto: caam - Add cache coherency support to Freescale CAAM scatterlist implementation
Date: Wed, 17 Jun 2015 09:44:09 +0200 [thread overview]
Message-ID: <20150617074409.GL7947@pengutronix.de> (raw)
In-Reply-To: <1434412379-11623-6-git-send-email-vicki.milhoan@freescale.com>
On Mon, Jun 15, 2015 at 04:52:53PM -0700, Victoria Milhoan wrote:
> Add cache coherency support to the CAAM scatterlist implementation.
>
> Signed-off-by: Victoria Milhoan <vicki.milhoan@freescale.com>
> ---
> drivers/crypto/caam/sg_sw_sec4.h | 12 ++++++++++--
> 1 file changed, 10 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/crypto/caam/sg_sw_sec4.h b/drivers/crypto/caam/sg_sw_sec4.h
> index 6365585..6730b01 100644
> --- a/drivers/crypto/caam/sg_sw_sec4.h
> +++ b/drivers/crypto/caam/sg_sw_sec4.h
> @@ -91,9 +91,14 @@ static int dma_map_sg_chained(struct device *dev, struct scatterlist *sg,
> {
> if (unlikely(chained)) {
> int i;
> + struct scatterlist *tsg = sg;
> +
> + /* We use a local copy of the sg pointer to avoid moving the
> + * head of the list pointed to by sg as we wall the list.
> + */
> for (i = 0; i < nents; i++) {
> - dma_map_sg(dev, sg, 1, dir);
> - sg = sg_next(sg);
> + dma_map_sg(dev, tsg, 1, dir);
> + tsg = scatterwalk_sg_next(tsg);
> }
> } else {
> dma_map_sg(dev, sg, nents, dir);
> @@ -106,6 +111,9 @@ static int dma_unmap_sg_chained(struct device *dev, struct scatterlist *sg,
> unsigned int nents, enum dma_data_direction dir,
> bool chained)
> {
> + if ((dir == DMA_FROM_DEVICE) || (dir == DMA_BIDIRECTIONAL))
> + dma_sync_sg_for_cpu(dev, sg, nents, dir);
> +
> if (unlikely(chained)) {
> int i;
> for (i = 0; i < nents; i++) {
You don't need to sync here, because you unmap it directly afterwards.
Regards,
Steffen
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
next prev parent reply other threads:[~2015-06-17 7:44 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-15 23:52 [PATCH RFC 00/11] crypto: caam - Add i.MX6 support to the Freescale CAAM driver Victoria Milhoan
2015-06-15 23:52 ` [PATCH RFC 01/11] crypto: caam - Add cache coherency support Victoria Milhoan
2015-06-16 1:35 ` Herbert Xu
2015-06-16 2:33 ` Herbert Xu
2015-06-16 3:29 ` Herbert Xu
2015-06-17 8:23 ` Steffen Trumtrar
2015-06-15 23:52 ` [PATCH RFC 02/11] crypto: caam - Add register I/O primitives for ARM compatibility Victoria Milhoan
2015-06-15 23:52 ` [PATCH RFC 03/11] crypto: caam - Enable and disable clocks on Freescale i.MX platforms Victoria Milhoan
2015-06-16 4:30 ` Herbert Xu
2015-06-16 4:32 ` Herbert Xu
2015-06-15 23:52 ` [PATCH RFC 04/11] crypto: caam - Modify Freescale CAAM driver Scatter Gather entry definition Victoria Milhoan
2015-06-15 23:52 ` [PATCH RFC 05/11] crypto: caam - Add cache coherency support to Freescale CAAM scatterlist implementation Victoria Milhoan
2015-06-16 6:04 ` Herbert Xu
2015-06-17 7:44 ` Steffen Trumtrar [this message]
2015-06-15 23:52 ` [PATCH RFC 06/11] crypto: caam - Enable MXC devices to select CAAM driver in Kconfig Victoria Milhoan
2015-06-17 7:27 ` Steffen Trumtrar
2015-07-24 17:14 ` Horia Geantă
2015-07-25 1:43 ` Herbert Xu
2015-06-15 23:52 ` [PATCH RFC 07/11] crypto: caam - Unmap data prior to displaying data in print statements Victoria Milhoan
2015-06-15 23:52 ` [PATCH RFC 08/11] crypto: caam - improve initalization for context state saves Victoria Milhoan
2015-06-16 6:41 ` Herbert Xu
2015-06-15 23:52 ` [PATCH RFC 09/11] crypto: caam - Fix incorrect size when DMA unmapping buffer Victoria Milhoan
2015-06-16 6:41 ` Herbert Xu
2015-06-15 23:52 ` [PATCH RFC 10/11] crypto: caam - Provide correct value to iounmap() in controller driver Victoria Milhoan
2015-06-16 6:41 ` Herbert Xu
2015-06-15 23:52 ` [PATCH RFC 11/11] crypto: caam - fix RNG buffer cache alignment Victoria Milhoan
2015-06-16 6:41 ` Herbert Xu
2015-06-16 0:34 ` [PATCH RFC 00/11] crypto: caam - Add i.MX6 support to the Freescale CAAM driver Herbert Xu
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=20150617074409.GL7947@pengutronix.de \
--to=s.trumtrar@pengutronix.de \
--cc=herbert@gondor.apana.org.au \
--cc=horia.geanta@freescale.com \
--cc=linux-crypto@vger.kernel.org \
--cc=ruchika.gupta@freescale.com \
--cc=vicki.milhoan@freescale.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.