Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/aarch64 Use PMAP_DEV in DEVMAP_ENTRY rather than pm...



details:   https://anonhg.NetBSD.org/src/rev/fe72bf3651de
branches:  trunk
changeset: 463202:fe72bf3651de
user:      skrll <skrll%NetBSD.org@localhost>
date:      Mon Aug 12 10:28:04 2019 +0000

description:
Use PMAP_DEV in DEVMAP_ENTRY rather than pmap_map_chunk.  It's clearer and
means pmap_map_chunk can be made to map other memory types.

diffstat:

 sys/arch/aarch64/aarch64/pmap.c |  6 +++---
 sys/arch/aarch64/include/pmap.h |  4 ++--
 2 files changed, 5 insertions(+), 5 deletions(-)

diffs (45 lines):

diff -r 963a419f4295 -r fe72bf3651de sys/arch/aarch64/aarch64/pmap.c
--- a/sys/arch/aarch64/aarch64/pmap.c   Mon Aug 12 09:34:53 2019 +0000
+++ b/sys/arch/aarch64/aarch64/pmap.c   Mon Aug 12 10:28:04 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: pmap.c,v 1.41 2019/05/17 06:05:07 mrg Exp $    */
+/*     $NetBSD: pmap.c,v 1.42 2019/08/12 10:28:04 skrll Exp $  */
 
 /*
  * Copyright (c) 2017 Ryo Shimizu <ryo%nerv.org@localhost>
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.41 2019/05/17 06:05:07 mrg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.42 2019/08/12 10:28:04 skrll Exp $");
 
 #include "opt_arm_debug.h"
 #include "opt_ddb.h"
@@ -283,7 +283,7 @@
        blocksize = L2_SIZE;
 
        attr = _pmap_pte_adjust_prot(L2_BLOCK, prot, VM_PROT_ALL, false);
-       attr = _pmap_pte_adjust_cacheflags(attr, flags | PMAP_DEV);
+       attr = _pmap_pte_adjust_cacheflags(attr, flags);
        /* user cannot execute, and kernel follows the prot */
        attr |= (LX_BLKPAG_UXN|LX_BLKPAG_PXN);
        if (prot & VM_PROT_EXECUTE)
diff -r 963a419f4295 -r fe72bf3651de sys/arch/aarch64/include/pmap.h
--- a/sys/arch/aarch64/include/pmap.h   Mon Aug 12 09:34:53 2019 +0000
+++ b/sys/arch/aarch64/include/pmap.h   Mon Aug 12 10:28:04 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pmap.h,v 1.24 2019/04/08 21:18:22 ryo Exp $ */
+/* $NetBSD: pmap.h,v 1.25 2019/08/12 10:28:04 skrll Exp $ */
 
 /*-
  * Copyright (c) 2014 The NetBSD Foundation, Inc.
@@ -207,7 +207,7 @@
                .pd_pa = DEVMAP_TRUNC_ADDR(pa),         \
                .pd_size = DEVMAP_ROUND_SIZE(sz),       \
                .pd_prot = VM_PROT_READ|VM_PROT_WRITE,  \
-               .pd_flags = PMAP_NOCACHE                \
+               .pd_flags = PMAP_DEV                    \
        }
 #define        DEVMAP_ENTRY_END        { 0 }
 



Home | Main Index | Thread Index | Old Index