aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sparc/mm
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2014-08-05 21:57:18 -0400
committerDavid S. Miller <davem@davemloft.net>2014-08-05 21:57:18 -0400
commite9011d086674caeedb0ffb6eb5b8bc5920821df3 (patch)
treeed5d06353d8dc1fa5f6da349808f8345ca2291a5 /arch/sparc/mm
parentcfcfe22256d5a8a14924a1145d56017b043b554f (diff)
parentc78f77e20d2ba5d4d5e478e85a6fb42556893e2d (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc
Conflicts: arch/sparc/mm/init_64.c Conflict was simple non-overlapping additions. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/sparc/mm')
-rw-r--r--arch/sparc/mm/init_64.c32
1 files changed, 32 insertions, 0 deletions
diff --git a/arch/sparc/mm/init_64.c b/arch/sparc/mm/init_64.c
index 9f4f532e2627..cdc9f145e3c3 100644
--- a/arch/sparc/mm/init_64.c
+++ b/arch/sparc/mm/init_64.c
@@ -352,6 +352,10 @@ void update_mmu_cache(struct vm_area_struct *vma, unsigned long address, pte_t *
352 352
353 mm = vma->vm_mm; 353 mm = vma->vm_mm;
354 354
355 /* Don't insert a non-valid PTE into the TSB, we'll deadlock. */
356 if (!pte_accessible(mm, pte))
357 return;
358
355 spin_lock_irqsave(&mm->context.lock, flags); 359 spin_lock_irqsave(&mm->context.lock, flags);
356 360
357#if defined(CONFIG_HUGETLB_PAGE) || defined(CONFIG_TRANSPARENT_HUGEPAGE) 361#if defined(CONFIG_HUGETLB_PAGE) || defined(CONFIG_TRANSPARENT_HUGEPAGE)
@@ -2620,6 +2624,10 @@ void update_mmu_cache_pmd(struct vm_area_struct *vma, unsigned long addr,
2620 2624
2621 pte = pmd_val(entry); 2625 pte = pmd_val(entry);
2622 2626
2627 /* Don't insert a non-valid PMD into the TSB, we'll deadlock. */
2628 if (!(pte & _PAGE_VALID))
2629 return;
2630
2623 /* We are fabricating 8MB pages using 4MB real hw pages. */ 2631 /* We are fabricating 8MB pages using 4MB real hw pages. */
2624 pte |= (addr & (1UL << REAL_HPAGE_SHIFT)); 2632 pte |= (addr & (1UL << REAL_HPAGE_SHIFT));
2625 2633
@@ -2764,3 +2772,27 @@ static int __init report_memory(void)
2764 return 0; 2772 return 0;
2765} 2773}
2766device_initcall(report_memory); 2774device_initcall(report_memory);
2775
2776#ifdef CONFIG_SMP
2777#define do_flush_tlb_kernel_range smp_flush_tlb_kernel_range
2778#else
2779#define do_flush_tlb_kernel_range __flush_tlb_kernel_range
2780#endif
2781
2782void flush_tlb_kernel_range(unsigned long start, unsigned long end)
2783{
2784 if (start < HI_OBP_ADDRESS && end > LOW_OBP_ADDRESS) {
2785 if (start < LOW_OBP_ADDRESS) {
2786 flush_tsb_kernel_range(start, LOW_OBP_ADDRESS);
2787 do_flush_tlb_kernel_range(start, LOW_OBP_ADDRESS);
2788 }
2789 if (end > HI_OBP_ADDRESS) {
2790 flush_tsb_kernel_range(end, HI_OBP_ADDRESS);
2791 do_flush_tlb_kernel_range(end, HI_OBP_ADDRESS);
2792 }
2793 } else {
2794 flush_tsb_kernel_range(start, end);
2795 do_flush_tlb_kernel_range(start, end);
2796 }
2797}
2798>>>>>>> c78f77e20d2ba5d4d5e478e85a6fb42556893e2d