Message ID | 20140730.150722.861254999466992321.davem@davemloft.net |
---|---|
State | RFC |
Delegated to: | David Miller |
Headers | show |
I tested the merged sparc64 fixes in current git. V100: with hugetlb, looping git clone still hangs the machine. RED state on reboot has changed - before it gave the trace on reboot and continued, now it contonues looping with the trace indefinitely, gcc 4.6.4 Netra X1: works fine with HugeTLB (but no hugetlbfs) and looping git clone, gcc 4.6.4. V440: fails to boot with 3.16 and gcc 4.9.1 (same message as before, in fault_in_user_windows+0xe0/0x100). Tried latest git with gcc 4.9.1 but it stops after before getting to the previous failure point: [ 77.871887] console [tty0] enabled [ 77.912630] bootconsole [earlyprom0] disabled T2000: works fine with gcc 4.9.1 and hugetlb, 3.16. Hangs at boot at the same point. U2: looping git clone fails with 3.16, no hugetlb(!!!), gcc 4.6.4; E420R: works fine with gcc 4.6.4. 3.16, hugetlb, looping git clone; fails to boot with current git E220R: works with gcc 4.6.4, no hugetlb, 3.16. Hangs on boot with current git + hugetlb. Did not test current git more. Will test the patches on top of 3.16 separately to see if/which one of these is the culprit.
diff --git a/arch/sparc/mm/init_64.c b/arch/sparc/mm/init_64.c index 16b58ff..db5ddde 100644 --- a/arch/sparc/mm/init_64.c +++ b/arch/sparc/mm/init_64.c @@ -351,6 +351,10 @@ void update_mmu_cache(struct vm_area_struct *vma, unsigned long address, pte_t * mm = vma->vm_mm; + /* Don't insert a non-valid PTE into the TSB, we'll deadlock. */ + if (!pte_accessible(mm, pte)) + return; + spin_lock_irqsave(&mm->context.lock, flags); #if defined(CONFIG_HUGETLB_PAGE) || defined(CONFIG_TRANSPARENT_HUGEPAGE) @@ -2619,6 +2623,10 @@ void update_mmu_cache_pmd(struct vm_area_struct *vma, unsigned long addr, pte = pmd_val(entry); + /* Don't insert a non-valid PMD into the TSB, we'll deadlock. */ + if (!(pte & _PAGE_VALID)) + return; + /* We are fabricating 8MB pages using 4MB real hw pages. */ pte |= (addr & (1UL << REAL_HPAGE_SHIFT));