Skip to content

Commit

Permalink
s390/mm: add NUMA balancing primitives
Browse files Browse the repository at this point in the history
Define pte_protnone and pmd_protnone for NUMA memory migration.

Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
  • Loading branch information
Martin Schwidefsky committed Aug 3, 2015
1 parent 888d5e9 commit b54565b
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions arch/s390/include/asm/pgtable.h
Original file line number Diff line number Diff line change
Expand Up @@ -576,6 +576,19 @@ static inline int pte_same(pte_t a, pte_t b)
return pte_val(a) == pte_val(b);
}

#ifdef CONFIG_NUMA_BALANCING
static inline int pte_protnone(pte_t pte)
{
return pte_present(pte) && !(pte_val(pte) & _PAGE_READ);
}

static inline int pmd_protnone(pmd_t pmd)
{
/* pmd_large(pmd) implies pmd_present(pmd) */
return pmd_large(pmd) && !(pmd_val(pmd) & _SEGMENT_ENTRY_READ);
}
#endif

static inline pgste_t pgste_get_lock(pte_t *ptep)
{
unsigned long new = 0;
Expand Down

0 comments on commit b54565b

Please sign in to comment.