aboutsummaryrefslogtreecommitdiff
path: root/lib/memory-notifier-error-inject.c
diff options
context:
space:
mode:
authorBalbir Singh <[email protected]>2018-04-06 15:24:23 +1000
committerMichael Ellerman <[email protected]>2018-04-24 09:46:56 +1000
commitfb5924fddf9ee31db04da7ad4e8c3434a387101b (patch)
treebe4e071f9cb1e80dd554d80f5667595e1879f3f4 /lib/memory-notifier-error-inject.c
parent6d08b06e67cd117f6992c46611dfb4ce267cd71e (diff)
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: 9d5171a8f248 ("powerpc/powernv: Enable removal of memory for in memory tracing") Cc: [email protected] # v4.14+ Signed-off-by: Balbir Singh <[email protected]> Acked-by: Reza Arbab <[email protected]> Reviewed-by: Rashmica Gupta <[email protected]> Signed-off-by: Michael Ellerman <[email protected]>
Diffstat (limited to 'lib/memory-notifier-error-inject.c')
0 files changed, 0 insertions, 0 deletions