diff options
author | Dave Kleikamp <dave.kleikamp@oracle.com> | 2012-12-17 11:52:47 -0600 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-01-11 09:06:59 -0800 |
commit | a9b876220838f045ab3c365f668477771e149c3c (patch) | |
tree | b1fcc174f39844139baa71e3616f2a9dcb057f8d | |
parent | af445c0d36202fe86bc50f0a1831c5661f5b1189 (diff) | |
download | linux-3.10-a9b876220838f045ab3c365f668477771e149c3c.tar.gz linux-3.10-a9b876220838f045ab3c365f668477771e149c3c.tar.bz2 linux-3.10-a9b876220838f045ab3c365f668477771e149c3c.zip |
sparc: huge_ptep_set_* functions need to call set_huge_pte_at()
[ Upstream commit 6cb9c3697585c47977c42c5cc1b9fc49247ac530 ]
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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | arch/sparc/include/asm/hugetlb.h | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/arch/sparc/include/asm/hugetlb.h b/arch/sparc/include/asm/hugetlb.h index 177061064ee..f368cef0379 100644 --- a/arch/sparc/include/asm/hugetlb.h +++ b/arch/sparc/include/asm/hugetlb.h @@ -58,14 +58,20 @@ static inline pte_t huge_pte_wrprotect(pte_t pte) static inline void huge_ptep_set_wrprotect(struct mm_struct *mm, unsigned long addr, pte_t *ptep) { - ptep_set_wrprotect(mm, addr, ptep); + pte_t old_pte = *ptep; + set_huge_pte_at(mm, addr, ptep, pte_wrprotect(old_pte)); } static inline int huge_ptep_set_access_flags(struct vm_area_struct *vma, unsigned long addr, pte_t *ptep, pte_t pte, int dirty) { - return ptep_set_access_flags(vma, addr, ptep, pte, dirty); + int changed = !pte_same(*ptep, pte); + if (changed) { + set_huge_pte_at(vma->vm_mm, addr, ptep, pte); + flush_tlb_page(vma, addr); + } + return changed; } static inline pte_t huge_ptep_get(pte_t *ptep) |