All of lore.kernel.org
 help / color / mirror / Atom feed
From: Russell King <rmk+kernel@arm.linux.org.uk>
To: Fabio Estevam <fabio.estevam@freescale.com>,
	Herbert Xu <herbert@gondor.apana.org.au>
Cc: "David S. Miller" <davem@davemloft.net>, linux-crypto@vger.kernel.org
Subject: [PATCH 04/11] crypto: caam: mark the hardware descriptor as cache line aligned
Date: Mon, 08 Aug 2016 18:04:47 +0100	[thread overview]
Message-ID: <E1bWnyp-0002Vf-MD@rmk-PC.armlinux.org.uk> (raw)
In-Reply-To: <20160808170400.GC1041@n2100.armlinux.org.uk>

Mark the hardware descriptor as being cache line aligned; on DMA
incoherent architectures, the hardware descriptor should sit in a
separate cache line from the CPU accessed data to avoid polluting
the caches.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
---
 drivers/crypto/caam/caamhash.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/crypto/caam/caamhash.c b/drivers/crypto/caam/caamhash.c
index ce9c1bc23795..e9c52cbf9a41 100644
--- a/drivers/crypto/caam/caamhash.c
+++ b/drivers/crypto/caam/caamhash.c
@@ -604,7 +604,7 @@ struct ahash_edesc {
 	int src_nents;
 	int sec4_sg_bytes;
 	struct sec4_sg_entry *sec4_sg;
-	u32 hw_desc[DESC_JOB_IO_LEN / sizeof(u32)];
+	u32 hw_desc[DESC_JOB_IO_LEN / sizeof(u32)] ____cacheline_aligned;
 };
 
 static inline void ahash_unmap(struct device *dev,
-- 
2.1.0

  parent reply	other threads:[~2016-08-08 17:04 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-08 17:04 [PATCH 00/11] Further iMX CAAM updates Russell King - ARM Linux
2016-08-08 17:04 ` [PATCH 01/11] crypto: caam: fix DMA API mapping leak Russell King
2016-08-08 17:04 ` [PATCH 02/11] crypto: caam: ensure descriptor buffers are cacheline aligned Russell King
2016-08-08 17:04 ` [PATCH 03/11] crypto: caam: incorporate job descriptor into struct ahash_edesc Russell King
2016-08-08 17:04 ` Russell King [this message]
2016-08-08 17:04 ` [PATCH 05/11] crypto: caam: replace sec4_sg pointer with array Russell King
2016-08-08 17:04 ` [PATCH 06/11] crypto: caam: ensure that we clean up after an error Russell King
2016-08-08 17:05 ` [PATCH 07/11] crypto: caam: check and use dma_map_sg() return code Russell King
2016-08-08 17:05 ` [PATCH 08/11] crypto: caam: add ahash_edesc_alloc() for descriptor allocation Russell King
2016-08-08 17:05 ` [PATCH 09/11] crypto: caam: move job descriptor initialisation to ahash_edesc_alloc() Russell King
2016-08-08 17:05 ` [PATCH 10/11] crypto: caam: add ahash_edesc_add_src() Russell King
2016-08-08 17:05 ` [PATCH 11/11] crypto: caam: get rid of tasklet Russell King
2016-08-08 17:36 ` [PATCH 00/11] Further iMX CAAM updates Fabio Estevam
2016-08-09 11:02 ` 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=E1bWnyp-0002Vf-MD@rmk-PC.armlinux.org.uk \
    --to=rmk+kernel@arm.linux.org.uk \
    --cc=davem@davemloft.net \
    --cc=fabio.estevam@freescale.com \
    --cc=herbert@gondor.apana.org.au \
    --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 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.