hc
2024-12-19 9370bb92b2d16684ee45cf24e879c93c509162da
kernel/arch/arm/kernel/reboot.c
....@@ -1,10 +1,7 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * Copyright (C) 1996-2000 Russell King - Converted to ARM.
34 * Original Copyright (C) 1995 Linus Torvalds
4
- *
5
- * This program is free software; you can redistribute it and/or modify
6
- * it under the terms of the GNU General Public License version 2 as
7
- * published by the Free Software Foundation.
85 */
96 #include <linux/cpu.h>
107 #include <linux/delay.h>
....@@ -21,7 +18,6 @@
2118 /*
2219 * Function pointers to optional machine specific functions
2320 */
24
-void (*arm_pm_restart)(enum reboot_mode reboot_mode, const char *cmd);
2521 void (*pm_power_off)(void);
2622 EXPORT_SYMBOL(pm_power_off);
2723
....@@ -91,11 +87,11 @@
9187 * to execute e.g. a RAM-based pin loop is not sufficient. This allows the
9288 * kexec'd kernel to use any and all RAM as it sees fit, without having to
9389 * avoid any code or data used by any SW CPU pin loop. The CPU hotplug
94
- * functionality embodied in disable_nonboot_cpus() to achieve this.
90
+ * functionality embodied in smp_shutdown_nonboot_cpus() to achieve this.
9591 */
9692 void machine_shutdown(void)
9793 {
98
- disable_nonboot_cpus();
94
+ smp_shutdown_nonboot_cpus(reboot_cpu);
9995 }
10096
10197 /*
....@@ -142,11 +138,7 @@
142138 smp_send_stop();
143139
144140 do_kernel_pre_restart(cmd);
145
-
146
- if (arm_pm_restart)
147
- arm_pm_restart(reboot_mode, cmd);
148
- else
149
- do_kernel_restart(cmd);
141
+ do_kernel_restart(cmd);
150142
151143 /* Give a grace period for failure to restart of 1s */
152144 mdelay(1000);