#ifndef _ASM_S390_PGTABLE_H
#define _ASM_S390_PGTABLE_H
+#include <asm-generic/4level-fixup.h>
+
/*
* The Linux memory management assumes a three-level page table setup. For
* s390 31 bit we "fold" the mid level into the top-level page table, so
return 0;
}
+extern inline int pte_read(pte_t pte)
+{
+ /* All pages are readable since we don't use the fetch
+ * protection bit in the storage key.
+ */
+ return 1;
+}
+
/*
* pgd/pmd/pte modification functions
*/
#define pgd_page_kernel(pgd) (pgd_val(pgd) & PAGE_MASK)
/* to find an entry in a page-table-directory */
-#define pgd_index(address) ((address >> PGDIR_SHIFT) & (PTRS_PER_PGD-1))
+#define pgd_index(address) (((address) >> PGDIR_SHIFT) & (PTRS_PER_PGD-1))
#define pgd_offset(mm, address) ((mm)->pgd+pgd_index(address))
/* to find an entry in a kernel page-table-directory */