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
parent
865a9688c1
commit
00815a39af
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue