Patch "remoteproc: elf_loader: Fix loading segment when is_iomem true" has been added to the 5.15-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    remoteproc: elf_loader: Fix loading segment when is_iomem true

to the 5.15-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     remoteproc-elf_loader-fix-loading-segment-when-is_iomem-true.patch
and it can be found in the queue-5.15 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.


>From 24acbd9dc934f5d9418a736c532d3970a272063e Mon Sep 17 00:00:00 2001
From: Peng Fan <peng.fan@xxxxxxx>
Date: Fri, 10 Sep 2021 17:06:16 +0800
Subject: remoteproc: elf_loader: Fix loading segment when is_iomem true

From: Peng Fan <peng.fan@xxxxxxx>

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@xxxxxxx> (i.MX8MQ)
Reported-by: kernel test robot <lkp@xxxxxxxxx>
Reported-by: Dong Aisheng <aisheng.dong@xxxxxxx>
Signed-off-by: Peng Fan <peng.fan@xxxxxxx>
Cc: stable <stable@xxxxxxxxxxxxxxx>
Link: https://lore.kernel.org/r/20210910090621.3073540-2-peng.fan@xxxxxxxxxxx
Signed-off-by: Mathieu Poirier <mathieu.poirier@xxxxxxxxxx>
Signed-off-by: Bjorn Andersson <bjorn.andersson@xxxxxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
---
 drivers/remoteproc/remoteproc_elf_loader.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- 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
 		/* 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((void __iomem *)ptr, elf_data + offset, filesz);
 			else
 				memcpy(ptr, elf_data + offset, filesz);
 		}


Patches currently in stable-queue which might be from peng.fan@xxxxxxx are

queue-5.15/remoteproc-elf_loader-fix-loading-segment-when-is_iomem-true.patch
queue-5.15/remoteproc-imx_rproc-fix-ignoring-mapping-vdev-regions.patch
queue-5.15/remoteproc-imx_rproc-fix-rsc-table-name.patch
queue-5.15/remoteproc-imx_rproc-fix-tcm-io-memory-type.patch
queue-5.15/remoteproc-fix-the-wrong-default-value-of-is_iomem.patch



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux