aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Schwidefsky <schwidefsky@de.ibm.com>2014-09-23 08:01:34 -0400
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2015-08-03 04:05:58 -0400
commitb54565b86824ecc9f0ad5d0ee69696f38edc50fd (patch)
tree99b98bf8b36982e1659d5f91ec9e27aa12fe74b1
parent888d5e9804bb401f3531b700cc93da0bdf8496bf (diff)
s390/mm: add NUMA balancing primitives
Define pte_protnone and pmd_protnone for NUMA memory migration. Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
-rw-r--r--arch/s390/include/asm/pgtable.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/arch/s390/include/asm/pgtable.h b/arch/s390/include/asm/pgtable.h
index f66d82798a6a..bdb2f51124ed 100644
--- a/arch/s390/include/asm/pgtable.h
+++ b/arch/s390/include/asm/pgtable.h
@@ -576,6 +576,19 @@ static inline int pte_same(pte_t a, pte_t b)
576 return pte_val(a) == pte_val(b); 576 return pte_val(a) == pte_val(b);
577} 577}
578 578
579#ifdef CONFIG_NUMA_BALANCING
580static inline int pte_protnone(pte_t pte)
581{
582 return pte_present(pte) && !(pte_val(pte) & _PAGE_READ);
583}
584
585static inline int pmd_protnone(pmd_t pmd)
586{
587 /* pmd_large(pmd) implies pmd_present(pmd) */
588 return pmd_large(pmd) && !(pmd_val(pmd) & _SEGMENT_ENTRY_READ);
589}
590#endif
591
579static inline pgste_t pgste_get_lock(pte_t *ptep) 592static inline pgste_t pgste_get_lock(pte_t *ptep)
580{ 593{
581 unsigned long new = 0; 594 unsigned long new = 0;