hc
2024-01-03 2f7c68cb55ecb7331f2381deb497c27155f32faf
kernel/arch/mips/cavium-octeon/smp.c
....@@ -15,6 +15,7 @@
1515 #include <linux/sched/task_stack.h>
1616 #include <linux/init.h>
1717 #include <linux/export.h>
18
+#include <linux/kexec.h>
1819
1920 #include <asm/mmu_context.h>
2021 #include <asm/time.h>
....@@ -283,7 +284,7 @@
283284 #ifdef CONFIG_HOTPLUG_CPU
284285
285286 /* State of each CPU. */
286
-DEFINE_PER_CPU(int, cpu_state);
287
+static DEFINE_PER_CPU(int, cpu_state);
287288
288289 static int octeon_cpu_disable(void)
289290 {
....@@ -412,7 +413,7 @@
412413
413414 #endif /* CONFIG_HOTPLUG_CPU */
414415
415
-const struct plat_smp_ops octeon_smp_ops = {
416
+static const struct plat_smp_ops octeon_smp_ops = {
416417 .send_ipi_single = octeon_send_ipi_single,
417418 .send_ipi_mask = octeon_send_ipi_mask,
418419 .init_secondary = octeon_init_secondary,
....@@ -423,6 +424,9 @@
423424 #ifdef CONFIG_HOTPLUG_CPU
424425 .cpu_disable = octeon_cpu_disable,
425426 .cpu_die = octeon_cpu_die,
427
+#endif
428
+#ifdef CONFIG_KEXEC
429
+ .kexec_nonboot_cpu = kexec_nonboot_cpu_jump,
426430 #endif
427431 };
428432
....@@ -501,6 +505,9 @@
501505 .cpu_disable = octeon_cpu_disable,
502506 .cpu_die = octeon_cpu_die,
503507 #endif
508
+#ifdef CONFIG_KEXEC
509
+ .kexec_nonboot_cpu = kexec_nonboot_cpu_jump,
510
+#endif
504511 };
505512
506513 void __init octeon_setup_smp(void)