Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 23 May 2014 09:12:46 -0400
From:      John Baldwin <jhb@freebsd.org>
To:        Ian Lepore <ian@freebsd.org>
Cc:        svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org
Subject:   Re: svn commit: r266565 - head/sys/arm/arm
Message-ID:  <201405230912.47217.jhb@freebsd.org>
In-Reply-To: <201405222338.s4MNcHYA066694@svn.freebsd.org>
References:  <201405222338.s4MNcHYA066694@svn.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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.

-- 
John Baldwin



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201405230912.47217.jhb>