remoteproc: elf_loader: Fix loading segment when is_iomem true
authorPeng Fan <peng.fan@nxp.com>
Fri, 10 Sep 2021 09:06:16 +0000 (17:06 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 17 Nov 2021 10:04:48 +0000 (11:04 +0100)
commit69dbe49b7eac011f0cd5095fafb65196b02ab819
treeb85ff0c468bb51da7a57a898168d62310d1e0aef
parent7d1ece44014bd1b320f19572850c138605a15fb5
remoteproc: elf_loader: Fix loading segment when is_iomem true

commit 24acbd9dc934f5d9418a736c532d3970a272063e upstream.

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

Fixes: 40df0a91b2a5 ("remoteproc: add is_iomem to da_to_va")
Tested-by: Dong Aisheng <aisheng.dong@nxp.com> (i.MX8MQ)
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dong Aisheng <aisheng.dong@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Cc: stable <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20210910090621.3073540-2-peng.fan@oss.nxp.com
Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/remoteproc/remoteproc_elf_loader.c