linux/arch/powerpc
Peter Zijlstra 0ed1325967 mm/mmu_gather: invalidate TLB correctly on batch allocation failure and flush
Architectures for which we have hardware walkers of Linux page table
should flush TLB on mmu gather batch allocation failures and batch flush.
Some architectures like POWER supports multiple translation modes (hash
and radix) and in the case of POWER only radix translation mode needs the
above TLBI.  This is because for hash translation mode kernel wants to
avoid this extra flush since there are no hardware walkers of linux page
table.  With radix translation, the hardware also walks linux page table
and with that, kernel needs to make sure to TLB invalidate page walk cache
before page table pages are freed.

More details in commit d86564a2f0 ("mm/tlb, x86/mm: Support invalidating
TLB caches for RCU_TABLE_FREE")

The changes to sparc are to make sure we keep the old behavior since we
are now removing HAVE_RCU_TABLE_NO_INVALIDATE.  The default value for
tlb_needs_table_invalidate is to always force an invalidate and sparc can
avoid the table invalidate.  Hence we define tlb_needs_table_invalidate to
false for sparc architecture.

Link: http://lkml.kernel.org/r/20200116064531.483522-3-aneesh.kumar@linux.ibm.com
Fixes: a46cc7a90f ("powerpc/mm/radix: Improve TLB/PWC flushes")
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org
Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.ibm.com>
Acked-by: Michael Ellerman <mpe@ellerman.id.au>	[powerpc]
Cc: <stable@vger.kernel.org>	[4.14+]
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2020-02-04 03:05:26 +00:00
..
boot powerpc/fsl/dts: add fsl,erratum-a011043 2020-01-23 21:17:13 +01:00
configs Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace 2019-12-01 13:26:18 -08:00
crypto crypto: remove CRYPTO_TFM_RES_BAD_KEY_LEN 2020-01-09 11:30:53 +08:00
include mm/mmu_gather: invalidate TLB correctly on batch allocation failure and flush 2020-02-04 03:05:26 +00:00
kernel threads-v5.6 2020-01-29 19:38:34 -08:00
kexec powerpc: Avoid clang warnings around setjmp and longjmp 2019-11-25 21:45:43 +11:00
kvm Second KVM PPC update for 5.6 2020-01-30 18:14:26 +01:00
lib powerpc: Fix __clear_user() with KUAP enabled 2019-12-16 23:19:44 +11:00
math-emu
mm powerpc/mmu_gather: enable RCU_TABLE_FREE even for !SMP case 2020-02-04 03:05:25 +00:00
net treewide: Use sizeof_field() macro 2019-12-09 10:36:44 -08:00
oprofile compat: provide compat_ptr() on all architectures 2020-01-03 09:32:51 +01:00
perf powerpc updates for 5.5 2019-11-30 14:35:43 -08:00
platforms arch/powerpc/setup: Drop dummy_con initialization 2020-01-14 15:29:17 +01:00
purgatory
sysdev powerpc/xive: Discard ESB load value when interrupt is invalid 2020-01-22 20:31:41 +11:00
tools
xmon powerpc: Avoid clang warnings around setjmp and longjmp 2019-11-25 21:45:43 +11:00
Kbuild powerpc/kexec: Move kexec files into a dedicated subdir. 2019-11-21 15:41:34 +11:00
Kconfig mm/mmu_gather: invalidate TLB correctly on batch allocation failure and flush 2020-02-04 03:05:26 +00:00
Kconfig.debug powerpc: Fix Kconfig indentation 2019-11-25 21:45:43 +11:00
Makefile powerpc: Don't add -mabi= flags when building with Clang 2019-11-25 21:45:43 +11:00
Makefile.postlink