diff options
Diffstat (limited to 'arch/sparc/mm/tlb.c')
-rw-r--r-- | arch/sparc/mm/tlb.c | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/arch/sparc/mm/tlb.c b/arch/sparc/mm/tlb.c index 847ddffbf38a..b5cfab711651 100644 --- a/arch/sparc/mm/tlb.c +++ b/arch/sparc/mm/tlb.c | |||
@@ -163,13 +163,10 @@ static void tlb_batch_pmd_scan(struct mm_struct *mm, unsigned long vaddr, | |||
163 | pte_unmap(pte); | 163 | pte_unmap(pte); |
164 | } | 164 | } |
165 | 165 | ||
166 | void set_pmd_at(struct mm_struct *mm, unsigned long addr, | ||
167 | pmd_t *pmdp, pmd_t pmd) | ||
168 | { | ||
169 | pmd_t orig = *pmdp; | ||
170 | |||
171 | *pmdp = pmd; | ||
172 | 166 | ||
167 | static void __set_pmd_acct(struct mm_struct *mm, unsigned long addr, | ||
168 | pmd_t orig, pmd_t pmd) | ||
169 | { | ||
173 | if (mm == &init_mm) | 170 | if (mm == &init_mm) |
174 | return; | 171 | return; |
175 | 172 | ||
@@ -219,6 +216,15 @@ void set_pmd_at(struct mm_struct *mm, unsigned long addr, | |||
219 | } | 216 | } |
220 | } | 217 | } |
221 | 218 | ||
219 | void set_pmd_at(struct mm_struct *mm, unsigned long addr, | ||
220 | pmd_t *pmdp, pmd_t pmd) | ||
221 | { | ||
222 | pmd_t orig = *pmdp; | ||
223 | |||
224 | *pmdp = pmd; | ||
225 | __set_pmd_acct(mm, addr, orig, pmd); | ||
226 | } | ||
227 | |||
222 | static inline pmd_t pmdp_establish(struct vm_area_struct *vma, | 228 | static inline pmd_t pmdp_establish(struct vm_area_struct *vma, |
223 | unsigned long address, pmd_t *pmdp, pmd_t pmd) | 229 | unsigned long address, pmd_t *pmdp, pmd_t pmd) |
224 | { | 230 | { |
@@ -227,6 +233,7 @@ static inline pmd_t pmdp_establish(struct vm_area_struct *vma, | |||
227 | do { | 233 | do { |
228 | old = *pmdp; | 234 | old = *pmdp; |
229 | } while (cmpxchg64(&pmdp->pmd, old.pmd, pmd.pmd) != old.pmd); | 235 | } while (cmpxchg64(&pmdp->pmd, old.pmd, pmd.pmd) != old.pmd); |
236 | __set_pmd_acct(vma->vm_mm, address, old, pmd); | ||
230 | 237 | ||
231 | return old; | 238 | return old; |
232 | } | 239 | } |