All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] remoteproc: elf_loader: fix loading segment when is_iomem true
@ 2021-06-28  7:06 ` Peng Fan (OSS)
  0 siblings, 0 replies; 18+ messages in thread
From: Peng Fan (OSS) @ 2021-06-28  7:06 UTC (permalink / raw)
  To: ohad, bjorn.andersson, mathieu.poirier, o.rempel
  Cc: shawnguo, s.hauer, kernel, festevam, linux-imx, linux-remoteproc,
	linux-arm-kernel, linux-kernel, aisheng.dong, Peng Fan

From: Peng Fan <peng.fan@nxp.com>

It seems luckliy work on i.MX platform, but it is wrong.
Need use memcpy_toio, not memcpy_fromio.

Fixes: 40df0a91b2a52 ("remoteproc: add is_iomem to da_to_va")
Tested-by: Dong Aisheng <aisheng.dong@nxp.com> (i.MX8MQ)
Reported-by: Dong Aisheng <aisheng.dong@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
---
 drivers/remoteproc/remoteproc_elf_loader.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/remoteproc/remoteproc_elf_loader.c b/drivers/remoteproc/remoteproc_elf_loader.c
index 469c52e62faf..e8078efb3dec 100644
--- a/drivers/remoteproc/remoteproc_elf_loader.c
+++ b/drivers/remoteproc/remoteproc_elf_loader.c
@@ -220,7 +220,7 @@ int rproc_elf_load_segments(struct rproc *rproc, const struct firmware *fw)
 		/* put the segment where the remote processor expects it */
 		if (filesz) {
 			if (is_iomem)
-				memcpy_fromio(ptr, (void __iomem *)(elf_data + offset), filesz);
+				memcpy_toio(ptr, (void __iomem *)(elf_data + offset), filesz);
 			else
 				memcpy(ptr, elf_data + offset, filesz);
 		}
-- 
2.30.0


^ permalink raw reply related	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2021-07-06 12:56 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-28  7:06 [PATCH] remoteproc: elf_loader: fix loading segment when is_iomem true Peng Fan (OSS)
2021-06-28  7:06 ` Peng Fan (OSS)
2021-06-28  8:52 ` kernel test robot
2021-06-28  8:52   ` kernel test robot
2021-06-28 13:45 ` kernel test robot
2021-06-28 13:45   ` kernel test robot
2021-06-28 14:23 ` kernel test robot
2021-06-28 14:23   ` kernel test robot
2021-06-28 16:16 ` Bjorn Andersson
2021-06-28 16:16   ` Bjorn Andersson
2021-07-01 16:15 ` kernel test robot
2021-07-01 16:15   ` kernel test robot
2021-07-05  7:22 ` kernel test robot
2021-07-05  7:22   ` kernel test robot
2021-07-05 21:07 ` kernel test robot
2021-07-05 21:07   ` kernel test robot
2021-07-06 12:55 ` kernel test robot
2021-07-06 12:55   ` kernel test robot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.