@@ -14,6 +14,10 @@ menu "General architecture-dependent options"
config CRASH_CORE
bool
+config SHUTDOWN_NONBOOT_CPUS
+ select KEXEC_CORE
+ bool
+
config KEXEC_CORE
select CRASH_CORE
bool
@@ -129,6 +129,7 @@ config ARM
select PCI_SYSCALL if PCI
select PERF_USE_VMALLOC
select RTC_LIB
+ select SHUTDOWN_NONBOOT_CPUS
select SYS_SUPPORTS_APM_EMULATION
select THREAD_INFO_IN_TASK
select HAVE_ARCH_VMAP_STACK if MMU && ARM_HAS_GROUP_RELOCS
@@ -223,6 +223,7 @@ config ARM64
select PCI_SYSCALL if PCI
select POWER_RESET
select POWER_SUPPLY
+ select SHUTDOWN_NONBOOT_CPUS
select SPARSE_IRQ
select SWIOTLB
select SYSCTL_EXCEPTION_TRACE
@@ -52,6 +52,7 @@ config IA64
select ARCH_CLOCKSOURCE_DATA
select GENERIC_TIME_VSYSCALL
select LEGACY_TIMER_TICK
+ select SHUTDOWN_NONBOOT_CPUS
select SWIOTLB
select SYSCTL_ARCH_UNALIGN_NO_WARN
select HAVE_MOD_ARCH_SPECIFIC
@@ -120,6 +120,7 @@ config RISCV
select PCI_MSI if PCI
select RISCV_INTC
select RISCV_TIMER if RISCV_SBI
+ select SHUTDOWN_NONBOOT_CPUS
select SPARSE_IRQ
select SYSCTL_EXCEPTION_TRACE
select THREAD_INFO_IN_TASK
@@ -1258,6 +1258,8 @@ int remove_cpu(unsigned int cpu)
}
EXPORT_SYMBOL_GPL(remove_cpu);
+#ifdef CONFIG_SHUTDOWN_NONBOOT_CPUS
+
void smp_shutdown_nonboot_cpus(unsigned int primary_cpu)
{
unsigned int cpu;
@@ -1299,6 +1301,7 @@ void smp_shutdown_nonboot_cpus(unsigned int primary_cpu)
cpu_maps_update_done();
}
+#endif
#else
#define takedown_cpu NULL
Only arm/arm64/ia64/riscv share the smp_shutdown_nonboot_cpus(). So compiling this code conditioned on the macro CONFIG_SHUTDOWN_NONBOOT_CPUS. Later this macro will brace the quick kexec reboot code. Signed-off-by: Pingfan Liu <kernelfans@gmail.com> Cc: Russell King <linux@armlinux.org.uk> Cc: Catalin Marinas <catalin.marinas@arm.com> Cc: Will Deacon <will@kernel.org> Cc: Paul Walmsley <paul.walmsley@sifive.com> Cc: Palmer Dabbelt <palmer@dabbelt.com> Cc: Albert Ou <aou@eecs.berkeley.edu> Cc: Peter Zijlstra <peterz@infradead.org> Cc: "Eric W. Biederman" <ebiederm@xmission.com> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Marco Elver <elver@google.com> Cc: Masami Hiramatsu <mhiramat@kernel.org> Cc: Dan Li <ashimida@linux.alibaba.com> Cc: Song Liu <song@kernel.org> Cc: Sami Tolvanen <samitolvanen@google.com> Cc: Arnd Bergmann <arnd@arndb.de> Cc: Linus Walleij <linus.walleij@linaro.org> Cc: Ard Biesheuvel <ardb@kernel.org> Cc: Tony Lindgren <tony@atomide.com> Cc: Nick Hawkins <nick.hawkins@hpe.com> Cc: John Crispin <john@phrozen.org> Cc: Geert Uytterhoeven <geert@linux-m68k.org> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Bjorn Andersson <bjorn.andersson@linaro.org> Cc: Anshuman Khandual <anshuman.khandual@arm.com> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Steven Price <steven.price@arm.com> To: linux-arm-kernel@lists.infradead.org To: linux-ia64@vger.kernel.org To: linux-riscv@lists.infradead.org To: linux-kernel@vger.kernel.org --- arch/Kconfig | 4 ++++ arch/arm/Kconfig | 1 + arch/arm64/Kconfig | 1 + arch/ia64/Kconfig | 1 + arch/riscv/Kconfig | 1 + kernel/cpu.c | 3 +++ 6 files changed, 11 insertions(+)