diff options
author | Dan Williams <dan.j.williams@intel.com> | 2016-03-08 07:16:07 -0800 |
---|---|---|
committer | Dan Williams <dan.j.williams@intel.com> | 2016-03-09 15:15:32 -0800 |
commit | 59e6473980f321c16299e12db69d1fabc2644a6f (patch) | |
tree | 6c59e4bb7a8a0f2208269643f5b7b8b056680aef /arch/x86/include | |
parent | b5ebc8ec693281c3c1efff7459a069cbd8b9a149 (diff) | |
download | linux-59e6473980f321c16299e12db69d1fabc2644a6f.tar.gz linux-59e6473980f321c16299e12db69d1fabc2644a6f.tar.bz2 linux-59e6473980f321c16299e12db69d1fabc2644a6f.zip |
libnvdimm, pmem: clear poison on write
If a write is directed at a known bad block perform the following:
1/ write the data
2/ send a clear poison command
3/ invalidate the poison out of the cache hierarchy
Cc: <x86@kernel.org>
Cc: Ross Zwisler <ross.zwisler@linux.intel.com>
Reviewed-by: Vishal Verma <vishal.l.verma@intel.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to 'arch/x86/include')
-rw-r--r-- | arch/x86/include/asm/pmem.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/arch/x86/include/asm/pmem.h b/arch/x86/include/asm/pmem.h index c57fd1ea9689..bf8b35d2035a 100644 --- a/arch/x86/include/asm/pmem.h +++ b/arch/x86/include/asm/pmem.h @@ -137,6 +137,11 @@ static inline void arch_clear_pmem(void __pmem *addr, size_t size) arch_wb_cache_pmem(addr, size); } +static inline void arch_invalidate_pmem(void __pmem *addr, size_t size) +{ + clflush_cache_range((void __force *) addr, size); +} + static inline bool __arch_has_wmb_pmem(void) { /* |