From: NIIBE Y. <gn...@m1...> - 2001-07-18 04:29:02
|
Please try this out. I've committed it. 2001-07-18 NIIBE Yutaka <gn...@m1...> * arch/sh/mm/fault.c (__do_page_fault): Use pte_not_present. * include/asm-sh/pgtable.h (pte_not_present): New inline function. Index: arch/sh/mm/fault.c =================================================================== RCS file: /cvsroot/linuxsh/kernel/arch/sh/mm/fault.c,v retrieving revision 1.43 diff -u -r1.43 fault.c --- arch/sh/mm/fault.c 2001/07/17 11:45:05 1.43 +++ arch/sh/mm/fault.c 2001/07/18 04:26:06 @@ -255,7 +255,7 @@ } pte = pte_offset(pmd, address); entry = *pte; - if (pte_none(entry) || !pte_present(entry) + if (pte_none(entry) || pte_not_present(entry) || (writeaccess && !pte_write(entry))) return 1; Index: include/asm-sh/pgtable.h =================================================================== RCS file: /cvsroot/linuxsh/kernel/include/asm-sh/pgtable.h,v retrieving revision 1.33 diff -u -r1.33 pgtable.h --- include/asm-sh/pgtable.h 2001/07/08 08:35:07 1.33 +++ include/asm-sh/pgtable.h 2001/07/18 04:26:08 @@ -210,6 +210,7 @@ static inline int pte_dirty(pte_t pte){ return pte_val(pte) & _PAGE_DIRTY; } static inline int pte_young(pte_t pte){ return pte_val(pte) & _PAGE_ACCESSED; } static inline int pte_write(pte_t pte){ return pte_val(pte) & _PAGE_RW; } +static inline int pte_not_present(pte_t pte){ return !(pte_val(pte) & _PAGE_PRESENT); } static inline pte_t pte_rdprotect(pte_t pte) { set_pte(&pte, __pte(pte_val(pte) & ~_PAGE_USER)); return pte; } static inline pte_t pte_exprotect(pte_t pte) { set_pte(&pte, __pte(pte_val(pte) & ~_PAGE_USER)); return pte; } -- |