Module Name: src Committed By: mrg Date: Sat Mar 20 20:36:23 UTC 2010
Modified Files: src/sys/arch/sparc64/sparc64: pmap.c Log Message: convert pmap_lock into an IPL_VM lock, and avoid calling KASSERT(!mutex_owned(&pmap_lock)) since that's no longer valid. this fixes hangs on 4-core machines like the U80. tested on U80, SB2500 and SB2000. XXX: my initial attempts to replace pseg_lock with this new equivalent XXX: lock hang in pmap_bootstrap it seems.. but this should be able XXX: to go away now. To generate a diff of this commit: cvs rdiff -u -r1.259 -r1.260 src/sys/arch/sparc64/sparc64/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/sparc64/sparc64/pmap.c diff -u src/sys/arch/sparc64/sparc64/pmap.c:1.259 src/sys/arch/sparc64/sparc64/pmap.c:1.260 --- src/sys/arch/sparc64/sparc64/pmap.c:1.259 Wed Mar 10 06:57:22 2010 +++ src/sys/arch/sparc64/sparc64/pmap.c Sat Mar 20 20:36:23 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: pmap.c,v 1.259 2010/03/10 06:57:22 mrg Exp $ */ +/* $NetBSD: pmap.c,v 1.260 2010/03/20 20:36:23 mrg Exp $ */ /* * * Copyright (C) 1996-1999 Eduardo Horvath. @@ -26,7 +26,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.259 2010/03/10 06:57:22 mrg Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.260 2010/03/20 20:36:23 mrg Exp $"); #undef NO_VCACHE /* Don't forget the locked TLB in dostart */ #define HWREF @@ -1293,7 +1293,7 @@ vm_first_phys = avail_start; vm_num_phys = avail_end - avail_start; - mutex_init(&pmap_lock, MUTEX_DEFAULT, IPL_NONE); + mutex_init(&pmap_lock, MUTEX_SPIN, IPL_VM); #if defined(USE_LOCKSAFE_PSEG_GETSET) mutex_init(&pseg_lock, MUTEX_SPIN, IPL_VM); #endif @@ -2621,8 +2621,6 @@ pv_entry_t pv, npv; bool res = false; - KASSERT(!mutex_owned(&pmap_lock)); - /* Check if any mapping has been modified */ pv = &pg->mdpage.mdpg_pvh; if (pv->pv_va & PV_MOD) @@ -2725,8 +2723,6 @@ pv_entry_t pv; bool res = false; - KASSERT(!mutex_owned(&pmap_lock)); - /* Check if any mapping has been referenced */ pv = &pg->mdpage.mdpg_pvh; if (pv->pv_va & PV_REF)