From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754316AbbHRT5H (ORCPT ); Tue, 18 Aug 2015 15:57:07 -0400 Received: from mga09.intel.com ([134.134.136.24]:20363 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751739AbbHRTz7 (ORCPT ); Tue, 18 Aug 2015 15:55:59 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.15,704,1432623600"; d="scan'208";a="544282877" From: Ross Zwisler To: linux-kernel@vger.kernel.org, linux-nvdimm@ml01.01.org, Dan Williams , Christoph Hellwig , Matthew Wilcox , Dave Chinner Cc: Ross Zwisler , "H. Peter Anvin" , Ingo Molnar , Thomas Gleixner , x86@kernel.org Subject: [PATCH v5 4/7] pmem, x86: clean up conditional pmem includes Date: Tue, 18 Aug 2015 13:55:38 -0600 Message-Id: <1439927741-29580-5-git-send-email-ross.zwisler@linux.intel.com> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1439927741-29580-1-git-send-email-ross.zwisler@linux.intel.com> References: <1439927741-29580-1-git-send-email-ross.zwisler@linux.intel.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 Reviewed-by: Christoph Hellwig --- 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 #include -#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