linux-stable/arch/powerpc
Aneesh Kumar K.V ec199b24aa powerpc/mm: Fixup tlbie vs mtpidr/mtlpidr ordering issue on POWER9
commit 047e6575ae upstream.

On POWER9, under some circumstances, a broadcast TLB invalidation will
fail to invalidate the ERAT cache on some threads when there are
parallel mtpidr/mtlpidr happening on other threads of the same core.
This can cause stores to continue to go to a page after it's unmapped.

The workaround is to force an ERAT flush using PID=0 or LPID=0 tlbie
flush. This additional TLB flush will cause the ERAT cache
invalidation. Since we are using PID=0 or LPID=0, we don't get
filtered out by the TLB snoop filtering logic.

We need to still follow this up with another tlbie to take care of
store vs tlbie ordering issue explained in commit:
a5d4b5891c ("powerpc/mm: Fixup tlbie vs store ordering issue on
POWER9"). The presence of ERAT cache implies we can still get new
stores and they may miss store queue marking flush.

Cc: stable@vger.kernel.org
Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20190924035254.24612-3-aneesh.kumar@linux.ibm.com
[sandipan: Backported to v4.19]
Signed-off-by: Sandipan Das <sandipan@linux.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-11-10 11:27:55 +01:00
..
boot powerpc/boot: add {get, put}_unaligned_be32 to xz_config.h 2019-07-31 07:27:07 +02:00
configs powerpc/mm/radix: Make Radix require HUGETLB_PAGE 2019-05-02 09:58:55 +02:00
crypto powerpc updates for 4.19 2018-08-17 11:32:50 -07:00
include powerpc/mm: Fixup tlbie vs mtpidr/mtlpidr ordering issue on POWER9 2019-11-10 11:27:55 +01:00
kernel powerpc/mm: Fixup tlbie vs mtpidr/mtlpidr ordering issue on POWER9 2019-11-10 11:27:55 +01:00
kvm powerpc/mm: Fixup tlbie vs mtpidr/mtlpidr ordering issue on POWER9 2019-11-10 11:27:55 +01:00
lib powerpc/64: Fix memcmp reading past the end of src/dest 2019-04-03 06:26:29 +02:00
math-emu
mm powerpc/mm: Fixup tlbie vs mtpidr/mtlpidr ordering issue on POWER9 2019-11-10 11:27:55 +01:00
net powerpc/bpf: use unsigned division instruction for 64-bit operations 2019-06-25 11:36:00 +08:00
oprofile
perf powerpc/perf: Fix MMCRA corruption by bhrb_filter 2019-06-09 09:17:17 +02:00
platforms powerpc/powernv: Fix CPU idle to be called with IRQs disabled 2019-11-06 13:06:30 +01:00
purgatory powerpc updates for 4.19 2018-08-17 11:32:50 -07:00
sysdev powerpc/xive: Fix bogus error code returned by OPAL 2019-10-01 08:26:00 +02:00
tools powerpc: Add a checkpatch wrapper with our preferred settings 2018-08-07 21:49:25 +10:00
xmon powerpc/xmon: Check for HV mode when dumping XIVE info from OPAL 2019-10-07 18:56:48 +02:00
Kconfig powerpc: disable support for relative ksymtab references 2018-08-29 16:12:07 -07:00
Kconfig.debug Kconfig: consolidate the "Kernel hacking" menu 2018-08-02 08:06:48 +09:00
Makefile powerpc: avoid -mno-sched-epilog on GCC 4.9 and newer 2019-01-13 09:51:05 +01:00
Makefile.postlink