aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sparc64/mm/init.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/sparc64/mm/init.c')
-rw-r--r--arch/sparc64/mm/init.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/arch/sparc64/mm/init.c b/arch/sparc64/mm/init.c
index b40f6477dea0..d703b67bc7b9 100644
--- a/arch/sparc64/mm/init.c
+++ b/arch/sparc64/mm/init.c
@@ -279,7 +279,7 @@ void update_mmu_cache(struct vm_area_struct *vma, unsigned long address, pte_t p
279{ 279{
280 struct mm_struct *mm; 280 struct mm_struct *mm;
281 struct tsb *tsb; 281 struct tsb *tsb;
282 unsigned long tag; 282 unsigned long tag, flags;
283 283
284 if (tlb_type != hypervisor) { 284 if (tlb_type != hypervisor) {
285 unsigned long pfn = pte_pfn(pte); 285 unsigned long pfn = pte_pfn(pte);
@@ -308,10 +308,15 @@ void update_mmu_cache(struct vm_area_struct *vma, unsigned long address, pte_t p
308 } 308 }
309 309
310 mm = vma->vm_mm; 310 mm = vma->vm_mm;
311
312 spin_lock_irqsave(&mm->context.lock, flags);
313
311 tsb = &mm->context.tsb[(address >> PAGE_SHIFT) & 314 tsb = &mm->context.tsb[(address >> PAGE_SHIFT) &
312 (mm->context.tsb_nentries - 1UL)]; 315 (mm->context.tsb_nentries - 1UL)];
313 tag = (address >> 22UL); 316 tag = (address >> 22UL);
314 tsb_insert(tsb, tag, pte_val(pte)); 317 tsb_insert(tsb, tag, pte_val(pte));
318
319 spin_unlock_irqrestore(&mm->context.lock, flags);
315} 320}
316 321
317void flush_dcache_page(struct page *page) 322void flush_dcache_page(struct page *page)