tmp_suning_uos_patched/arch/xtensa
Guenter Roeck 546c04c857 xtensa: xtfpga: Try software restart before simulating CPU reset
[ Upstream commit 012e974501a270d8dfd4ee2039e1fdf7579c907e ]

Rebooting xtensa images loaded with the '-kernel' option in qemu does
not work. When executing a reboot command, the qemu session either hangs
or experiences an endless sequence of error messages.

  Kernel panic - not syncing: Unrecoverable error in exception handler

Reset code jumps to the CPU restart address, but Linux can not recover
from there because code and data in the kernel init sections have been
discarded and overwritten at this point.

XTFPGA platforms have a means to reset the CPU by writing 0xdead into a
specific FPGA IO address. When used in QEMU the kernel image loaded with
the '-kernel' option gets restored to its original state allowing the
machine to boot successfully.

Use that mechanism to attempt a platform reset. If it does not work,
fall back to the existing mechanism.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2021-10-27 09:56:47 +02:00
..
boot
configs
include xtensa: use CONFIG_USE_OF instead of CONFIG_OF 2021-10-13 10:04:26 +02:00
kernel xtensa: call irqchip_init only when CONFIG_USE_OF is selected 2021-10-13 10:04:26 +02:00
lib
mm xtensa: use CONFIG_USE_OF instead of CONFIG_OF 2021-10-13 10:04:26 +02:00
oprofile
platforms xtensa: xtfpga: Try software restart before simulating CPU reset 2021-10-27 09:56:47 +02:00
variants
Kconfig xtensa: fix kconfig unmet dependency warning for HAVE_FUTEX_CMPXCHG 2021-09-08 08:49:00 +02:00
Kconfig.debug
Makefile