Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/aarch64 Remove some unnecessary tlb invalidate in p...



details:   https://anonhg.NetBSD.org/src/rev/720c950fc87f
branches:  trunk
changeset: 982854:720c950fc87f
user:      skrll <skrll%NetBSD.org@localhost>
date:      Thu Apr 29 09:27:29 2021 +0000

description:
Remove some unnecessary tlb invalidate in pmap_growkernel and ASAN shadow
map. Ensure the shadow map mappings are visible to the TLB walkers.

diffstat:

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

diffs (46 lines):

diff -r 291daeb470fa -r 720c950fc87f sys/arch/aarch64/aarch64/pmap.c
--- a/sys/arch/aarch64/aarch64/pmap.c   Thu Apr 29 08:47:26 2021 +0000
+++ b/sys/arch/aarch64/aarch64/pmap.c   Thu Apr 29 09:27:29 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: pmap.c,v 1.105 2021/04/21 09:52:20 ryo Exp $   */
+/*     $NetBSD: pmap.c,v 1.106 2021/04/29 09:27:29 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.105 2021/04/21 09:52:20 ryo Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.106 2021/04/29 09:27:29 skrll Exp $");
 
 #include "opt_arm_debug.h"
 #include "opt_ddb.h"
@@ -756,7 +756,6 @@
                            __func__, error);
                }
        }
-       aarch64_tlbi_by_asid(pm->pm_asid);
        kasan_shadow_map((void *)pmap_maxkvaddr,
            (size_t)(va - pmap_maxkvaddr));
        pmap_maxkvaddr = va;
diff -r 291daeb470fa -r 720c950fc87f sys/arch/aarch64/include/asan.h
--- a/sys/arch/aarch64/include/asan.h   Thu Apr 29 08:47:26 2021 +0000
+++ b/sys/arch/aarch64/include/asan.h   Thu Apr 29 09:27:29 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: asan.h,v 1.17 2021/03/21 07:32:44 skrll Exp $  */
+/*     $NetBSD: asan.h,v 1.18 2021/04/29 09:27:29 skrll Exp $  */
 
 /*
  * Copyright (c) 2018-2020 Maxime Villard, m00nbsd.net
@@ -189,8 +189,9 @@
                atomic_swap_64(&l3[idx], pa | L3_PAGE | LX_BLKPAG_UXN |
                    LX_BLKPAG_PXN | LX_BLKPAG_AF | LX_BLKPAG_SH_IS |
                    LX_BLKPAG_AP_RW | LX_BLKPAG_ATTR_NORMAL_WB);
-               aarch64_tlbi_by_va(va);
        }
+       dsb(ishst);
+       isb();
 }
 
 static void



Home | Main Index | Thread Index | Old Index