From: Ross Zwisler <ross.zwisler@linux.intel.com> To: linux-kernel@vger.kernel.org, linux-nvdimm@lists.01.org, Dan Williams <dan.j.williams@intel.com>, Christoph Hellwig <hch@lst.de>, Matthew Wilcox <matthew.r.wilcox@intel.com>, Dave Chinner <david@fromorbit.com> Cc: Ross Zwisler <ross.zwisler@linux.intel.com>, "H. Peter Anvin" <hpa@zytor.com>, Ingo Molnar <mingo@redhat.com>, Thomas Gleixner <tglx@linutronix.de>, x86@kernel.org Subject: [PATCH v4 4/7] pmem, x86: clean up conditional pmem includes Date: Tue, 18 Aug 2015 11:14:45 -0600 [thread overview] Message-ID: <1439918088-32159-5-git-send-email-ross.zwisler@linux.intel.com> (raw) In-Reply-To: <1439918088-32159-1-git-send-email-ross.zwisler@linux.intel.com> 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> --- arch/x86/include/asm/pmem.h | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/arch/x86/include/asm/pmem.h b/arch/x86/include/asm/pmem.h index 1e8dbb7..7f3413f 100644 --- a/arch/x86/include/asm/pmem.h +++ b/arch/x86/include/asm/pmem.h @@ -18,8 +18,7 @@ #include <asm/cpufeature.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 * @dst: destination buffer for the copy @@ -79,14 +78,6 @@ static inline bool arch_has_wmb_pmem(void) return false; #endif } -#else /* ARCH_HAS_NOCACHE_UACCESS i.e. ARCH=um */ -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 /* CONFIG_ARCH_HAS_PMEM_API */ #endif /* __ASM_X86_PMEM_H__ */ -- 2.1.0
WARNING: multiple messages have this Message-ID (diff)
From: Ross Zwisler <ross.zwisler@linux.intel.com> To: linux-kernel@vger.kernel.org, linux-nvdimm@ml01.01.org, Dan Williams <dan.j.williams@intel.com>, Christoph Hellwig <hch@lst.de>, Matthew Wilcox <matthew.r.wilcox@intel.com>, Dave Chinner <david@fromorbit.com> Cc: Ross Zwisler <ross.zwisler@linux.intel.com>, "H. Peter Anvin" <hpa@zytor.com>, Ingo Molnar <mingo@redhat.com>, Thomas Gleixner <tglx@linutronix.de>, x86@kernel.org Subject: [PATCH v4 4/7] pmem, x86: clean up conditional pmem includes Date: Tue, 18 Aug 2015 11:14:45 -0600 [thread overview] Message-ID: <1439918088-32159-5-git-send-email-ross.zwisler@linux.intel.com> (raw) In-Reply-To: <1439918088-32159-1-git-send-email-ross.zwisler@linux.intel.com> 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> --- arch/x86/include/asm/pmem.h | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/arch/x86/include/asm/pmem.h b/arch/x86/include/asm/pmem.h index 1e8dbb7..7f3413f 100644 --- a/arch/x86/include/asm/pmem.h +++ b/arch/x86/include/asm/pmem.h @@ -18,8 +18,7 @@ #include <asm/cpufeature.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 * @dst: destination buffer for the copy @@ -79,14 +78,6 @@ static inline bool arch_has_wmb_pmem(void) return false; #endif } -#else /* ARCH_HAS_NOCACHE_UACCESS i.e. ARCH=um */ -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 /* CONFIG_ARCH_HAS_PMEM_API */ #endif /* __ASM_X86_PMEM_H__ */ -- 2.1.0
next prev parent reply other threads:[~2015-08-18 17:14 UTC|newest] Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top 2015-08-18 17:14 [PATCH v4 0/7] dax: I/O path enhancements Ross Zwisler 2015-08-18 17:14 ` Ross Zwisler 2015-08-18 17:14 ` Ross Zwisler 2015-08-18 17:14 ` [PATCH v4 1/7] brd: make rd_size static Ross Zwisler 2015-08-18 17:14 ` Ross Zwisler 2015-08-18 17:14 ` [PATCH v4 2/7] pmem, x86: move x86 PMEM API to new pmem.h header Ross Zwisler 2015-08-18 17:14 ` Ross Zwisler 2015-08-18 17:14 ` [PATCH v4 3/7] pmem: remove layer when calling arch_has_wmb_pmem() Ross Zwisler 2015-08-18 17:14 ` Ross Zwisler 2015-08-18 17:14 ` Ross Zwisler [this message] 2015-08-18 17:14 ` [PATCH v4 4/7] pmem, x86: clean up conditional pmem includes Ross Zwisler 2015-08-18 17:14 ` [PATCH v4 5/7] pmem: add copy_from_iter_pmem() and clear_pmem() Ross Zwisler 2015-08-18 17:14 ` Ross Zwisler 2015-08-18 17:14 ` [PATCH v4 6/7] dax: update I/O path to do proper PMEM flushing Ross Zwisler 2015-08-18 17:14 ` Ross Zwisler 2015-08-18 17:14 ` [PATCH v4 7/7] pmem, dax: have direct_access use __pmem annotation Ross Zwisler 2015-08-18 17:14 ` Ross Zwisler 2015-08-18 17:14 ` Ross Zwisler
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=1439918088-32159-5-git-send-email-ross.zwisler@linux.intel.com \ --to=ross.zwisler@linux.intel.com \ --cc=dan.j.williams@intel.com \ --cc=david@fromorbit.com \ --cc=hch@lst.de \ --cc=hpa@zytor.com \ --cc=linux-kernel@vger.kernel.org \ --cc=linux-nvdimm@lists.01.org \ --cc=matthew.r.wilcox@intel.com \ --cc=mingo@redhat.com \ --cc=tglx@linutronix.de \ --cc=x86@kernel.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.