diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-12-19 23:31:02 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-12-19 23:31:02 -0500 |
commit | f01af9f85855e38fbd601e033a8eac204cc4cc1c (patch) | |
tree | 106b1b24dd17a0c6cb9fdda35a249f429310b025 /arch/sparc/include/asm/hugetlb.h | |
parent | 9eb127cc04c4005c8c0708ce92146d91da862b42 (diff) | |
parent | 62ba63dc892cf836ecb9ce4fdb7644d45c95070b (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc
Pull sparc fixes from David Miller:
"Please pull to get these sparc AES/DES/CAMELLIA crypto bug fixes as
well as an addition of a pte_accessible() define for sparc64 and a
hugetlb fix from Dave Kleikamp."
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc:
sparc64: Set CRYPTO_TFM_REQ_MAY_SLEEP consistently in CAMELLIA code.
sparc64: Set CRYPTO_TFM_REQ_MAY_SLEEP consistently in DES code.
sparc64: Fix ECB looping constructs in AES code.
sparc64: Set CRYPTO_TFM_REQ_MAY_SLEEP consistently in AES code.
sparc64: Fix AES ctr mode block size.
sparc64: Fix unrolled AES 256-bit key loops.
sparc64: Define pte_accessible()
sparc: huge_ptep_set_* functions need to call set_huge_pte_at()
Diffstat (limited to 'arch/sparc/include/asm/hugetlb.h')
-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 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) | |||
61 | static inline void huge_ptep_set_wrprotect(struct mm_struct *mm, | 61 | static 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 | ||
67 | static inline int huge_ptep_set_access_flags(struct vm_area_struct *vma, | 68 | static 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 | ||
74 | static inline pte_t huge_ptep_get(pte_t *ptep) | 80 | static inline pte_t huge_ptep_get(pte_t *ptep) |