summaryrefslogtreecommitdiffstats
path: root/include/linux/pmem.h
diff options
context:
space:
mode:
authorDan Williams <dan.j.williams@intel.com>2017-01-13 14:14:23 -0800
committerDan Williams <dan.j.williams@intel.com>2017-04-25 13:20:46 -0700
commit6abccd1bfee49e491095772fd5aa9e96d915ae52 (patch)
tree594b473022733c4220e52a0f82ddea1c6a7e248f /include/linux/pmem.h
parentd4b29fd78ea6fc2be219be3af1a992149b4ff0f6 (diff)
downloadop-kernel-dev-6abccd1bfee49e491095772fd5aa9e96d915ae52.zip
op-kernel-dev-6abccd1bfee49e491095772fd5aa9e96d915ae52.tar.gz
x86, dax, pmem: remove indirection around memcpy_from_pmem()
memcpy_from_pmem() maps directly to memcpy_mcsafe(). The wrapper serves no real benefit aside from affording a more generic function name than the x86-specific 'mcsafe'. However this would not be the first time that x86 terminology leaked into the global namespace. For lack of better name, just use memcpy_mcsafe() directly. This conversion also catches a place where we should have been using plain memcpy, acpi_nfit_blk_single_io(). Cc: <x86@kernel.org> Cc: Jan Kara <jack@suse.cz> Cc: Jeff Moyer <jmoyer@redhat.com> Cc: Ingo Molnar <mingo@redhat.com> Cc: Christoph Hellwig <hch@lst.de> Cc: "H. Peter Anvin" <hpa@zytor.com> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Matthew Wilcox <mawilcox@microsoft.com> Cc: Ross Zwisler <ross.zwisler@linux.intel.com> Acked-by: Tony Luck <tony.luck@intel.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to 'include/linux/pmem.h')
-rw-r--r--include/linux/pmem.h23
1 files changed, 0 insertions, 23 deletions
diff --git a/include/linux/pmem.h b/include/linux/pmem.h
index e856c2c..71ecf3d 100644
--- a/include/linux/pmem.h
+++ b/include/linux/pmem.h
@@ -31,12 +31,6 @@ static inline void arch_memcpy_to_pmem(void *dst, const void *src, size_t n)
BUG();
}
-static inline int arch_memcpy_from_pmem(void *dst, const void *src, size_t n)
-{
- BUG();
- return -EFAULT;
-}
-
static inline size_t arch_copy_from_iter_pmem(void *addr, size_t bytes,
struct iov_iter *i)
{
@@ -65,23 +59,6 @@ static inline bool arch_has_pmem_api(void)
return IS_ENABLED(CONFIG_ARCH_HAS_PMEM_API);
}
-/*
- * memcpy_from_pmem - read from persistent memory with error handling
- * @dst: destination buffer
- * @src: source buffer
- * @size: transfer length
- *
- * Returns 0 on success negative error code on failure.
- */
-static inline int memcpy_from_pmem(void *dst, void const *src, size_t size)
-{
- if (arch_has_pmem_api())
- return arch_memcpy_from_pmem(dst, src, size);
- else
- memcpy(dst, src, size);
- return 0;
-}
-
/**
* memcpy_to_pmem - copy data to persistent memory
* @dst: destination buffer for the copy
OpenPOWER on IntegriCloud