]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - include/asm-mips/pgtable.h
[MIPS] Fix mprotect() syscall for MIPS32 w/36-bit physical address support
[linux-2.6-omap-h63xx.git] / include / asm-mips / pgtable.h
index f80fe75c780063c28805cd4ee183a2f3c0ab7e95..d0af2a3b0152f2c7d2eadae2a1f1c4b6076fa5ac 100644 (file)
@@ -353,8 +353,9 @@ static inline pgprot_t pgprot_noncached(pgprot_t _prot)
 #if defined(CONFIG_64BIT_PHYS_ADDR) && defined(CONFIG_CPU_MIPS32_R1)
 static inline pte_t pte_modify(pte_t pte, pgprot_t newprot)
 {
-       pte.pte_low &= _PAGE_CHG_MASK;
-       pte.pte_low |= pgprot_val(newprot);
+       pte.pte_low  &= _PAGE_CHG_MASK;
+       pte.pte_high &= ~0x3f;
+       pte.pte_low  |= pgprot_val(newprot);
        pte.pte_high |= pgprot_val(newprot) & 0x3f;
        return pte;
 }