1
0
Fork 0

MLK-23754-14 remoteproc: elf_loader: drop unneedded memset

The memset is actually not needed and it could cause kernel dump
on i.MX8M platform, because TCM is device memory in i.MX8M,
memset on ARM64 has dc zva instruction. This instruction
will trigger alignment abort to device memory per ARMv8 Doc.

Reviewed-by: Richard Zhu <hongxing.zhu@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
5.4-rM2-2.2.x-imx-squashed
Peng Fan 2020-03-23 16:23:37 +08:00
parent 865a9688c1
commit 00815a39af
1 changed files with 0 additions and 9 deletions

View File

@ -185,15 +185,6 @@ int rproc_elf_load_segments(struct rproc *rproc, const struct firmware *fw)
if (phdr->p_filesz)
memcpy(ptr, elf_data + phdr->p_offset, filesz);
/*
* Zero out remaining memory for this segment.
*
* This isn't strictly required since dma_alloc_coherent already
* did this for us. albeit harmless, we may consider removing
* this.
*/
if (memsz > filesz)
memset(ptr + filesz, 0, memsz - filesz);
}
return ret;