diff options
Diffstat (limited to 'arch/s390/include/asm/pgtable.h')
-rw-r--r-- | arch/s390/include/asm/pgtable.h | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/arch/s390/include/asm/pgtable.h b/arch/s390/include/asm/pgtable.h index c928dc1938f2..098adbb62660 100644 --- a/arch/s390/include/asm/pgtable.h +++ b/arch/s390/include/asm/pgtable.h | |||
@@ -1365,6 +1365,18 @@ static inline void pmdp_invalidate(struct vm_area_struct *vma, | |||
1365 | __pmd_idte(address, pmdp); | 1365 | __pmd_idte(address, pmdp); |
1366 | } | 1366 | } |
1367 | 1367 | ||
1368 | #define __HAVE_ARCH_PMDP_SET_WRPROTECT | ||
1369 | static inline void pmdp_set_wrprotect(struct mm_struct *mm, | ||
1370 | unsigned long address, pmd_t *pmdp) | ||
1371 | { | ||
1372 | pmd_t pmd = *pmdp; | ||
1373 | |||
1374 | if (pmd_write(pmd)) { | ||
1375 | __pmd_idte(address, pmdp); | ||
1376 | set_pmd_at(mm, address, pmdp, pmd_wrprotect(pmd)); | ||
1377 | } | ||
1378 | } | ||
1379 | |||
1368 | static inline pmd_t mk_pmd_phys(unsigned long physpage, pgprot_t pgprot) | 1380 | static inline pmd_t mk_pmd_phys(unsigned long physpage, pgprot_t pgprot) |
1369 | { | 1381 | { |
1370 | pmd_t __pmd; | 1382 | pmd_t __pmd; |
@@ -1387,10 +1399,7 @@ static inline int has_transparent_hugepage(void) | |||
1387 | 1399 | ||
1388 | static inline unsigned long pmd_pfn(pmd_t pmd) | 1400 | static inline unsigned long pmd_pfn(pmd_t pmd) |
1389 | { | 1401 | { |
1390 | if (pmd_trans_huge(pmd)) | 1402 | return pmd_val(pmd) >> PAGE_SHIFT; |
1391 | return pmd_val(pmd) >> HPAGE_SHIFT; | ||
1392 | else | ||
1393 | return pmd_val(pmd) >> PAGE_SHIFT; | ||
1394 | } | 1403 | } |
1395 | #endif /* CONFIG_TRANSPARENT_HUGEPAGE */ | 1404 | #endif /* CONFIG_TRANSPARENT_HUGEPAGE */ |
1396 | 1405 | ||