crypto: caam - treat SGT address pointer as u64
Even for i.MX, CAAM is able to use address pointers greater than 32 bits, the address pointer field being interpreted as a double word. Enforce u64 address pointer in the sec4_sg_entry struct. This patch fixes the SGT address pointer endianness issue for 32bit platforms where core endianness != caam endianness. Signed-off-by: Tudor Ambarus <tudor-dan.ambarus@nxp.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
这个提交包含在:
@@ -196,6 +196,14 @@ static inline u64 rd_reg64(void __iomem *reg)
|
||||
#define caam_dma_to_cpu(value) caam32_to_cpu(value)
|
||||
#endif /* CONFIG_ARCH_DMA_ADDR_T_64BIT */
|
||||
|
||||
#ifdef CONFIG_CRYPTO_DEV_FSL_CAAM_IMX
|
||||
#define cpu_to_caam_dma64(value) \
|
||||
(((u64)cpu_to_caam32(lower_32_bits(value)) << 32) | \
|
||||
(u64)cpu_to_caam32(upper_32_bits(value)))
|
||||
#else
|
||||
#define cpu_to_caam_dma64(value) cpu_to_caam64(value)
|
||||
#endif
|
||||
|
||||
/*
|
||||
* jr_outentry
|
||||
* Represents each entry in a JobR output ring
|
||||
|
在新工单中引用
屏蔽一个用户