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 spinkle __printflike(), and use PRIxxx
details: https://anonhg.NetBSD.org/src/rev/06f5c88881a0
branches: trunk
changeset: 449759:06f5c88881a0
user: ryo <ryo%NetBSD.org@localhost>
date: Wed Mar 20 07:05:06 2019 +0000
description:
spinkle __printflike(), and use PRIxxx
diffstat:
sys/arch/aarch64/aarch64/pmap.c | 32 +++++++++++++++++---------------
1 files changed, 17 insertions(+), 15 deletions(-)
diffs (121 lines):
diff -r b5a6acb8ce0a -r 06f5c88881a0 sys/arch/aarch64/aarch64/pmap.c
--- a/sys/arch/aarch64/aarch64/pmap.c Wed Mar 20 05:09:26 2019 +0000
+++ b/sys/arch/aarch64/aarch64/pmap.c Wed Mar 20 07:05:06 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pmap.c,v 1.37 2019/03/19 16:45:28 ryo Exp $ */
+/* $NetBSD: pmap.c,v 1.38 2019/03/20 07:05:06 ryo 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.37 2019/03/19 16:45:28 ryo Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.38 2019/03/20 07:05:06 ryo Exp $");
#include "opt_arm_debug.h"
#include "opt_ddb.h"
@@ -952,7 +952,7 @@
}
static void
-pg_dump(struct vm_page *pg, void (*pr)(const char *, ...))
+pg_dump(struct vm_page *pg, void (*pr)(const char *, ...) __printflike(1, 2))
{
pr("pg=%p\n", pg);
pr(" pg->uanon = %p\n", pg->uanon);
@@ -966,7 +966,7 @@
}
static void
-pv_dump(struct vm_page_md *md, void (*pr)(const char *, ...))
+pv_dump(struct vm_page_md *md, void (*pr)(const char *, ...) __printflike(1, 2))
{
struct pv_entry *pv;
int i;
@@ -2334,7 +2334,7 @@
}
void
-pmap_db_pteinfo(vaddr_t va, void (*pr)(const char *, ...))
+pmap_db_pteinfo(vaddr_t va, void (*pr)(const char *, ...) __printflike(1, 2))
{
struct vm_page *pg;
bool user;
@@ -2359,9 +2359,10 @@
/*
* traverse L0 -> L1 -> L2 -> L3 table
*/
- pr("TTBR%d=%016llx, pa=%016lx, va=%016lx", user ? 0 : 1, ttbr, l0);
- pr(", input-va=%016llx,"
- " L0-index=%d, L1-index=%d, L2-index=%d, L3-index=%d\n",
+ pr("TTBR%d=%016"PRIx64", pa=%016"PRIxPADDR", va=%p",
+ user ? 0 : 1, ttbr, pa, l0);
+ pr(", input-va=%016"PRIxVADDR
+ ", L0-index=%ld, L1-index=%ld, L2-index=%ld, L3-index=%ld\n",
va,
(va & L0_ADDR_BITS) >> L0_SHIFT,
(va & L1_ADDR_BITS) >> L1_SHIFT,
@@ -2371,7 +2372,7 @@
idx = l0pde_index(va);
pde = l0[idx];
- pr("L0[%3d]=%016llx:", idx, pde);
+ pr("L0[%3d]=%016"PRIx64":", idx, pde);
pmap_db_pte_print(pde, 0, pr);
if (!l0pde_valid(pde))
@@ -2381,7 +2382,7 @@
idx = l1pde_index(va);
pde = l1[idx];
- pr(" L1[%3d]=%016llx:", idx, pde);
+ pr(" L1[%3d]=%016"PRIx64":", idx, pde);
pmap_db_pte_print(pde, 1, pr);
if (!l1pde_valid(pde) || l1pde_is_block(pde))
@@ -2391,7 +2392,7 @@
idx = l2pde_index(va);
pde = l2[idx];
- pr(" L2[%3d]=%016llx:", idx, pde);
+ pr(" L2[%3d]=%016"PRIx64":", idx, pde);
pmap_db_pte_print(pde, 2, pr);
if (!l2pde_valid(pde) || l2pde_is_block(pde))
@@ -2401,7 +2402,7 @@
idx = l3pte_index(va);
pte = l3[idx];
- pr(" L3[%3d]=%016llx:", idx, pte);
+ pr(" L3[%3d]=%016"PRIx64":", idx, pte);
pmap_db_pte_print(pte, 3, pr);
pa = l3pte_pa(pte);
@@ -2417,7 +2418,7 @@
static void
dump_ln_table(bool countmode, pd_entry_t *pdp, int level, int lnindex,
- vaddr_t va, void (*pr)(const char *, ...))
+ vaddr_t va, void (*pr)(const char *, ...) __printflike(1, 2))
{
struct vm_page *pg;
struct vm_page_md *md;
@@ -2490,13 +2491,14 @@
static void
pmap_db_dump_l0_table(bool countmode, pd_entry_t *pdp, vaddr_t va_base,
- void (*pr)(const char *, ...))
+ void (*pr)(const char *, ...) __printflike(1, 2))
{
dump_ln_table(countmode, pdp, 0, 0, va_base, pr);
}
void
-pmap_db_ttbrdump(bool countmode, vaddr_t va, void (*pr)(const char *, ...))
+pmap_db_ttbrdump(bool countmode, vaddr_t va,
+ void (*pr)(const char *, ...) __printflike(1, 2))
{
struct pmap *pm, _pm;
Home |
Main Index |
Thread Index |
Old Index