linux-stable/arch
Dmitry Korotin 377bea4090 MIPS: Add missing EHB in mtc0 -> mfc0 sequence.
commit 0b24cae4d5 upstream.

Add a missing EHB (Execution Hazard Barrier) in mtc0 -> mfc0 sequence.
Without this execution hazard barrier it's possible for the value read
back from the KScratch register to be the value from before the mtc0.

Reproducible on P5600 & P6600.

The hazard is documented in the MIPS Architecture Reference Manual Vol.
III: MIPS32/microMIPS32 Privileged Resource Architecture (MD00088), rev
6.03 table 8.1 which includes:

   Producer | Consumer | Hazard
  ----------|----------|----------------------------
   mtc0     | mfc0     | any coprocessor 0 register

Signed-off-by: Dmitry Korotin <dkorotin@wavecomp.com>
[paul.burton@mips.com:
  - Commit message tweaks.
  - Add Fixes tags.
  - Mark for stable back to v3.15 where P5600 support was introduced.]
Signed-off-by: Paul Burton <paul.burton@mips.com>
Fixes: 3d8bfdd030 ("MIPS: Use C0_KScratch (if present) to hold PGD pointer.")
Fixes: 829dcc0a95 ("MIPS: Add MIPS P5600 probe support")
Cc: linux-mips@vger.kernel.org
Cc: stable@vger.kernel.org # v3.15+
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-07-10 09:54:43 +02:00
..
alpha
arc ARC: handle gcc generated __builtin_trap for older compiler 2019-07-10 09:54:42 +02:00
arm ARM: dts: am57xx-idk: Remove support for voltage switching for SD card 2019-06-25 11:36:54 +08:00
arm64 arm64: kaslr: keep modules inside module region when KASAN is enabled 2019-07-10 09:54:40 +02:00
blackfin
c6x
cris
frv
h8300 h8300: use cc-cross-prefix instead of hardcoding h8300-unknown-linux- 2019-04-05 22:31:25 +02:00
hexagon
ia64 ia64: fix build errors by exporting paddr_to_nid() 2019-06-22 08:16:17 +02:00
m32r
m68k m68k: Add -ffreestanding to CFLAGS 2019-03-23 14:35:21 +01:00
metag
microblaze
mips MIPS: Add missing EHB in mtc0 -> mfc0 sequence. 2019-07-10 09:54:43 +02:00
mn10300
nios2
openrisc
parisc parisc: Fix compiler warnings in float emulation code 2019-06-25 11:36:51 +08:00
powerpc powerpc/bpf: use unsigned division instruction for 64-bit operations 2019-06-25 11:36:54 +08:00
s390 KVM: s390: fix memory slot handling for KVM_SET_USER_MEMORY_REGION 2019-06-19 08:20:58 +02:00
score
sh sh: fix multiple function definition build errors 2019-05-08 07:20:51 +02:00
sparc sparc: perf: fix updated event period in response to PERF_EVENT_IOC_PERIOD 2019-06-25 11:36:52 +08:00
tile
um uml: fix a boot splat wrt use of cpu_all_mask 2019-06-15 11:54:53 +02:00
unicore32
x86 KVM: LAPIC: Fix pending interrupt in IRR blocked by software disable LAPIC 2019-07-10 09:54:43 +02:00
xtensa xtensa: Fix section mismatch between memblock_reserve and mem_reserve 2019-06-25 11:36:52 +08:00
.gitignore
Kconfig