Module Name: src
Committed By: tsutsui
Date: Fri Feb 25 19:32:51 UTC 2011
Modified Files:
src/sys/arch/mips/mips: pmap.c
Log Message:
Fix LOCKDEBUG spin lock held panic on MIPS_CACHE_VIRTUAL_ALIAS CPUs.
Now cobalt boots multiuser, but many programs complains
"clntudp_create: RPC: Program not registered"
as well as R5000 sgimips O2. Smells virtual cache alias issue around pool...
To generate a diff of this commit:
cvs rdiff -u -r1.195 -r1.196 src/sys/arch/mips/mips/pmap.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/arch/mips/mips/pmap.c
diff -u src/sys/arch/mips/mips/pmap.c:1.195 src/sys/arch/mips/mips/pmap.c:1.196
--- src/sys/arch/mips/mips/pmap.c:1.195 Sun Feb 20 07:45:48 2011
+++ src/sys/arch/mips/mips/pmap.c Fri Feb 25 19:32:51 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: pmap.c,v 1.195 2011/02/20 07:45:48 matt Exp $ */
+/* $NetBSD: pmap.c,v 1.196 2011/02/25 19:32:51 tsutsui Exp $ */
/*-
* Copyright (c) 1998, 2001 The NetBSD Foundation, Inc.
@@ -67,7 +67,7 @@
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.195 2011/02/20 07:45:48 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.196 2011/02/25 19:32:51 tsutsui Exp $");
/*
* Manages physical address maps.
@@ -2234,7 +2234,7 @@
pmap, va);
#endif
if (__predict_true(apv == NULL)) {
-#ifdef MULTIPROCESSOR
+#if defined(MULTIPROCESSOR) || !defined(_LP64) || defined(PMAP_POOLPAGE_DEBUG)
/*
* To allocate a PV, we have to release the PVLIST lock
* so get the page generation. We allocate the PV, and
@@ -2245,6 +2245,7 @@
apv = (pv_entry_t)pmap_pv_alloc();
if (apv == NULL)
panic("pmap_enter_pv: pmap_pv_alloc() failed");
+#if defined(MULTIPROCESSOR) || !defined(_LP64) || defined(PMAP_POOLPAGE_DEBUG)
#ifdef MULTIPROCESSOR
/*
* If the generation has changed, then someone else
@@ -2252,10 +2253,13 @@
* start over.
*/
uint16_t oldgen = gen;
+#endif
gen = PG_MD_PVLIST_LOCK(md, true);
+#ifdef MULTIPROCESSOR
if (gen != oldgen)
goto again;
#endif
+#endif
}
npv = apv;
apv = NULL;