From owner-svn-src-all@freebsd.org Wed May 25 10:09:24 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C48EBB49D66; Wed, 25 May 2016 10:09:24 +0000 (UTC) (envelope-from skra@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 879341004; Wed, 25 May 2016 10:09:24 +0000 (UTC) (envelope-from skra@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u4PA9Nik073321; Wed, 25 May 2016 10:09:23 GMT (envelope-from skra@FreeBSD.org) Received: (from skra@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u4PA9NAP073320; Wed, 25 May 2016 10:09:23 GMT (envelope-from skra@FreeBSD.org) Message-Id: <201605251009.u4PA9NAP073320@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: skra set sender to skra@FreeBSD.org using -f From: Svatopluk Kraus Date: Wed, 25 May 2016 10:09:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r300674 - head/sys/arm/arm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 May 2016 10:09:24 -0000 Author: skra Date: Wed May 25 10:09:23 2016 New Revision: 300674 URL: https://svnweb.freebsd.org/changeset/base/300674 Log: Add more info about the issue fixed in r298460. Rephrase some sentences and fix grammar. No functional change. Suggested by: alc Reviewed by: alc Modified: head/sys/arm/arm/pmap-v6.c Modified: head/sys/arm/arm/pmap-v6.c ============================================================================== --- head/sys/arm/arm/pmap-v6.c Wed May 25 10:04:53 2016 (r300673) +++ head/sys/arm/arm/pmap-v6.c Wed May 25 10:09:23 2016 (r300674) @@ -3302,10 +3302,16 @@ pmap_update_pte1_action(void *arg) * Change pte1 on current pmap. * Note that kernel pte1 must be changed on all pmaps. * - * By ARM ARM manual, the behaviour is UNPREDICABLE when two or more TLB - * entries map same VA. It's a problem when either promotion or demotion - * is being done. The pte1 update and appropriate TLB flush must be done - * atomically in general. + * According to the architecture reference manual published by ARM, + * the behaviour is UNPREDICTABLE when two or more TLB entries map the same VA. + * According to this manual, UNPREDICTABLE behaviours must never happen in + * a viable system. In contrast, on x86 processors, it is not specified which + * TLB entry mapping the virtual address will be used, but the MMU doesn't + * generate a bogus translation the way it does on Cortex-A8 rev 2 (Beaglebone + * Black). + * + * It's a problem when either promotion or demotion is being done. The pte1 + * update and appropriate TLB flush must be done atomically in general. */ static void pmap_change_pte1(pmap_t pmap, pt1_entry_t *pte1p, vm_offset_t va, @@ -3329,8 +3335,9 @@ pmap_change_pte1(pmap_t pmap, pt1_entry_ * Use break-before-make approach for changing userland * mappings. It can cause L1 translation aborts on other * cores in SMP case. So, special treatment is implemented - * in pmap_fault(). Interrups are disabled here to make it - * without any interruption as quick as possible. + * in pmap_fault(). To reduce the likelihood that another core + * will be affected by the broken mapping, disable interrupts + * until the mapping change is completed. */ cspr = disable_interrupts(PSR_I | PSR_F); pte1_clear(pte1p); @@ -6355,9 +6362,9 @@ pmap_fault(pmap_t pmap, vm_offset_t far, PMAP_LOCK(pmap); #ifdef SMP /* - * Special treatment due to break-before-make approach done when + * Special treatment is due to break-before-make approach done when * pte1 is updated for userland mapping during section promotion or - * demotion. If not catched here, pmap_enter() can find a section + * demotion. If not caught here, pmap_enter() can find a section * mapping on faulting address. That is not allowed. */ if (idx == FAULT_TRAN_L1 && usermode && cp15_ats1cur_check(far) == 0) {