kernel_optimize_test/arch/powerpc/mm
Balbir Singh fb5924fddf powerpc/mm: Flush cache on memory hot(un)plug
This patch adds support for flushing potentially dirty cache lines
when memory is hot-plugged/hot-un-plugged. The support is currently
limited to 64 bit systems.

The bug was exposed when mappings for a device were actually
hot-unplugged and plugged in back later. A similar issue was observed
during the development of memtrace, but memtrace does it's own
flushing of region via a custom routine.

These patches do a flush both on hotplug/unplug to clear any stale
data in the cache w.r.t mappings, there is a small race window where a
clean cache line may be created again just prior to tearing down the
mapping.

The patches were tested by disabling the flush routines in memtrace
and doing I/O on the trace file. The system immediately
checkstops (quite reliablly if prior to the hot-unplug of the memtrace
region, we memset the regions we are about to hot unplug). After these
patches no custom flushing is needed in the memtrace code.

Fixes: 9d5171a8f2 ("powerpc/powernv: Enable removal of memory for in memory tracing")
Cc: stable@vger.kernel.org # v4.14+
Signed-off-by: Balbir Singh <bsingharora@gmail.com>
Acked-by: Reza Arbab <arbab@linux.ibm.com>
Reviewed-by: Rashmica Gupta <rashmica.g@gmail.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
2018-04-24 09:46:56 +10:00
..
8xx_mmu.c
40x_mmu.c
44x_mmu.c
copro_fault.c powerpc/mm: Add support for handling > 512TB address in SLB miss 2018-03-31 00:10:38 +11:00
dma-noncoherent.c
drmem.c
dump_hashpagetable.c
dump_linuxpagetables.c
fault.c powerpc/mm/keys: Update documentation and remove unnecessary check 2018-04-04 15:23:09 +10:00
fsl_booke_mmu.c
hash_low_32.S
hash_native_64.c Merge branch 'fixes' into next 2018-03-28 22:59:50 +11:00
hash_utils_64.c powerpc/64s: Remove POWER4 support 2018-04-01 00:47:50 +11:00
hash64_4k.c
hash64_64k.c
highmem.c
hugepage-hash64.c
hugetlbpage-book3e.c
hugetlbpage-hash64.c
hugetlbpage-radix.c
hugetlbpage.c powerpc updates for 4.17 2018-04-07 12:08:19 -07:00
init_32.c powerpc/mm/32: Remove the reserved memory hack 2018-04-01 00:47:44 +11:00
init_64.c powerpc/mm/radix: Parse disable_radix commandline correctly. 2018-04-04 16:59:36 +10:00
init-common.c
Makefile
mem.c powerpc/mm: Flush cache on memory hot(un)plug 2018-04-24 09:46:56 +10:00
mmap.c exec: pass stack rlimit into mm layout functions 2018-04-11 10:28:37 -07:00
mmu_context_book3s64.c powerpc/mm: Add support for handling > 512TB address in SLB miss 2018-03-31 00:10:38 +11:00
mmu_context_hash32.c
mmu_context_iommu.c mm, migrate: remove reason argument from new_page_t 2018-04-11 10:28:32 -07:00
mmu_context_nohash.c
mmu_context.c
mmu_decl.h powerpc/mm/32: Remove the reserved memory hack 2018-04-01 00:47:44 +11:00
numa.c Merge branch 'topic/paca' into next 2018-03-31 09:09:36 +11:00
pgtable_32.c powerpc/mm/32: Remove the reserved memory hack 2018-04-01 00:47:44 +11:00
pgtable_64.c powerpc/mm/hash64: Increase the VA range 2018-03-31 00:10:38 +11:00
pgtable-book3e.c
pgtable-book3s64.c Merge branch 'topic/paca' into next 2018-03-31 09:09:36 +11:00
pgtable-hash64.c powerpc/mm/hash64: Increase the VA range 2018-03-31 00:10:38 +11:00
pgtable-radix.c powerpc/mm/radix: Update pte fragment count from 16 to 256 on radix 2018-04-04 16:58:06 +10:00
pgtable.c
pkeys.c powerpc/mm/keys: Update documentation and remove unnecessary check 2018-04-04 15:23:09 +10:00
ppc_mmu_32.c
slb_low.S powerpc/mm: Add support for handling > 512TB address in SLB miss 2018-03-31 00:10:38 +11:00
slb.c powerpc/mm: Add support for handling > 512TB address in SLB miss 2018-03-31 00:10:38 +11:00
slice.c powerpc/8xx: Fix build with hugetlbfs enabled 2018-04-11 12:00:23 +10:00
subpage-prot.c
tlb_hash32.c
tlb_hash64.c powerpc/mm: Add support for handling > 512TB address in SLB miss 2018-03-31 00:10:38 +11:00
tlb_low_64e.S
tlb_nohash_low.S
tlb_nohash.c
tlb-radix.c powerpc/mm/radix: Fix checkstops caused by invalid tlbiel 2018-04-12 23:49:55 +10:00
vphn.c
vphn.h