From 61e07b2d62a76c680c891bc16d95385478b64243 Mon Sep 17 00:00:00 2001 From: Mel Gorman Date: Thu, 22 May 2014 10:42:22 +1000 Subject: [PATCH] x86: define _PAGE_NUMA by reusing software bits on the PMD and PTE levels -fix 2 powerpc has NUMA_BALANCING and non-NUMA_BALANCING versions of pte_present and I missed that when testing cross-compiling. This patch replaces x86-define-_page_numa-by-reusing-software-bits-on-the-pmd-and-pte-levels-fix.patch Signed-off-by: Mel Gorman Cc: David Vrabel Cc: Ingo Molnar Cc: Peter Anvin Cc: Fengguang Wu Cc: Linus Torvalds Cc: Steven Noonan Cc: Rik van Riel Cc: Peter Zijlstra Cc: Andrea Arcangeli Cc: Dave Hansen Cc: Srikar Dronamraju Cc: Cyrill Gorcunov Signed-off-by: Andrew Morton --- arch/powerpc/include/asm/pgtable.h | 1 + arch/x86/include/asm/pgtable.h | 1 + include/asm-generic/pgtable.h | 4 ++++ 3 files changed, 6 insertions(+) diff --git a/arch/powerpc/include/asm/pgtable.h b/arch/powerpc/include/asm/pgtable.h index cdf6679bb75b..d98c1ecc3266 100644 --- a/arch/powerpc/include/asm/pgtable.h +++ b/arch/powerpc/include/asm/pgtable.h @@ -44,6 +44,7 @@ static inline int pte_present(pte_t pte) return pte_val(pte) & (_PAGE_PRESENT | _PAGE_NUMA); } +#define pte_present_nonuma pte_present_nonuma static inline int pte_present_nonuma(pte_t pte) { return pte_val(pte) & (_PAGE_PRESENT); diff --git a/arch/x86/include/asm/pgtable.h b/arch/x86/include/asm/pgtable.h index 8ee71c80dc45..66276c1d23bb 100644 --- a/arch/x86/include/asm/pgtable.h +++ b/arch/x86/include/asm/pgtable.h @@ -453,6 +453,7 @@ static inline int pte_present(pte_t a) _PAGE_NUMA); } +#define pte_present_nonuma pte_present_nonuma static inline int pte_present_nonuma(pte_t a) { return pte_flags(a) & (_PAGE_PRESENT | _PAGE_PROTNONE); diff --git a/include/asm-generic/pgtable.h b/include/asm-generic/pgtable.h index 4f66f3caebb0..53b2acc38213 100644 --- a/include/asm-generic/pgtable.h +++ b/include/asm-generic/pgtable.h @@ -233,6 +233,10 @@ static inline int pmd_same(pmd_t pmd_a, pmd_t pmd_b) # define pte_accessible(mm, pte) ((void)(pte), 1) #endif +#ifndef pte_present_nonuma +#define pte_present_nonuma(pte) pte_present(pte) +#endif + #ifndef flush_tlb_fix_spurious_fault #define flush_tlb_fix_spurious_fault(vma, address) flush_tlb_page(vma, address) #endif -- 2.39.5