Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/aarch64/aarch64 Use __SHIFTIN. Same code before and...



details:   https://anonhg.NetBSD.org/src/rev/887082a06f3f
branches:  trunk
changeset: 1023567:887082a06f3f
user:      skrll <skrll%NetBSD.org@localhost>
date:      Wed Sep 15 07:49:54 2021 +0000

description:
Use __SHIFTIN. Same code before and after.

diffstat:

 sys/arch/aarch64/aarch64/pmap.c |  8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diffs (29 lines):

diff -r 02e9c927383e -r 887082a06f3f sys/arch/aarch64/aarch64/pmap.c
--- a/sys/arch/aarch64/aarch64/pmap.c   Tue Sep 14 22:14:11 2021 +0000
+++ b/sys/arch/aarch64/aarch64/pmap.c   Wed Sep 15 07:49:54 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: pmap.c,v 1.111 2021/09/12 08:23:57 skrll Exp $ */
+/*     $NetBSD: pmap.c,v 1.112 2021/09/15 07:49:54 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.111 2021/09/12 08:23:57 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.112 2021/09/15 07:49:54 skrll Exp $");
 
 #include "opt_arm_debug.h"
 #include "opt_ddb.h"
@@ -1449,7 +1449,9 @@
        if (pm->pm_asid == -1)
                pm->pm_asid = l->l_proc->p_pid;
 
-       ttbr0 = ((uint64_t)pm->pm_asid << 48) | pm->pm_l0table_pa;
+       ttbr0 =
+            __SHIFTIN(pm->pm_asid, TTBR_ASID) |
+            __SHIFTIN(pm->pm_l0table_pa, TTBR_BADDR);
        cpu_set_ttbr0(ttbr0);
 
        /* Re-enable translation table walks using TTBR0 */



Home | Main Index | Thread Index | Old Index