aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Williams <dan.j.williams@intel.com>2018-12-04 16:37:06 -0500
committerIngo Molnar <mingo@kernel.org>2018-12-05 03:03:05 -0500
commitc683c37cd13246941924c48f6c6a9863425e0cec (patch)
tree47fc1c79f41632b8eaf72ce3c8a971bd2028b105
parenta2aa52ab16efbee40ad118ebac4a5e438f5b43ee (diff)
generic/pgtable: Make {pmd, pud}_same() unconditionally available
In preparation for {pmd,pud}_same() to be used outside of transparent huge page code paths, make them unconditionally available. This enables them to be used in the definition of a new family of set_{pte,pmd,pud,p4d,pgd}_safe() helpers. Signed-off-by: Dan Williams <dan.j.williams@intel.com> Acked-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com> Cc: Andy Lutomirski <luto@kernel.org> Cc: Borislav Petkov <bp@alien8.de> Cc: Dave Hansen <dave.hansen@linux.intel.com> Cc: H. Peter Anvin <hpa@zytor.com> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Rik van Riel <riel@surriel.com> Cc: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Cc: Thomas Gleixner <tglx@linutronix.de> Link: http://lkml.kernel.org/r/154395942644.32119.10238934183949418128.stgit@dwillia2-desk3.amr.corp.intel.com Signed-off-by: Ingo Molnar <mingo@kernel.org>
-rw-r--r--include/asm-generic/pgtable.h14
1 files changed, 0 insertions, 14 deletions
diff --git a/include/asm-generic/pgtable.h b/include/asm-generic/pgtable.h
index 359fb935ded6..eea50ef8b8cd 100644
--- a/include/asm-generic/pgtable.h
+++ b/include/asm-generic/pgtable.h
@@ -375,7 +375,6 @@ static inline int pte_unused(pte_t pte)
375#endif 375#endif
376 376
377#ifndef __HAVE_ARCH_PMD_SAME 377#ifndef __HAVE_ARCH_PMD_SAME
378#ifdef CONFIG_TRANSPARENT_HUGEPAGE
379static inline int pmd_same(pmd_t pmd_a, pmd_t pmd_b) 378static inline int pmd_same(pmd_t pmd_a, pmd_t pmd_b)
380{ 379{
381 return pmd_val(pmd_a) == pmd_val(pmd_b); 380 return pmd_val(pmd_a) == pmd_val(pmd_b);
@@ -385,19 +384,6 @@ static inline int pud_same(pud_t pud_a, pud_t pud_b)
385{ 384{
386 return pud_val(pud_a) == pud_val(pud_b); 385 return pud_val(pud_a) == pud_val(pud_b);
387} 386}
388#else /* CONFIG_TRANSPARENT_HUGEPAGE */
389static inline int pmd_same(pmd_t pmd_a, pmd_t pmd_b)
390{
391 BUILD_BUG();
392 return 0;
393}
394
395static inline int pud_same(pud_t pud_a, pud_t pud_b)
396{
397 BUILD_BUG();
398 return 0;
399}
400#endif /* CONFIG_TRANSPARENT_HUGEPAGE */
401#endif 387#endif
402 388
403#ifndef __HAVE_ARCH_DO_SWAP_PAGE 389#ifndef __HAVE_ARCH_DO_SWAP_PAGE