Port-arm archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: panic pmap_tlb_intersecting_active_p on RPI2



On 17-Jul-16 1:10 AM, Michael Plass wrote:
I'm seeing a panic with a recently built -current (a couple of instances here):
[snip]

panic: kernel diagnostic assertion "pmap_tlb_intersecting_active_p(PAI_PMAP(pai,
  ti), ti)" failed: file "/usr/home/michael/netbsd/usr/src/sys/uvm/pmap/pmap_tlb.
c", line 220
cpu1: Begin traceback...
0xbac93e2c: netbsd:db_panic+0xc
0xbac93e44: netbsd:vpanic+0x1b4
0xbac93e5c: netbsd:__udivmoddi4
0xbac93e9c: netbsd:pmap_tlb_pai_check.constprop.5+0x170
0xbac93eb4: netbsd:pmap_deactivate+0x40
0xbac93f0c: netbsd:mi_switch+0x328
0xbac93f3c: netbsd:sleepq_block+0xb4
0xbac93f6c: netbsd:cv_wait+0x104
0xbac93fac: netbsd:usb_task_thread+0x17c
cpu1: End traceback...
Can you try the attached patch - I'm away form my machines atm and can't test.

Thanks,
Nick
Index: sys/arch/arm/arm32/pmap.c
===================================================================
RCS file: /cvsroot/src/sys/arch/arm/arm32/pmap.c,v
retrieving revision 1.335
diff -u -p -r1.335 pmap.c
--- sys/arch/arm/arm32/pmap.c	14 Jul 2016 15:51:41 -0000	1.335
+++ sys/arch/arm/arm32/pmap.c	17 Jul 2016 06:03:44 -0000
@@ -5034,13 +5035,21 @@ pmap_update(pmap_t pm)
 				    cpu_index(ci));
 			}
 		}
+
 		KASSERT(kcpuset_iszero(pm->pm_onproc));
-#endif
+		/* Assume one TLB for now */
+		CTASSERT(PMAP_TLB_MAX == 1);
 		struct pmap_asid_info * const pai =
 		    PMAP_PAI(pm, cpu_tlb_info(ci));
 
 		tlb_invalidate_asids(pai->pai_asid, pai->pai_asid);
 
+#endif
+		/*
+		 * For the UP case pmap_tlb_asid_release_all flushes
+		 * the TLB
+		 */
+		pmap_tlb_asid_release_all(pm);
 #else
 		/*
 		 * Finish up the pmap_remove_all() optimisation by flushing



Home | Main Index | Thread Index | Old Index