From owner-svn-src-all@FreeBSD.ORG Sun May 25 14:01:52 2014 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2151BFC0; Sun, 25 May 2014 14:01:52 +0000 (UTC) Received: from mho-01-ewr.mailhop.org (mho-03-ewr.mailhop.org [204.13.248.66]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E973D22CE; Sun, 25 May 2014 14:01:51 +0000 (UTC) Received: from c-24-8-230-52.hsd1.co.comcast.net ([24.8.230.52] helo=damnhippie.dyndns.org) by mho-01-ewr.mailhop.org with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.72) (envelope-from ) id 1WoYzl-000NGw-R8; Sun, 25 May 2014 14:01:49 +0000 Received: from [172.22.42.240] (revolution.hippie.lan [172.22.42.240]) by damnhippie.dyndns.org (8.14.3/8.14.3) with ESMTP id s4PE1lDr049986; Sun, 25 May 2014 08:01:47 -0600 (MDT) (envelope-from ian@FreeBSD.org) X-Mail-Handler: Dyn Standard SMTP by Dyn X-Originating-IP: 24.8.230.52 X-Report-Abuse-To: abuse@dyndns.com (see http://www.dyndns.com/services/sendlabs/outbound_abuse.html for abuse reporting information) X-MHO-User: U2FsdGVkX1+Gvfw7GUQi7Or8TbVEE8rU Subject: Re: svn commit: r266565 - head/sys/arm/arm From: Ian Lepore To: John Baldwin In-Reply-To: <201405230912.47217.jhb@freebsd.org> References: <201405222338.s4MNcHYA066694@svn.freebsd.org> <201405230912.47217.jhb@freebsd.org> Content-Type: text/plain; charset="us-ascii" Date: Sun, 25 May 2014 08:01:47 -0600 Message-ID: <1401026507.1152.324.camel@revolution.hippie.lan> Mime-Version: 1.0 X-Mailer: Evolution 2.32.1 FreeBSD GNOME Team Port Content-Transfer-Encoding: 7bit Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18 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: Sun, 25 May 2014 14:01:52 -0000 On Fri, 2014-05-23 at 09:12 -0400, John Baldwin wrote: > On Thursday, May 22, 2014 7:38:17 pm Ian Lepore wrote: > > Author: ian > > Date: Thu May 22 23:38:17 2014 > > New Revision: 266565 > > URL: http://svnweb.freebsd.org/changeset/base/266565 > > > > Log: > > Map device memory using PTE_DEVICE attributes, and also ensure that the > > shared flag is set on normal-memory mappings made via pmap_kenter() for SMP. > > > > The "shared flag" part of this change isn't obvious from the diff, here's > > the deal... by using the array of preformatted page table entry templates > > instead of constructing the PTE from scratch, we automatically get the > > right attribute bits set for both caching and shared. > > > > MFC after: 1 week > > One tiny nit: > > > Modified: head/sys/arm/arm/pmap-v6.c > > ============================================================================== > > --- head/sys/arm/arm/pmap-v6.c Thu May 22 23:18:17 2014 (r266564) > > +++ head/sys/arm/arm/pmap-v6.c Thu May 22 23:38:17 2014 (r266565) > > @@ -2401,12 +2402,17 @@ pmap_kenter_internal(vm_offset_t va, vm_ > > ptep = &l2b->l2b_kva[l2pte_index(va)]; > > opte = *ptep; > > > > + if (flags & KENTER_CACHE) > > + *ptep = L2_S_PROTO | l2s_mem_types[PTE_CACHE] | pa | L2_S_REF; > > + else if (flags & KENTER_DEVICE) > > + *ptep = L2_S_PROTO |l2s_mem_types[PTE_DEVICE] | pa | L2_S_REF; > > + else > > + *ptep =L2_S_PROTO | l2s_mem_types[PTE_NOCACHE] | pa | L2_S_REF; > > + > > The whitespace around operators for the last two assignments is inconsistent. > Fixed, thanks. -- Ian