Commit 4a370df5 authored by Ross Zwisler's avatar Ross Zwisler Committed by Dan Williams

pmem, x86: clean up conditional pmem includes

Prior to this change x86_64 used the pmem defines in
arch/x86/include/asm/pmem.h, and UM used the default ones at the
top of include/linux/pmem.h.  The inclusion or exclusion in linux/pmem.h
was controlled by CONFIG_ARCH_HAS_PMEM_API, but the ones in asm/pmem.h
were controlled by ARCH_HAS_NOCACHE_UACCESS.

Instead, control them both with CONFIG_ARCH_HAS_PMEM_API so that it's
clear that they are related and we don't run into the possibility where
they are both included or excluded.  Also remove a bunch of stale
function prototypes meant for UM in asm/pmem.h - these just conflicted
with the inline defaults in linux/pmem.h and gave compile errors.
Signed-off-by: default avatarRoss Zwisler <ross.zwisler@linux.intel.com>
Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
Signed-off-by: default avatarDan Williams <dan.j.williams@intel.com>
parent 18279b46
...@@ -18,8 +18,7 @@ ...@@ -18,8 +18,7 @@
#include <asm/cpufeature.h> #include <asm/cpufeature.h>
#include <asm/special_insns.h> #include <asm/special_insns.h>
#ifdef ARCH_HAS_NOCACHE_UACCESS #ifdef CONFIG_ARCH_HAS_PMEM_API
/** /**
* arch_memcpy_to_pmem - copy data to persistent memory * arch_memcpy_to_pmem - copy data to persistent memory
* @dst: destination buffer for the copy * @dst: destination buffer for the copy
...@@ -79,14 +78,6 @@ static inline bool arch_has_wmb_pmem(void) ...@@ -79,14 +78,6 @@ static inline bool arch_has_wmb_pmem(void)
return false; return false;
#endif #endif
} }
#else /* ARCH_HAS_NOCACHE_UACCESS i.e. ARCH=um */ #endif /* CONFIG_ARCH_HAS_PMEM_API */
extern void arch_memcpy_to_pmem(void __pmem *dst, const void *src, size_t n);
extern void arch_wmb_pmem(void);
static inline bool __arch_has_wmb_pmem(void)
{
return false;
}
#endif
#endif /* __ASM_X86_PMEM_H__ */ #endif /* __ASM_X86_PMEM_H__ */
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment