diff options
| -rw-r--r-- | arch/mips/include/asm/pgtable.h | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/arch/mips/include/asm/pgtable.h b/arch/mips/include/asm/pgtable.h index a6b611f1da43..f53816744d60 100644 --- a/arch/mips/include/asm/pgtable.h +++ b/arch/mips/include/asm/pgtable.h | |||
| @@ -24,7 +24,7 @@ struct mm_struct; | |||
| 24 | struct vm_area_struct; | 24 | struct vm_area_struct; |
| 25 | 25 | ||
| 26 | #define PAGE_NONE __pgprot(_PAGE_PRESENT | _PAGE_NO_READ | \ | 26 | #define PAGE_NONE __pgprot(_PAGE_PRESENT | _PAGE_NO_READ | \ |
| 27 | _CACHE_CACHABLE_NONCOHERENT) | 27 | _page_cachable_default) |
| 28 | #define PAGE_SHARED __pgprot(_PAGE_PRESENT | _PAGE_WRITE | \ | 28 | #define PAGE_SHARED __pgprot(_PAGE_PRESENT | _PAGE_WRITE | \ |
| 29 | _page_cachable_default) | 29 | _page_cachable_default) |
| 30 | #define PAGE_COPY __pgprot(_PAGE_PRESENT | _PAGE_NO_EXEC | \ | 30 | #define PAGE_COPY __pgprot(_PAGE_PRESENT | _PAGE_NO_EXEC | \ |
| @@ -476,7 +476,7 @@ static inline pte_t pte_modify(pte_t pte, pgprot_t newprot) | |||
| 476 | pte.pte_low &= (_PAGE_MODIFIED | _PAGE_ACCESSED | _PFNX_MASK); | 476 | pte.pte_low &= (_PAGE_MODIFIED | _PAGE_ACCESSED | _PFNX_MASK); |
| 477 | pte.pte_high &= (_PFN_MASK | _CACHE_MASK); | 477 | pte.pte_high &= (_PFN_MASK | _CACHE_MASK); |
| 478 | pte.pte_low |= pgprot_val(newprot) & ~_PFNX_MASK; | 478 | pte.pte_low |= pgprot_val(newprot) & ~_PFNX_MASK; |
| 479 | pte.pte_high |= pgprot_val(newprot) & ~_PFN_MASK; | 479 | pte.pte_high |= pgprot_val(newprot) & ~(_PFN_MASK | _CACHE_MASK); |
| 480 | return pte; | 480 | return pte; |
| 481 | } | 481 | } |
| 482 | #elif defined(CONFIG_PHYS_ADDR_T_64BIT) && defined(CONFIG_CPU_MIPS32) | 482 | #elif defined(CONFIG_PHYS_ADDR_T_64BIT) && defined(CONFIG_CPU_MIPS32) |
| @@ -491,7 +491,8 @@ static inline pte_t pte_modify(pte_t pte, pgprot_t newprot) | |||
| 491 | #else | 491 | #else |
| 492 | static inline pte_t pte_modify(pte_t pte, pgprot_t newprot) | 492 | static inline pte_t pte_modify(pte_t pte, pgprot_t newprot) |
| 493 | { | 493 | { |
| 494 | return __pte((pte_val(pte) & _PAGE_CHG_MASK) | pgprot_val(newprot)); | 494 | return __pte((pte_val(pte) & _PAGE_CHG_MASK) | |
| 495 | (pgprot_val(newprot) & ~_PAGE_CHG_MASK)); | ||
| 495 | } | 496 | } |
| 496 | #endif | 497 | #endif |
| 497 | 498 | ||
| @@ -632,7 +633,8 @@ static inline struct page *pmd_page(pmd_t pmd) | |||
| 632 | 633 | ||
| 633 | static inline pmd_t pmd_modify(pmd_t pmd, pgprot_t newprot) | 634 | static inline pmd_t pmd_modify(pmd_t pmd, pgprot_t newprot) |
| 634 | { | 635 | { |
| 635 | pmd_val(pmd) = (pmd_val(pmd) & _PAGE_CHG_MASK) | pgprot_val(newprot); | 636 | pmd_val(pmd) = (pmd_val(pmd) & _PAGE_CHG_MASK) | |
| 637 | (pgprot_val(newprot) & ~_PAGE_CHG_MASK); | ||
| 636 | return pmd; | 638 | return pmd; |
| 637 | } | 639 | } |
| 638 | 640 | ||
