]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - rpmsg/rpmsg.git/commit
HACK: ARM: dma-mapping: create non-zeroing dma_map_ops
authorMartin Ambrose <martin@ti.com>
Thu, 12 Sep 2019 17:45:07 +0000 (17:45 +0000)
committerSuman Anna <s-anna@ti.com>
Mon, 23 Sep 2019 01:46:53 +0000 (20:46 -0500)
commit63af67b91f47f4724fdab9f06ef464fc97ed6ce5
tree754cbb0bf56b069621b10845167f76cf2733d12c
parente97b79f995e9da9891c10a664b11422dfab767d0
HACK: ARM: dma-mapping: create non-zeroing dma_map_ops

A new dma_ops, 'arm_dma_m_ops', is created from a copy of the
standard 'arm_dma_ops' but with a new non-zeroing .alloc method.

These ops are added mainly to support a 'late attach' feature in
the OMAP remoteproc driver. When remoteproc does a 'late attach'
to a remote processor, it does not load any firmware contents into
memory, but it still needs to allocate the processor's CMA memory
to mark the memory as reserved/used from the kernel. The standard
'arm_dma_ops' contains an .alloc method that zeroes out the memory,
thereby overwriting the firmware code/data in the memory that was
pre-loaded before the Linux kernel has booted.

This scenario is handled by adding a new non-zeroing allocation
function and using it as the .alloc method in a copy of the
'arm_dma_ops'. The so created 'arm_dma_m_ops' will be assigned
as the rproc device's dma_ops when supporting the 'late attach'
functionality.

Signed-off-by: Martin Ambrose <martin@ti.com>
Signed-off-by: Robert Tivy <rtivy@ti.com>
Signed-off-by: Suman Anna <s-anna@ti.com>
Signed-off-by: Amarinder Bindra <a-bindra@ti.com>
Signed-off-by: Venkateswara Rao Mandela <venkat.mandela@ti.com>
Signed-off-by: Angela Stegmaier <angelabaker@ti.com>
Signed-off-by: Keerthy <j-keerthy@ti.com>
arch/arm/include/asm/dma-mapping.h
arch/arm/mm/dma-mapping.c