[PATCH 07/31] sched, numa, mm, s390/thp: Implement pmd_pgprot() for s390
From: Peter Zijlstra <hidden>
Date: 2012-10-25 13:08:31
Also in:
lkml
From: Gerald Schaefer <redacted> This patch adds an implementation of pmd_pgprot() for s390, in preparation to future THP changes. Reported-by: Stephen Rothwell <redacted> Signed-off-by: Gerald Schaefer <redacted> Cc: Martin Schwidefsky <redacted> Cc: Heiko Carstens <redacted> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Ralf Baechle <redacted> Signed-off-by: Ingo Molnar <mingo@kernel.org> --- arch/s390/include/asm/pgtable.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) Index: tip/arch/s390/include/asm/pgtable.h ===================================================================
--- tip.orig/arch/s390/include/asm/pgtable.h
+++ tip/arch/s390/include/asm/pgtable.h@@ -1240,6 +1240,19 @@ static inline void set_pmd_at(struct mm_ *pmdp = entry; } +static inline pgprot_t pmd_pgprot(pmd_t pmd) +{ + pgprot_t prot = PAGE_RW; + + if (pmd_val(pmd) & _SEGMENT_ENTRY_RO) { + if (pmd_val(pmd) & _SEGMENT_ENTRY_INV) + prot = PAGE_NONE; + else + prot = PAGE_RO; + } + return prot; +} + static inline unsigned long massage_pgprot_pmd(pgprot_t pgprot) { unsigned long pgprot_pmd = 0; --
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>