From: Ingo Molnar Date: Sun, 28 Oct 2012 13:10:14 +0000 (+0100) Subject: sched, numa, mm, s390/thp: Add pmd_mknotpresent() X-Git-Tag: next-20121029~34^2^2 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=9b718e758ac91f28b6cdd354ad5ee9c767daae74;p=karo-tx-linux.git sched, numa, mm, s390/thp: Add pmd_mknotpresent() We'd like to make use of pmd_mknotpresent() in mm/, but not all architectures have it. This patch adds the s390 version. Signed-off-by: Ingo Molnar Cc: Stephen Rothwell Cc: Martin Schwidefsky Cc: Heiko Carstens Cc: Peter Zijlstra Cc: Ralf Baechle Cc: Peter Zijlstra Cc: Gerald Schaefer Link: http://lkml.kernel.org/r/20121028131014.GA10754@gmail.com Signed-off-by: Ingo Molnar --- diff --git a/arch/s390/include/asm/pgtable.h b/arch/s390/include/asm/pgtable.h index 098fc5a6bd52..b820ff1db35e 100644 --- a/arch/s390/include/asm/pgtable.h +++ b/arch/s390/include/asm/pgtable.h @@ -1310,6 +1310,12 @@ static inline pmd_t pmd_mkyoung(pmd_t pmd) return pmd; } +static inline pmd_t pmd_mknotpresent(pmd_t pmd) +{ + pmd_val(pmd) &= ~_SEGMENT_ENTRY_ORIGIN; + return pmd; +} + #define __HAVE_ARCH_PMDP_TEST_AND_CLEAR_YOUNG static inline int pmdp_test_and_clear_young(struct vm_area_struct *vma, unsigned long address, pmd_t *pmdp)