-
- Downloads
soc: qcom: peripheral-loader: Skip kernel mapping for dma regions
Peripheral loader requesting for dma allocation could have regions which
are either carveout or cma region. In case of a carveout which could be
large area, the allocation could fail due to constraints of vmalloc
space.
To avoid allocation failure, set the dma attribute to NO_KERNEL_MAPPING
for all requested allocations.
When NO_KERNEL_MAPPING is set as an attribute, dma allocation for
carveout will return a dummy allocated address and for a cma region a
valid address will be returned, but the kernel mapping for that address
will not exist.
When peripheral loader requires the firmware data to be copied or the
address region to be zeroed-out, it will perform:
map_fw_mem will invoke dma_remap api which will take care of
- ioremap the address for carveout and provide a valid virtual
address for a requested size.
- remap the address, update the kernel mapping for cma regions
and provide a valid virtual address for a requested size.
unmap_fw_mem will invoke dma_unremap api will take care of
- iounmap the address for carveout regions for a requested size.
- remove the kernel mapping for requested size.
Pass the buffer size from firmware driver to peripheral loader for
dma_unremap.
Change-Id: Ic1feecbd604008da62ef7a84b07ab8cad2baee94
Signed-off-by:
Taniya Das <tdas@codeaurora.org>
Showing
- drivers/base/firmware_class.c 10 additions, 8 deletionsdrivers/base/firmware_class.c
- drivers/soc/qcom/peripheral-loader.c 21 additions, 19 deletionsdrivers/soc/qcom/peripheral-loader.c
- drivers/soc/qcom/peripheral-loader.h 5 additions, 1 deletiondrivers/soc/qcom/peripheral-loader.h
- include/linux/firmware.h 3 additions, 2 deletionsinclude/linux/firmware.h
Loading
Please register or sign in to comment