]> www.infradead.org Git - users/jedix/linux-maple.git/commit
arch, x86: pmem api for ensuring durability of persistent memory updates
authorRoss Zwisler <ross.zwisler@linux.intel.com>
Thu, 25 Jun 2015 07:08:39 +0000 (03:08 -0400)
committerDan Duval <dan.duval@oracle.com>
Tue, 11 Oct 2016 18:42:46 +0000 (14:42 -0400)
commit2c79ecc45b3ae87de1cb426fe393e3a748d3db6b
tree7a9c16a57256e1c760b961848500c6c7988dd31d
parent42d3982ee12ef2688c0912e52a1875c5680e0cf9
arch, x86: pmem api for ensuring durability of persistent memory updates

Orabug: 22913653

Based on an original patch by Ross Zwisler [1].

Writes to persistent memory have the potential to be posted to cpu
cache, cpu write buffers, and platform write buffers (memory controller)
before being committed to persistent media.  Provide apis,
memcpy_to_pmem(), wmb_pmem(), and memremap_pmem(), to write data to
pmem and assert that it is durable in PMEM (a persistent linear address
range).  A '__pmem' attribute is added so sparse can track proper usage
of pointers to pmem.

This continues the status quo of pmem being x86 only for 4.2, but
reworks to ioremap, and wider implementation of memremap() will enable
other archs in 4.3.

[1]: https://lists.01.org/pipermail/linux-nvdimm/2015-May/000932.html

Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Signed-off-by: Ross Zwisler <ross.zwisler@linux.intel.com>
[djbw: various reworks]
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
(cherry picked from commit 61031952f4c89dba1065f7a5b9419badb112554c)
Signed-off-by: Dan Duval <dan.duval@oracle.com>
arch/x86/Kconfig
arch/x86/include/asm/cacheflush.h
arch/x86/include/asm/io.h
drivers/nvdimm/pmem.c
include/linux/compiler.h
include/linux/pmem.h [new file with mode: 0644]
lib/Kconfig