summaryrefslogtreecommitdiff
path: root/drivers/crypto/fsl/jr.h
diff options
context:
space:
mode:
authorRuchika Gupta <ruchika.gupta@freescale.com>2016-01-22 16:12:55 +0530
committerYork Sun <york.sun@nxp.com>2016-02-24 08:40:55 -0800
commit7f4736bd657afca7c224efb27cab496acd9ee021 (patch)
tree220d20afa187710fc718f561416a264889ceecf7 /drivers/crypto/fsl/jr.h
parent9e71bb9ca232038e8cdc1090cf218871afb6904a (diff)
drivers/crypto/fsl : Allocate output ring with size aligned to CACHELNE SIZE
The output ring needs to be invalidated before enqueuing the job to SEC. While allocation of space to output ring, it should be taken care that the size is cacheline size aligned inorder to prevent invalidating valid data. The patch also correct the method of aligning end of structs while flushing caches Since start = align(start_of_struct), it is incorrect to assign end = align(start + struct_size). It should instead be, end = align(start_of_struct + struct_size). Signed-off-by: Saksham Jain <saksham@nxp.com> Signed-off-by: Ruchika Gupta <ruchika.gupta@nxp.com> Reviewed-by: York Sun <york.sun@nxp.com>
Diffstat (limited to 'drivers/crypto/fsl/jr.h')
-rw-r--r--drivers/crypto/fsl/jr.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/crypto/fsl/jr.h b/drivers/crypto/fsl/jr.h
index 5899696e8ad..545d964cedd 100644
--- a/drivers/crypto/fsl/jr.h
+++ b/drivers/crypto/fsl/jr.h
@@ -72,6 +72,8 @@ struct jobring {
int write_idx;
/* Size of the rings. */
int size;
+ /* Op ring size aligned to cache line size */
+ int op_size;
/* The ip and output rings have to be accessed by SEC. So the
* pointers will ahve to point to the housekeeping region provided
* by SEC