diff options
Diffstat (limited to 'arch/arm64/kernel/smp.c')
-rw-r--r-- | arch/arm64/kernel/smp.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/arch/arm64/kernel/smp.c b/arch/arm64/kernel/smp.c index 678e0842cb3b..62ff3c0622e2 100644 --- a/arch/arm64/kernel/smp.c +++ b/arch/arm64/kernel/smp.c | |||
@@ -909,3 +909,21 @@ int setup_profiling_timer(unsigned int multiplier) | |||
909 | { | 909 | { |
910 | return -EINVAL; | 910 | return -EINVAL; |
911 | } | 911 | } |
912 | |||
913 | static bool have_cpu_die(void) | ||
914 | { | ||
915 | #ifdef CONFIG_HOTPLUG_CPU | ||
916 | int any_cpu = raw_smp_processor_id(); | ||
917 | |||
918 | if (cpu_ops[any_cpu]->cpu_die) | ||
919 | return true; | ||
920 | #endif | ||
921 | return false; | ||
922 | } | ||
923 | |||
924 | bool cpus_are_stuck_in_kernel(void) | ||
925 | { | ||
926 | bool smp_spin_tables = (num_possible_cpus() > 1 && !have_cpu_die()); | ||
927 | |||
928 | return !!cpus_stuck_in_kernel || smp_spin_tables; | ||
929 | } | ||