summaryrefslogtreecommitdiff
path: root/arch/powerpc/kernel/smp.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-09-05 09:13:24 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-09-05 09:13:24 +0300
commit9c2edd8b5bcb36ec6c890dd85f8fd13034aaa43e (patch)
tree052b3c229e00462cd0c5773c8b6b9fe314e86f38 /arch/powerpc/kernel/smp.c
parentaa652b1ccbd0d3a9cd4ecdec6d36935f78c838da (diff)
parentc6935931c1894ff857616ff8549b61236a19148f (diff)
downloadlinux-9c2edd8b5bcb36ec6c890dd85f8fd13034aaa43e.tar.xz
Merge 4.8-rc5 into staging-next
We want the staging fixes in here as well to handle merge issues. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'arch/powerpc/kernel/smp.c')
-rw-r--r--arch/powerpc/kernel/smp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/powerpc/kernel/smp.c b/arch/powerpc/kernel/smp.c
index 25a39052bf6b..9c6f3fd58059 100644
--- a/arch/powerpc/kernel/smp.c
+++ b/arch/powerpc/kernel/smp.c
@@ -830,7 +830,7 @@ int __cpu_disable(void)
/* Update sibling maps */
base = cpu_first_thread_sibling(cpu);
- for (i = 0; i < threads_per_core; i++) {
+ for (i = 0; i < threads_per_core && base + i < nr_cpu_ids; i++) {
cpumask_clear_cpu(cpu, cpu_sibling_mask(base + i));
cpumask_clear_cpu(base + i, cpu_sibling_mask(cpu));
cpumask_clear_cpu(cpu, cpu_core_mask(base + i));