Commit-ID: 20bab31fb6a4a77aad28fcff45db7279ad15e473 Gitweb: http://git.kernel.org/tip/20bab31fb6a4a77aad28fcff45db7279ad15e473 Author: Gerald Schaefer <gerald.schaefer@xxxxxxxxxx> AuthorDate: Thu, 18 Oct 2012 18:26:42 +0200 Committer: Ingo Molnar <mingo@xxxxxxxxxx> CommitDate: Sat, 20 Oct 2012 09:59:50 +0200 s390/thp: implement pmd_pgprot() for s390 Git commit "mm/thp: Preserve pgprot across huge page split" introduced a pmd_pgprot() function, which is missing on s390, resulting in a compile error in linux-next where THP is enabled on s390 as well. This patch adds an implementation of pmd_pgprot() for s390. Reported-by: Stephen Rothwell <sfr@xxxxxxxxxxxxxxxx> Signed-off-by: Gerald Schaefer <gerald.schaefer@xxxxxxxxxx> Cc: Martin Schwidefsky <schwidefsky@xxxxxxxxxx> Cc: Heiko Carstens <heiko.carstens@xxxxxxxxxx> Cc: Peter Zijlstra <peterz@xxxxxxxxxxxxx> Cc: Ralf Baechle <ralf@xxxxxxxxxxxxxx> Signed-off-by: Ingo Molnar <mingo@xxxxxxxxxx> --- arch/s390/include/asm/pgtable.h | 13 +++++++++++++ 1 files changed, 13 insertions(+), 0 deletions(-) diff --git a/arch/s390/include/asm/pgtable.h b/arch/s390/include/asm/pgtable.h index dd647c9..098fc5a 100644 --- a/arch/s390/include/asm/pgtable.h +++ b/arch/s390/include/asm/pgtable.h @@ -1240,6 +1240,19 @@ static inline void set_pmd_at(struct mm_struct *mm, unsigned long addr, *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 from this list: send the line "unsubscribe linux-tip-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html