aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/include/asm
diff options
context:
space:
mode:
authorMel Gorman <mgorman@suse.de>2015-02-12 17:58:19 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2015-02-12 21:54:08 -0500
commite7bb4b6d1609cce391af1e7bc6f31d14f1a3a890 (patch)
treea6c5101e1b4cd9c9f0de605723b7c378b0c028d7 /arch/x86/include/asm
parent5d833062139d290adb8b62c093b654a01a353448 (diff)
mm: add p[te|md] protnone helpers for use by NUMA balancing
This is a preparatory patch that introduces protnone helpers for automatic NUMA balancing. Signed-off-by: Mel Gorman <mgorman@suse.de> Acked-by: Linus Torvalds <torvalds@linux-foundation.org> Acked-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> Tested-by: Sasha Levin <sasha.levin@oracle.com> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Dave Jones <davej@redhat.com> Cc: Hugh Dickins <hughd@google.com> Cc: Ingo Molnar <mingo@redhat.com> Cc: Kirill Shutemov <kirill.shutemov@linux.intel.com> Cc: Paul Mackerras <paulus@samba.org> Cc: Rik van Riel <riel@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/x86/include/asm')
-rw-r--r--arch/x86/include/asm/pgtable.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/arch/x86/include/asm/pgtable.h b/arch/x86/include/asm/pgtable.h
index 0fe03f834fb1..f519b0b529dd 100644
--- a/arch/x86/include/asm/pgtable.h
+++ b/arch/x86/include/asm/pgtable.h
@@ -483,6 +483,22 @@ static inline int pmd_present(pmd_t pmd)
483 _PAGE_NUMA); 483 _PAGE_NUMA);
484} 484}
485 485
486#ifdef CONFIG_NUMA_BALANCING
487/*
488 * These work without NUMA balancing but the kernel does not care. See the
489 * comment in include/asm-generic/pgtable.h
490 */
491static inline int pte_protnone(pte_t pte)
492{
493 return pte_flags(pte) & _PAGE_PROTNONE;
494}
495
496static inline int pmd_protnone(pmd_t pmd)
497{
498 return pmd_flags(pmd) & _PAGE_PROTNONE;
499}
500#endif /* CONFIG_NUMA_BALANCING */
501
486static inline int pmd_none(pmd_t pmd) 502static inline int pmd_none(pmd_t pmd)
487{ 503{
488 /* Only check low word on 32-bit platforms, since it might be 504 /* Only check low word on 32-bit platforms, since it might be