diff options
author | Kees Cook <keescook@chromium.org> | 2016-07-25 13:50:36 -0700 |
---|---|---|
committer | Kees Cook <keescook@chromium.org> | 2016-07-25 13:50:36 -0700 |
commit | 74e630a7582e6b3cb39559d712a0049f08dea8a0 (patch) | |
tree | 98a752412dcfc74d802024c1d9e8c541b93174f9 /arch/arm64/kernel/smp.c | |
parent | 35da60941e44dbf57868e67686dd24cc1a33125a (diff) | |
parent | 523d939ef98fd712632d93a5a2b588e477a7565e (diff) |
Merge tag 'v4.7' into for-linus/pstore
Linux 4.7
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) { 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; +} |