diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-04-09 00:41:58 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-04-09 00:41:58 +0200 |
commit | 636c8a8d85d0564222071f0caa4a4e6bf527efe5 (patch) | |
tree | f1958f80f596cfcf496904f12a62662fa79ce990 /arch/x86/include/asm/pmem.h | |
parent | Merge tag 'fixes-for-v4.6-rc3' of git://git.kernel.org/pub/scm/linux/kernel/g... (diff) | |
parent | USB: option: add "D-Link DWM-221 B1" device id (diff) | |
download | linux-636c8a8d85d0564222071f0caa4a4e6bf527efe5.tar.xz linux-636c8a8d85d0564222071f0caa4a4e6bf527efe5.zip |
Merge tag 'usb-serial-4.6-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/johan/usb-serial into usb-linus
Johan writes:
USB-serial fixes for v4.6-rc3
Here are some new device ids.
Signed-off-by: Johan Hovold <johan@kernel.org>
Diffstat (limited to 'arch/x86/include/asm/pmem.h')
-rw-r--r-- | arch/x86/include/asm/pmem.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/arch/x86/include/asm/pmem.h b/arch/x86/include/asm/pmem.h index bf8b35d2035a..fbc5e92e1ecc 100644 --- a/arch/x86/include/asm/pmem.h +++ b/arch/x86/include/asm/pmem.h @@ -47,6 +47,15 @@ static inline void arch_memcpy_to_pmem(void __pmem *dst, const void *src, BUG(); } +static inline int arch_memcpy_from_pmem(void *dst, const void __pmem *src, + size_t n) +{ + if (static_cpu_has(X86_FEATURE_MCE_RECOVERY)) + return memcpy_mcsafe(dst, (void __force *) src, n); + memcpy(dst, (void __force *) src, n); + return 0; +} + /** * arch_wmb_pmem - synchronize writes to persistent memory * |