From owner-svn-src-user@FreeBSD.ORG Sat Feb 21 21:10:12 2015 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0741E1D2; Sat, 21 Feb 2015 21:10:12 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CCCDE854; Sat, 21 Feb 2015 21:10:11 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t1LLABj7071910; Sat, 21 Feb 2015 21:10:11 GMT (envelope-from nwhitehorn@FreeBSD.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t1LLABfh071907; Sat, 21 Feb 2015 21:10:11 GMT (envelope-from nwhitehorn@FreeBSD.org) Message-Id: <201502212110.t1LLABfh071907@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: nwhitehorn set sender to nwhitehorn@FreeBSD.org using -f From: Nathan Whitehorn Date: Sat, 21 Feb 2015 21:10:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r279109 - user/nwhitehorn/ppc64-pmap-rework/aim X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 21 Feb 2015 21:10:12 -0000 Author: nwhitehorn Date: Sat Feb 21 21:10:10 2015 New Revision: 279109 URL: https://svnweb.freebsd.org/changeset/base/279109 Log: Fix locking problems on Apple G5s. Modified: user/nwhitehorn/ppc64-pmap-rework/aim/mmu_oea64.c user/nwhitehorn/ppc64-pmap-rework/aim/moea64_native.c Modified: user/nwhitehorn/ppc64-pmap-rework/aim/mmu_oea64.c ============================================================================== --- user/nwhitehorn/ppc64-pmap-rework/aim/mmu_oea64.c Sat Feb 21 20:41:50 2015 (r279108) +++ user/nwhitehorn/ppc64-pmap-rework/aim/mmu_oea64.c Sat Feb 21 21:10:10 2015 (r279109) @@ -482,6 +482,7 @@ moea64_add_ofw_mappings(mmu_t mmup, phan { struct ofw_map translations[sz/(4*sizeof(cell_t))]; /*>= 4 cells per */ pcell_t acells, trans_cells[sz/sizeof(cell_t)]; + struct pvo_entry *pvo; register_t msr; vm_offset_t off; vm_paddr_t pa_base; @@ -535,8 +536,11 @@ moea64_add_ofw_mappings(mmu_t mmup, phan moea64_calc_wimg(pa_base + off, VM_MEMATTR_DEFAULT) == LPTE_M) continue; - if (moea64_pvo_find_va(kernel_pmap, - translations[i].om_va + off) != NULL) + PMAP_LOCK(kernel_pmap); + pvo = moea64_pvo_find_va(kernel_pmap, + translations[i].om_va + off); + PMAP_UNLOCK(kernel_pmap); + if (pvo != NULL) continue; moea64_kenter(mmup, translations[i].om_va + off, Modified: user/nwhitehorn/ppc64-pmap-rework/aim/moea64_native.c ============================================================================== --- user/nwhitehorn/ppc64-pmap-rework/aim/moea64_native.c Sat Feb 21 20:41:50 2015 (r279108) +++ user/nwhitehorn/ppc64-pmap-rework/aim/moea64_native.c Sat Feb 21 21:10:10 2015 (r279109) @@ -342,6 +342,7 @@ moea64_pte_unset_native(mmu_t mmu, struc ptelo = be64toh(pt->pte_lo); *((volatile int32_t *)(&pt->pte_hi) + 1) = 0; /* Release lock */ critical_exit(); + rw_runlock(&moea64_eviction_lock); /* Keep statistics */ moea64_pte_valid--;