]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
remoteproc: pru: Fix firmware loading crashes on K3 SoCs
authorSuman Anna <s-anna@ti.com>
Mon, 15 Mar 2021 20:58:59 +0000 (15:58 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 14 Apr 2021 06:47:16 +0000 (08:47 +0200)
commit8ac165db522d30098b79b4732c54d5776bf99f5e
tree1b0e1a77b012df0802ba7e63d7950aaa556693e0
parente602597291746dc6c517809fda86446be01ff8db
remoteproc: pru: Fix firmware loading crashes on K3 SoCs

[ Upstream commit 9afeefcf06fc7b4bdab06a6e2cb06745bded34dd ]

The K3 PRUs are 32-bit processors and in general have some limitations
in using the standard ARMv8 memcpy function for loading firmware segments,
so the driver already uses a custom memcpy implementation. This added
logic however is limited to only IRAMs at the moment, but the loading
into Data RAMs is not completely ok either and does generate a kernel
crash for unaligned accesses.

Fix these crashes by removing the existing IRAM logic limitation and
extending the custom memcpy usage to Data RAMs as well for all K3 SoCs.

Fixes: 1d39f4d19921 ("remoteproc: pru: Add support for various PRU cores on K3 AM65x SoCs")
Signed-off-by: Suman Anna <s-anna@ti.com>
Link: https://lore.kernel.org/r/20210315205859.19590-1-s-anna@ti.com
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/remoteproc/pru_rproc.c