X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=include%2Fasm-s390%2Fpgtable.h;h=85f043c6d5cfffd393aa490fcfd96a050d54bc19;hb=6a77f38946aaee1cd85eeec6cf4229b204c15071;hp=c74a47e903eed9a91e31710cec70c2ec0ec3e9f7;hpb=87fc8d1bb10cd459024a742c6a10961fefcef18f;p=linux-2.6.git diff --git a/include/asm-s390/pgtable.h b/include/asm-s390/pgtable.h index c74a47e90..85f043c6d 100644 --- a/include/asm-s390/pgtable.h +++ b/include/asm-s390/pgtable.h @@ -13,6 +13,8 @@ #ifndef _ASM_S390_PGTABLE_H #define _ASM_S390_PGTABLE_H +#include + /* * 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 @@ -416,6 +418,14 @@ extern inline int pte_young(pte_t pte) 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 */ @@ -679,7 +689,7 @@ static inline pte_t mk_pte_phys(unsigned long physpage, pgprot_t pgprot) #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 */