aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/cavium-octeon/smp.c
diff options
context:
space:
mode:
authorJames Hogan <james.hogan@imgtec.com>2016-07-13 14:12:45 +0100
committerRalf Baechle <ralf@linux-mips.org>2016-07-29 10:19:28 +0200
commit826e99be6ab5189dbfb096389016ffb8d20a683e (patch)
tree54b8f17c570bbd47a7a71be9c5235062fdd2dd7c /arch/mips/cavium-octeon/smp.c
parentMIPS: SMP: Clear ASID without confusing has_valid_asid() (diff)
downloadlinux-dev-826e99be6ab5189dbfb096389016ffb8d20a683e.tar.xz
linux-dev-826e99be6ab5189dbfb096389016ffb8d20a683e.zip
MIPS: SMP: Update cpu_foreign_map on CPU disable
When a CPU is disabled via CPU hotplug, cpu_foreign_map is not updated. This could result in cache management SMP calls being sent to offline CPUs instead of online siblings in the same core. Add a call to calculate_cpu_foreign_map() in the various MIPS cpu disable callbacks after set_cpu_online(). All cases are updated for consistency and to keep cpu_foreign_map strictly up to date, not just those which may support hardware multithreading. Fixes: cccf34e9411c ("MIPS: c-r4k: Fix cache flushing for MT cores") Signed-off-by: James Hogan <james.hogan@imgtec.com> Cc: Paul Burton <paul.burton@imgtec.com> Cc: David Daney <david.daney@cavium.com> Cc: Kevin Cernekee <cernekee@gmail.com> Cc: Florian Fainelli <f.fainelli@gmail.com> Cc: Huacai Chen <chenhc@lemote.com> Cc: Hongliang Tao <taohl@lemote.com> Cc: Hua Yan <yanh@lemote.com> Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/13799/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/cavium-octeon/smp.c')
-rw-r--r--arch/mips/cavium-octeon/smp.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/mips/cavium-octeon/smp.c b/arch/mips/cavium-octeon/smp.c
index 33aab89259f3..4d457d602d3b 100644
--- a/arch/mips/cavium-octeon/smp.c
+++ b/arch/mips/cavium-octeon/smp.c
@@ -271,6 +271,7 @@ static int octeon_cpu_disable(void)
return -ENOTSUPP;
set_cpu_online(cpu, false);
+ calculate_cpu_foreign_map();
cpumask_clear_cpu(cpu, &cpu_callin_map);
octeon_fixup_irqs();