Module Name:    src
Committed By:   skrll
Date:           Wed Sep 15 07:49:54 UTC 2021

Modified Files:
        src/sys/arch/aarch64/aarch64: pmap.c

Log Message:
Use __SHIFTIN. Same code before and after.


To generate a diff of this commit:
cvs rdiff -u -r1.111 -r1.112 src/sys/arch/aarch64/aarch64/pmap.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/aarch64/aarch64/pmap.c
diff -u src/sys/arch/aarch64/aarch64/pmap.c:1.111 src/sys/arch/aarch64/aarch64/pmap.c:1.112
--- src/sys/arch/aarch64/aarch64/pmap.c:1.111	Sun Sep 12 08:23:57 2021
+++ src/sys/arch/aarch64/aarch64/pmap.c	Wed Sep 15 07:49:54 2021
@@ -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 <r...@nerv.org>
@@ -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 @@ pmap_activate(struct lwp *l)
 	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 */

Reply via email to