Skip to content

Commit 423e85e

Browse files
hanzydmmind
authored andcommitted
ARM: rockchip: Use memcpy_toio instead of memcpy on smp bring-up
This fixes a potential kernel panic on memcpy when FORTIFY_SOURCE is enabled. Because memory is iomem use appropriate function for accessing it. Signed-off-by: Ivan T. Ivanov <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Heiko Stuebner <[email protected]>
1 parent fa55b7d commit 423e85e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

arch/arm/mach-rockchip/platsmp.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ static int __init rockchip_smp_prepare_sram(struct device_node *node)
189189
rockchip_boot_fn = __pa_symbol(secondary_startup);
190190

191191
/* copy the trampoline to sram, that runs during startup of the core */
192-
memcpy(sram_base_addr, &rockchip_secondary_trampoline, trampoline_sz);
192+
memcpy_toio(sram_base_addr, &rockchip_secondary_trampoline, trampoline_sz);
193193
flush_cache_all();
194194
outer_clean_range(0, trampoline_sz);
195195

0 commit comments

Comments
 (0)