linux/drivers/crypto/caam
Bharat Bhushan 1af8ea862c crypto: caam - Using alloc_coherent for caam job rings
The caam job rings (input/output job ring) are allocated using
dma_map_single(). These job rings can be visualized as the ring
buffers in which the jobs are en-queued/de-queued. The s/w enqueues
the jobs in input job ring which h/w dequeues and after processing
it copies the jobs in output job ring. Software then de-queues the
job from output ring. Using dma_map/unmap_single() is not preferred
way to allocate memory for this type of requirements because this
adds un-necessary complexity.

Example, if bounce buffer (SWIOTLB) will get used then to make any
change visible in this memory to other processing unit requires
dmap_unmap_single() or dma_sync_single_for_cpu/device(). The
dma_unmap_single() can not be used as this will free the bounce
buffer, this will require changing the job rings on running system
and I seriously doubt that it will be not possible or very complex
to implement. Also using dma_sync_single_for_cpu/device() will also
add unnecessary complexity.

The simple and preferred way is using dma_alloc_coherent() for these
type of memory requirements.

This resolves the Linux boot crash issue when "swiotlb=force" is set
in bootargs on systems which have memory more than 4G.

Signed-off-by: Bharat Bhushan <bharat.bhushan@freescale.com>
Acked-by: Kim Phillips <kim.phillips@freescale.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2012-07-11 11:06:10 +08:00
..
Kconfig crypto: caam - disable IRQ coalescing by default 2012-06-27 14:42:06 +08:00
Makefile crypto: caam - hwrng support 2012-06-27 14:42:06 +08:00
caamalg.c crypto: caam - chaining support 2012-06-27 14:42:05 +08:00
caamhash.c crypto: caam - chaining support 2012-06-27 14:42:05 +08:00
caamrng.c crypto: caam - hwrng support 2012-06-27 14:42:06 +08:00
compat.h crypto: caam - ahash hmac support 2012-06-27 14:42:05 +08:00
ctrl.c crypto: caam - add support for SEC v5.x RNG4 2012-06-27 14:42:06 +08:00
desc.h crypto: caam - add support for SEC v5.x RNG4 2012-06-27 14:42:06 +08:00
desc_constr.h crypto: caam - support external seq in/out lengths 2012-06-27 14:42:04 +08:00
error.c crypto: caam - add support for SEC v5.x RNG4 2012-06-27 14:42:06 +08:00
error.h crypto: caam - fix printk recursion for long error texts 2011-05-04 15:15:06 +10:00
intern.h crypto: caam - one tasklet per job ring 2012-06-27 14:42:07 +08:00
jr.c crypto: caam - Using alloc_coherent for caam job rings 2012-07-11 11:06:10 +08:00
jr.h
key_gen.c crypto: caam - refactor key_gen, sg 2012-06-27 14:42:05 +08:00
key_gen.h crypto: caam - refactor key_gen, sg 2012-06-27 14:42:05 +08:00
pdb.h crypto: caam - add PDB (Protocol Descriptor Block) definitions 2012-06-27 14:42:04 +08:00
regs.h crypto: caam - add support for SEC v5.x RNG4 2012-06-27 14:42:06 +08:00
sg_sw_sec4.h crypto: caam - chaining support 2012-06-27 14:42:05 +08:00