linux/arch
Paul Burton f39878cc5b MIPS: Handle tlbex-tlbp race condition
In systems where there are multiple actors updating the TLB, the
potential exists for a race condition wherein a CPU hits a TLB exception
but by the time it reaches a TLBP instruction the affected TLB entry may
have been replaced. This can happen if, for example, a CPU shares the
TLB between hardware threads (VPs) within a core and one of them
replaces the entry that another has just taken a TLB exception for.

We handle this race in the case of the Hardware Table Walker (HTW) being
the other actor already, but didn't take into account the potential for
multiple threads racing. Include the code for aborting TLB exception
handling in affected multi-threaded systems, those being the I6400 &
I6500 CPUs which share TLB entries between VPs.

In the case of using RiXi without dedicated exceptions we have never
handled this race even for HTW. This patch adds WARN()s to these cases
which ought never to be hit because all CPUs with either HTW or shared
FTLB RAMs also include dedicated RiXi exceptions, but the WARN()s will
ensure this is always the case.

Signed-off-by: Paul Burton <paul.burton@imgtec.com>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/16203/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
2017-06-29 02:42:29 +02:00
..
alpha osf_wait4(): fix infoleak 2017-05-21 13:10:07 -04:00
arc mm: larger stack guard gap, between vmas 2017-06-19 21:50:20 +08:00
arm mm: larger stack guard gap, between vmas 2017-06-19 21:50:20 +08:00
arm64 arm64/vdso: Fix nsec handling for CLOCK_MONOTONIC_RAW 2017-06-20 10:41:51 +02:00
blackfin uapi: export all headers under uapi directories 2017-05-11 00:21:54 +09:00
c6x uapi: export all headers under uapi directories 2017-05-11 00:21:54 +09:00
cris devicetree: Move include prefixes from arch to separate directory 2017-05-18 23:55:48 -07:00
frv mm: larger stack guard gap, between vmas 2017-06-19 21:50:20 +08:00
h8300 uapi: export all headers under uapi directories 2017-05-11 00:21:54 +09:00
hexagon hexagon: Use raw_copy_to_user 2017-06-10 19:10:31 -07:00
ia64 Kbuild UAPI header export updates for v4.12 2017-05-10 20:45:36 -07:00
m32r uapi: export all headers under uapi directories 2017-05-11 00:21:54 +09:00
m68k uapi: export all headers under uapi directories 2017-05-11 00:21:54 +09:00
metag devicetree: Move include prefixes from arch to separate directory 2017-05-18 23:55:48 -07:00
microblaze uapi: export all headers under uapi directories 2017-05-11 00:21:54 +09:00
mips MIPS: Handle tlbex-tlbp race condition 2017-06-29 02:42:29 +02:00
mn10300 uapi: export all headers under uapi directories 2017-05-11 00:21:54 +09:00
nios2 nios2 update for v4.12-rc1 2017-05-12 09:53:16 -07:00
openrisc kthread: fix boot hang (regression) on MIPS/OpenRISC 2017-05-29 09:40:54 -07:00
parisc mm: larger stack guard gap, between vmas 2017-06-19 21:50:20 +08:00
powerpc powerpc fixes for 4.12 #7 2017-06-23 17:53:16 -07:00
s390 KVM: s390: fix shadow table handling for nested guests 2017-06-22 16:13:06 +02:00
score uapi: export all headers under uapi directories 2017-05-11 00:21:54 +09:00
sh mm: larger stack guard gap, between vmas 2017-06-19 21:50:20 +08:00
sparc mm: larger stack guard gap, between vmas 2017-06-19 21:50:20 +08:00
tile mm: larger stack guard gap, between vmas 2017-06-19 21:50:20 +08:00
um Merge branch 'for-linus-4.12-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/uml 2017-05-13 10:20:02 -07:00
unicore32 Kbuild UAPI header export updates for v4.12 2017-05-10 20:45:36 -07:00
x86 Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2017-06-25 12:01:56 -07:00
xtensa mm: larger stack guard gap, between vmas 2017-06-19 21:50:20 +08:00
.gitignore
Kconfig Merge branch 'core-rcu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2017-05-10 10:30:46 -07:00