1
0
Fork 0
alistair23-linux/arch
James Hogan 926963160c MIPS: SMP: Drop stop_this_cpu() cpu_foreign_map hack
Commit cccf34e941 ("MIPS: c-r4k: Fix cache flushing for MT cores")
added the cpu_foreign_map cpumask containing a single VPE from each
online core, and recalculated it when secondary CPUs are brought up.

stop_this_cpu() was also updated to recalculate cpu_foreign_map, but
with an additional hack before marking the CPU as offline to copy
cpu_online_mask into cpu_foreign_map and perform an SMP memory barrier.

This appears to have been intended to prevent cache management IPIs
being missed when the VPE representing the core in cpu_foreign_map is
taken offline while other VPEs remain online. Unfortunately there is
nothing in this hack to prevent r4k_on_each_cpu() from reading the old
cpu_foreign_map, and smp_call_function_many() from reading that new
cpu_online_mask with the core's representative VPE marked offline. It
then wouldn't send an IPI to any online VPEs of that core.

stop_this_cpu() is only actually called in panic and system shutdown /
halt / reboot situations, in which case all CPUs are going down and we
don't really need to care about cache management, so drop this hack.

Note that the __cpu_disable() case for CPU hotplug is handled in the
previous commit, and no synchronisation is needed there due to the use
of stop_machine() which prevents hotplug from taking place while any CPU
has disabled preemption (as r4k_on_each_cpu() does).

Signed-off-by: James Hogan <james.hogan@imgtec.com>
Cc: Paul Burton <paul.burton@imgtec.com>
Cc: Leonid Yegoshin <leonid.yegoshin@imgtec.com>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/13796/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2016-07-29 10:19:28 +02:00
..
alpha tree wide: get rid of __GFP_REPEAT for order-0 allocations part I 2016-06-24 17:23:52 -07:00
arc ARC Fix for 4.7-rc6 2016-06-30 09:53:43 -07:00
arm KVM/ARM Fixes for v4.7-rc6: 2016-06-30 17:11:20 +02:00
arm64 Merge branch 'akpm' (patches from Andrew) 2016-06-24 19:08:33 -07:00
avr32 tree wide: get rid of __GFP_REPEAT for order-0 allocations part I 2016-06-24 17:23:52 -07:00
blackfin printk/nmi: generic solution for safe printk in NMI 2016-05-20 17:58:30 -07:00
c6x asm-generic patch for 4.7 2016-05-24 15:24:37 -07:00
cris tree wide: get rid of __GFP_REPEAT for order-0 allocations part I 2016-06-24 17:23:52 -07:00
frv tree wide: get rid of __GFP_REPEAT for order-0 allocations part I 2016-06-24 17:23:52 -07:00
h8300 Merge branch 'hash' of git://ftp.sciencehorizons.net/linux 2016-05-28 16:15:25 -07:00
hexagon tree wide: get rid of __GFP_REPEAT for order-0 allocations part I 2016-06-24 17:23:52 -07:00
ia64 fix up initial thread stack pointer vs thread_info confusion 2016-06-24 17:07:33 -07:00
m32r Merge branch 'kbuild' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild 2016-05-26 22:01:22 -07:00
m68k tree wide: get rid of __GFP_REPEAT for order-0 allocations part I 2016-06-24 17:23:52 -07:00
metag tree wide: get rid of __GFP_REPEAT for order-0 allocations part I 2016-06-24 17:23:52 -07:00
microblaze tree wide: get rid of __GFP_REPEAT for order-0 allocations part I 2016-06-24 17:23:52 -07:00
mips MIPS: SMP: Drop stop_this_cpu() cpu_foreign_map hack 2016-07-29 10:19:28 +02:00
mn10300 Merge branch 'akpm' (patches from Andrew) 2016-06-24 19:08:33 -07:00
nios2 nios2: get rid of superfluous __GFP_REPEAT 2016-06-24 17:23:52 -07:00
openrisc tree wide: get rid of __GFP_REPEAT for order-0 allocations part I 2016-06-24 17:23:52 -07:00
parisc parisc: get rid of superfluous __GFP_REPEAT 2016-06-24 17:23:52 -07:00
powerpc powerpc fixes for 4.7 #5 2016-07-02 17:47:54 -07:00
s390 s390: fix test_fp_ctl inline assembly contraints 2016-06-28 09:24:28 +02:00
score score: get rid of superfluous __GFP_REPEAT 2016-06-24 17:23:52 -07:00
sh sh: get rid of superfluous __GFP_REPEAT 2016-06-24 17:23:52 -07:00
sparc sparc: get rid of superfluous __GFP_REPEAT 2016-06-24 17:23:52 -07:00
tile Merge branch 'akpm' (patches from Andrew) 2016-06-24 19:08:33 -07:00
um tree wide: get rid of __GFP_REPEAT for order-0 allocations part I 2016-06-24 17:23:52 -07:00
unicore32 unicore32: get rid of superfluous __GFP_REPEAT 2016-06-24 17:23:52 -07:00
x86 KVM: nVMX: VMX instructions: fix segment checks when L1 is in long mode. 2016-06-27 15:30:44 +02:00
xtensa tree wide: get rid of __GFP_REPEAT for order-0 allocations part I 2016-06-24 17:23:52 -07:00
.gitignore
Kconfig Clarify naming of thread info/stack allocators 2016-06-24 15:09:37 -07:00