aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sparc
diff options
context:
space:
mode:
authorDave Kleikamp <dave.kleikamp@oracle.com>2012-12-17 12:52:47 -0500
committerDavid S. Miller <davem@davemloft.net>2012-12-18 18:36:20 -0500
commit6cb9c3697585c47977c42c5cc1b9fc49247ac530 (patch)
treeb78fd2378c1f0f0daedcb631db18fddcd82e0215 /arch/sparc
parent31564cbd77baa88405862d4aa0d00893ab1d8cb7 (diff)
sparc: huge_ptep_set_* functions need to call set_huge_pte_at()
Modifying the huge pte's requires that all the underlying pte's be modified. Version 2: added missing flush_tlb_page() Signed-off-by: Dave Kleikamp <dave.kleikamp@oracle.com> Cc: "David S. Miller" <davem@davemloft.net> Cc: sparclinux@vger.kernel.org Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/sparc')
-rw-r--r--arch/sparc/include/asm/hugetlb.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/arch/sparc/include/asm/hugetlb.h b/arch/sparc/include/asm/hugetlb.h
index 8c5eed6d267f..9661e9bc7bb6 100644
--- a/arch/sparc/include/asm/hugetlb.h
+++ b/arch/sparc/include/asm/hugetlb.h
@@ -61,14 +61,20 @@ static inline pte_t huge_pte_wrprotect(pte_t pte)
61static inline void huge_ptep_set_wrprotect(struct mm_struct *mm, 61static inline void huge_ptep_set_wrprotect(struct mm_struct *mm,
62 unsigned long addr, pte_t *ptep) 62 unsigned long addr, pte_t *ptep)
63{ 63{
64 ptep_set_wrprotect(mm, addr, ptep); 64 pte_t old_pte = *ptep;
65 set_huge_pte_at(mm, addr, ptep, pte_wrprotect(old_pte));
65} 66}
66 67
67static inline int huge_ptep_set_access_flags(struct vm_area_struct *vma, 68static inline int huge_ptep_set_access_flags(struct vm_area_struct *vma,
68 unsigned long addr, pte_t *ptep, 69 unsigned long addr, pte_t *ptep,
69 pte_t pte, int dirty) 70 pte_t pte, int dirty)
70{ 71{
71 return ptep_set_access_flags(vma, addr, ptep, pte, dirty); 72 int changed = !pte_same(*ptep, pte);
73 if (changed) {
74 set_huge_pte_at(vma->vm_mm, addr, ptep, pte);
75 flush_tlb_page(vma, addr);
76 }
77 return changed;
72} 78}
73 79
74static inline pte_t huge_ptep_get(pte_t *ptep) 80static inline pte_t huge_ptep_get(pte_t *ptep)