summaryrefslogtreecommitdiff
path: root/arch/arm64/kernel/smp.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-07-04 18:15:03 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-07-04 18:15:03 +0300
commit7813029a509c0c92a5b16d846defaa50a2d3d7f1 (patch)
tree1962ab81537b7155d185f4b0b06c0323ff4dc509 /arch/arm64/kernel/smp.c
parent3c9a6793bde1feb368cd6ef113c08a40a37f7517 (diff)
parenta99cde438de0c4c0cecc1d1af1a55a75b10bfdef (diff)
downloadlinux-7813029a509c0c92a5b16d846defaa50a2d3d7f1.tar.xz
Merge 4.7-rc6 into staging-next
We want the staging fixes in here as well. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'arch/arm64/kernel/smp.c')
-rw-r--r--arch/arm64/kernel/smp.c18
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)
{
return -EINVAL;
}
+
+static bool have_cpu_die(void)
+{
+#ifdef CONFIG_HOTPLUG_CPU
+ int any_cpu = raw_smp_processor_id();
+
+ if (cpu_ops[any_cpu]->cpu_die)
+ return true;
+#endif
+ return false;
+}
+
+bool cpus_are_stuck_in_kernel(void)
+{
+ bool smp_spin_tables = (num_possible_cpus() > 1 && !have_cpu_die());
+
+ return !!cpus_stuck_in_kernel || smp_spin_tables;
+}