Commit 8e613cec authored by Herbert Xu's avatar Herbert Xu

crypto: talitos - Remove GFP_DMA and add DMA alignment padding

GFP_DMA does not guarantee that the returned memory is aligned
for DMA.  It should be removed where it is superfluous.

However, kmalloc may start returning DMA-unaligned memory in future
so fix this by adding the alignment by hand.
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
parent 199354d7
...@@ -1393,7 +1393,7 @@ static struct talitos_edesc *talitos_edesc_alloc(struct device *dev, ...@@ -1393,7 +1393,7 @@ static struct talitos_edesc *talitos_edesc_alloc(struct device *dev,
alloc_len += sizeof(struct talitos_desc); alloc_len += sizeof(struct talitos_desc);
alloc_len += ivsize; alloc_len += ivsize;
edesc = kmalloc(alloc_len, GFP_DMA | flags); edesc = kmalloc(ALIGN(alloc_len, dma_get_cache_alignment()), flags);
if (!edesc) if (!edesc)
return ERR_PTR(-ENOMEM); return ERR_PTR(-ENOMEM);
if (ivsize) { if (ivsize) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment