summaryrefslogtreecommitdiffstats
path: root/arch/x86/include
diff options
context:
space:
mode:
authorRoss Zwisler <ross.zwisler@linux.intel.com>2015-08-18 15:55:38 -0400
committerDan Williams <dan.j.williams@intel.com>2015-08-20 14:07:23 -0400
commit4a370df5534ef727cba9a9d74bf22e0609f91d6e (patch)
treefe9270a21acc4585eab196c7c7bbb9b1371c0172 /arch/x86/include
parent18279b467a9d89afe44afbc19d768e834dbf4545 (diff)
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: Ross Zwisler <ross.zwisler@linux.intel.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to 'arch/x86/include')
-rw-r--r--arch/x86/include/asm/pmem.h13
1 files changed, 2 insertions, 11 deletions
diff --git a/arch/x86/include/asm/pmem.h b/arch/x86/include/asm/pmem.h
index 1e8dbb72d6ee..7f3413fce46c 100644
--- a/arch/x86/include/asm/pmem.h
+++ b/arch/x86/include/asm/pmem.h
@@ -18,8 +18,7 @@
18#include <asm/cpufeature.h> 18#include <asm/cpufeature.h>
19#include <asm/special_insns.h> 19#include <asm/special_insns.h>
20 20
21#ifdef ARCH_HAS_NOCACHE_UACCESS 21#ifdef CONFIG_ARCH_HAS_PMEM_API
22
23/** 22/**
24 * arch_memcpy_to_pmem - copy data to persistent memory 23 * arch_memcpy_to_pmem - copy data to persistent memory
25 * @dst: destination buffer for the copy 24 * @dst: destination buffer for the copy
@@ -79,14 +78,6 @@ static inline bool arch_has_wmb_pmem(void)
79 return false; 78 return false;
80#endif 79#endif
81} 80}
82#else /* ARCH_HAS_NOCACHE_UACCESS i.e. ARCH=um */ 81#endif /* CONFIG_ARCH_HAS_PMEM_API */
83extern void arch_memcpy_to_pmem(void __pmem *dst, const void *src, size_t n);
84extern void arch_wmb_pmem(void);
85
86static inline bool __arch_has_wmb_pmem(void)
87{
88 return false;
89}
90#endif
91 82
92#endif /* __ASM_X86_PMEM_H__ */ 83#endif /* __ASM_X86_PMEM_H__ */