diff options
author | Max Filippov <jcmvbkbc@gmail.com> | 2023-06-06 18:54:10 -0700 |
---|---|---|
committer | Max Filippov <jcmvbkbc@gmail.com> | 2023-06-12 19:48:56 -0700 |
commit | 11976fe2a47aa952b8fec54bc2bd54d57642f650 (patch) | |
tree | 4cd122a0864ab08b5591dc17fbc4a0f113d771a8 /arch/xtensa/kernel | |
parent | 71a5fd7d89fb6e6071f041ba1b55837837ccddb8 (diff) |
xtensa: drop platform_restart
Instead of using xtensa-specific platform_restart callback use
do_kernel_restart in the machine_restart implementation and reimplement
existing platform_restart users with register_restart_handler.
Drop platform_restart declaration and default implementation.
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
Diffstat (limited to 'arch/xtensa/kernel')
-rw-r--r-- | arch/xtensa/kernel/platform.c | 1 | ||||
-rw-r--r-- | arch/xtensa/kernel/setup.c | 8 |
2 files changed, 7 insertions, 2 deletions
diff --git a/arch/xtensa/kernel/platform.c b/arch/xtensa/kernel/platform.c index bb4d426ebb44..526ab744271f 100644 --- a/arch/xtensa/kernel/platform.c +++ b/arch/xtensa/kernel/platform.c @@ -28,7 +28,6 @@ _F(void, init, (bp_tag_t *first), { }); _F(void, setup, (char** cmd), { }); -_F(void, restart, (void), { while(1); }); _F(void, halt, (void), { while(1); }); _F(void, power_off, (void), { while(1); }); _F(void, idle, (void), { __asm__ __volatile__ ("waiti 0" ::: "memory"); }); diff --git a/arch/xtensa/kernel/setup.c b/arch/xtensa/kernel/setup.c index 9191738f9941..8f72039335c2 100644 --- a/arch/xtensa/kernel/setup.c +++ b/arch/xtensa/kernel/setup.c @@ -22,6 +22,7 @@ #include <linux/screen_info.h> #include <linux/kernel.h> #include <linux/percpu.h> +#include <linux/reboot.h> #include <linux/cpu.h> #include <linux/of.h> #include <linux/of_fdt.h> @@ -522,7 +523,12 @@ void cpu_reset(void) void machine_restart(char * cmd) { - platform_restart(); + local_irq_disable(); + smp_send_stop(); + do_kernel_restart(cmd); + pr_err("Reboot failed -- System halted\n"); + while (1) + cpu_relax(); } void machine_halt(void) |