Blob Blame History Raw
From efc71d24e9f31813782eac0cf7994ae0f1958387 Mon Sep 17 00:00:00 2001
From: Oliver O'Halloran <oohall@gmail.com>
Date: Fri, 2 Nov 2018 15:22:12 +1100
Subject: [PATCH 1/3] SLES: powerpc: Add pmem.h
Patch-mainline: Never, upstream has removed old PMEM API
References: bsc#1113295

Add an implementation of the old arch_memcpy_to_pmem() PMEM API
function.

Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
Acked-by: Jan Kara <jack@suse.cz>
---
 arch/powerpc/include/asm/pmem.h | 13 +++++++++++++
 1 file changed, 13 insertions(+)
 create mode 100644 arch/powerpc/include/asm/pmem.h

diff --git a/arch/powerpc/include/asm/pmem.h b/arch/powerpc/include/asm/pmem.h
new file mode 100644
index 000000000000..28e3b8b5ecde
--- /dev/null
+++ b/arch/powerpc/include/asm/pmem.h
@@ -0,0 +1,13 @@
+/* SPDX-License-Identifier: GPL-2.0+ */
+#ifndef __PPC_PMEM_H__
+#define __PPC_PMEM_H__
+
+#include <linux/string.h>
+
+#ifdef CONFIG_ARCH_HAS_PMEM_API
+static inline void arch_memcpy_to_pmem(void *dst, const void *src, size_t n)
+{
+	memcpy_flushcache(dst, src, n);
+}
+#endif /* CONFIG_ARCH_HAS_PMEM_API */
+#endif
-- 
2.17.2