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 macro



details:   https://anonhg.NetBSD.org/src/rev/b828fd29f6fe
branches:  trunk
changeset: 1007789:b828fd29f6fe
user:      ryo <ryo%NetBSD.org@localhost>
date:      Sat Feb 29 21:30:19 2020 +0000

description:
use macro

diffstat:

 sys/arch/aarch64/aarch64/db_machdep.c |  7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diffs (28 lines):

diff -r df157ec2ed54 -r b828fd29f6fe sys/arch/aarch64/aarch64/db_machdep.c
--- a/sys/arch/aarch64/aarch64/db_machdep.c     Sat Feb 29 21:29:23 2020 +0000
+++ b/sys/arch/aarch64/aarch64/db_machdep.c     Sat Feb 29 21:30:19 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: db_machdep.c,v 1.19 2019/09/07 09:27:25 ryo Exp $ */
+/* $NetBSD: db_machdep.c,v 1.20 2020/02/29 21:30:19 ryo Exp $ */
 
 /*-
  * Copyright (c) 2014 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: db_machdep.c,v 1.19 2019/09/07 09:27:25 ryo Exp $");
+__KERNEL_RCSID(0, "$NetBSD: db_machdep.c,v 1.20 2020/02/29 21:30:19 ryo Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_compat_netbsd32.h"
@@ -375,7 +375,8 @@
 static void
 db_par_print(uint64_t par, vaddr_t va)
 {
-       paddr_t pa = (__SHIFTOUT(par, PAR_PA) << 12) + (va & 0xfff);
+       paddr_t pa = (__SHIFTOUT(par, PAR_PA) << PAR_PA_SHIFT) +
+           (va & __BITS(PAR_PA_SHIFT - 1, 0));
 
        db_printf("%016"PRIx64": ATTR=0x%02lx, NS=%ld, S=%ld, SHA=%ld, PTW=%ld"
            ", FST=%ld, F=%ld, PA=%016"PRIxPADDR"\n",



Home | Main Index | Thread Index | Old Index