summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorskrll <skrll@NetBSD.org>2019-09-23 16:17:54 +0000
committerskrll <skrll@NetBSD.org>2019-09-23 16:17:54 +0000
commit8a06b90dbe165294efa06ce9eea50d949dfcb2ed (patch)
tree01d5ef1d1f9c7b77e55a341fb4d2ad984ae69dd0
parent33ee31d962ee13c00f9c0b86245ab5a32a5981f8 (diff)
Provide PRIxBUSADDR, PRIxBUSSIZE, PRIuBUSSIZE, and PRIxBSH for all arches
to follow arm and (generic) mips. Reviewed by christos.
-rw-r--r--sys/arch/alpha/include/bus_defs.h4
-rw-r--r--sys/arch/alpha/include/bus_user.h6
-rw-r--r--sys/arch/amiga/include/bus.h8
-rw-r--r--sys/arch/amigappc/include/bus_defs.h7
-rw-r--r--sys/arch/arc/include/bus_defs.h8
-rw-r--r--sys/arch/atari/include/bus_defs.h8
-rw-r--r--sys/arch/cesfic/include/bus.h8
-rw-r--r--sys/arch/dreamcast/include/bus_defs.h7
-rw-r--r--sys/arch/emips/include/bus.h7
-rw-r--r--sys/arch/evbcf/include/bus_space.h7
-rw-r--r--sys/arch/evbsh3/include/bus_defs.h8
-rw-r--r--sys/arch/ews4800mips/include/bus.h7
-rw-r--r--sys/arch/hp300/include/bus.h8
-rw-r--r--sys/arch/hpcmips/include/bus_types.h9
-rw-r--r--sys/arch/hpcsh/include/bus_defs.h7
-rw-r--r--sys/arch/hppa/include/bus_defs.h9
-rw-r--r--sys/arch/ia64/include/bus.h8
-rw-r--r--sys/arch/landisk/include/bus_defs.h8
-rw-r--r--sys/arch/luna68k/include/bus.h8
-rw-r--r--sys/arch/mac68k/include/bus.h7
-rw-r--r--sys/arch/mipsco/include/bus.h9
-rw-r--r--sys/arch/mvme68k/include/bus_space.h8
-rw-r--r--sys/arch/news68k/include/bus.h8
-rw-r--r--sys/arch/newsmips/include/bus.h8
-rw-r--r--sys/arch/next68k/include/bus_space.h8
-rw-r--r--sys/arch/or1k/include/bus_defs.h9
-rw-r--r--sys/arch/playstation2/include/bus.h7
-rw-r--r--sys/arch/powerpc/include/bus_defs.h9
-rw-r--r--sys/arch/riscv/include/bus.h10
-rw-r--r--sys/arch/sh3/include/bus_defs.h8
-rw-r--r--sys/arch/sparc/include/bus_defs.h9
-rw-r--r--sys/arch/sparc64/include/bus_defs.h6
-rw-r--r--sys/arch/sun68k/include/bus.h7
-rw-r--r--sys/arch/usermode/include/bus.h7
-rw-r--r--sys/arch/vax/include/bus.h7
-rw-r--r--sys/arch/x68k/include/bus.h7
-rw-r--r--sys/arch/x86/include/bus_defs.h8
37 files changed, 246 insertions, 38 deletions
diff --git a/sys/arch/alpha/include/bus_defs.h b/sys/arch/alpha/include/bus_defs.h
index 9c222cfff56..25339580f63 100644
--- a/sys/arch/alpha/include/bus_defs.h
+++ b/sys/arch/alpha/include/bus_defs.h
@@ -1,4 +1,4 @@
-/* $NetBSD: bus_defs.h,v 1.4 2017/06/22 16:46:52 flxd Exp $ */
+/* $NetBSD: bus_defs.h,v 1.5 2019/09/23 16:17:54 skrll Exp $ */
/*-
* Copyright (c) 1997, 1998, 2000, 2001 The NetBSD Foundation, Inc.
@@ -113,6 +113,8 @@ struct alpha_bus_space_translation;
typedef struct alpha_bus_space *bus_space_tag_t;
typedef u_long bus_space_handle_t;
+#define PRIxBSH "lx"
+
struct alpha_bus_space {
/* cookie */
void *abs_cookie;
diff --git a/sys/arch/alpha/include/bus_user.h b/sys/arch/alpha/include/bus_user.h
index a6016ee70a8..362f6c41580 100644
--- a/sys/arch/alpha/include/bus_user.h
+++ b/sys/arch/alpha/include/bus_user.h
@@ -1,4 +1,4 @@
-/* $NetBSD: bus_user.h,v 1.2 2016/01/24 16:47:50 christos Exp $ */
+/* $NetBSD: bus_user.h,v 1.3 2019/09/23 16:17:54 skrll Exp $ */
/*
* XXX This file is a stopgap intended to keep NetBSD/alpha buildable
* XXX while developers figure out whether/how to expose to userland
@@ -18,6 +18,10 @@
typedef u_long bus_addr_t;
typedef u_long bus_size_t;
+#define PRIxBUSADDR "lx"
+#define PRIxBUSSIZE "lx"
+#define PRIuBUSSIZE "lu"
+
/*
* Translation of an Alpha bus address; INTERNAL USE ONLY.
*/
diff --git a/sys/arch/amiga/include/bus.h b/sys/arch/amiga/include/bus.h
index 4cbc44b5644..c11564122ae 100644
--- a/sys/arch/amiga/include/bus.h
+++ b/sys/arch/amiga/include/bus.h
@@ -1,4 +1,4 @@
-/* $NetBSD: bus.h,v 1.29 2014/01/03 00:33:06 rkujawa Exp $ */
+/* $NetBSD: bus.h,v 1.30 2019/09/23 16:17:54 skrll Exp $ */
/*
* Copyright (c) 1996 Leo Weppelman. All rights reserved.
@@ -38,12 +38,18 @@
typedef u_int32_t bus_addr_t;
typedef u_int32_t bus_size_t;
+#define PRIxBUSADDR "x"
+#define PRIxBUSSIZE "x"
+#define PRIuBUSSIZE "u"
+
/*
* Access methods for bus resources and address space.
*/
typedef struct bus_space_tag *bus_space_tag_t;
typedef u_long bus_space_handle_t;
+#define PRIxBSH "lx"
+
/* unpublic, but needed by method implementors */
/*
diff --git a/sys/arch/amigappc/include/bus_defs.h b/sys/arch/amigappc/include/bus_defs.h
index 9ffc7facbe7..b52de772bf6 100644
--- a/sys/arch/amigappc/include/bus_defs.h
+++ b/sys/arch/amigappc/include/bus_defs.h
@@ -1,4 +1,4 @@
-/* $NetBSD: bus_defs.h,v 1.6 2014/01/22 00:24:53 christos Exp $ */
+/* $NetBSD: bus_defs.h,v 1.7 2019/09/23 16:17:54 skrll Exp $ */
/*
* Copyright (c) 1996 Leo Weppelman. All rights reserved.
@@ -34,12 +34,17 @@
typedef uint32_t bus_addr_t;
typedef uint32_t bus_size_t;
+#define PRIxBUSADDR "x"
+#define PRIxBUSSIZE "x"
+#define PRIuBUSSIZE "u"
/*
* Access methods for bus resources and address space.
*/
typedef struct bus_space_tag *bus_space_tag_t;
typedef u_long bus_space_handle_t;
+#define PRIxBSH "lx"
+
struct amigappc_bus_dma_segment;
struct amigappc_bus_dma_tag;
struct amigappc_bus_dmamap;
diff --git a/sys/arch/arc/include/bus_defs.h b/sys/arch/arc/include/bus_defs.h
index adbdaed9c29..cdd6e447a59 100644
--- a/sys/arch/arc/include/bus_defs.h
+++ b/sys/arch/arc/include/bus_defs.h
@@ -1,4 +1,4 @@
-/* $NetBSD: bus_defs.h,v 1.1 2011/07/01 17:09:58 dyoung Exp $ */
+/* $NetBSD: bus_defs.h,v 1.2 2019/09/23 16:17:54 skrll Exp $ */
/* NetBSD: bus.h,v 1.27 2000/03/15 16:44:50 drochner Exp */
/* $OpenBSD: bus.h,v 1.15 1999/08/11 23:15:21 niklas Exp $ */
@@ -73,6 +73,10 @@
typedef u_long bus_addr_t;
typedef u_long bus_size_t;
+#define PRIxBUSADDR "lx"
+#define PRIxBUSSIZE "lx"
+#define PRIuBUSSIZE "lu"
+
#include <mips/locore.h>
#ifdef BUS_SPACE_DEBUG
@@ -108,6 +112,8 @@ typedef u_long bus_size_t;
typedef uint32_t bus_space_handle_t;
typedef struct arc_bus_space *bus_space_tag_t;
+#define PRIxBSH "lx"
+
struct arc_bus_space {
const char *bs_name;
struct extent *bs_extent;
diff --git a/sys/arch/atari/include/bus_defs.h b/sys/arch/atari/include/bus_defs.h
index a4fef79ebc9..3240699bc40 100644
--- a/sys/arch/atari/include/bus_defs.h
+++ b/sys/arch/atari/include/bus_defs.h
@@ -1,4 +1,4 @@
-/* $NetBSD: bus_defs.h,v 1.1 2011/07/01 17:09:58 dyoung Exp $ */
+/* $NetBSD: bus_defs.h,v 1.2 2019/09/23 16:17:55 skrll Exp $ */
/*-
* Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -66,6 +66,10 @@
typedef u_long bus_addr_t;
typedef u_long bus_size_t;
+#define PRIxBUSADDR "lx"
+#define PRIxBUSSIZE "lx"
+#define PRIuBUSSIZE "lu"
+
/*
* I/O addresses (in bus space)
*/
@@ -80,6 +84,8 @@ typedef u_long bus_io_size_t;
typedef struct atari_bus_space *bus_space_tag_t;
typedef u_long bus_space_handle_t;
+#define PRIxBSH "lx"
+
#define BUS_SPACE_MAP_CACHEABLE 0x01
#define BUS_SPACE_MAP_LINEAR 0x02
#define BUS_SPACE_MAP_PREFETCHABLE 0x04
diff --git a/sys/arch/cesfic/include/bus.h b/sys/arch/cesfic/include/bus.h
index 57a4a11abe4..7bfb70f04b7 100644
--- a/sys/arch/cesfic/include/bus.h
+++ b/sys/arch/cesfic/include/bus.h
@@ -1,4 +1,4 @@
-/* $NetBSD: bus.h,v 1.2 2012/05/07 18:16:38 tsutsui Exp $ */
+/* $NetBSD: bus.h,v 1.3 2019/09/23 16:17:55 skrll Exp $ */
/*
* XXX: A dummy <machine/bus.h> for MI <sys/bus.h>.
@@ -10,9 +10,15 @@
typedef paddr_t bus_addr_t;
typedef psize_t bus_size_t;
+#define PRIxBUSADDR PRIxPADDR
+#define PRIxBUSSIZE PRIxPSIZE
+#define PRIuBUSSIZE PRIuPSIZE
+
typedef int bus_space_tag_t;
typedef int bus_space_handle_t;
+#define PRIxBSH "x"
+
/*
* There is no bus_dma(9)'fied bus drivers on this port.
*/
diff --git a/sys/arch/dreamcast/include/bus_defs.h b/sys/arch/dreamcast/include/bus_defs.h
index 65d6129151e..f2182a21219 100644
--- a/sys/arch/dreamcast/include/bus_defs.h
+++ b/sys/arch/dreamcast/include/bus_defs.h
@@ -1,4 +1,4 @@
-/* $NetBSD: bus_defs.h,v 1.1 2011/07/19 15:52:30 dyoung Exp $ */
+/* $NetBSD: bus_defs.h,v 1.2 2019/09/23 16:17:55 skrll Exp $ */
/*-
* Copyright (c) 1997, 1998, 2000, 2001 The NetBSD Foundation, Inc.
@@ -102,12 +102,17 @@
typedef u_long bus_addr_t;
typedef u_long bus_size_t;
+#define PRIxBUSADDR "lx"
+#define PRIxBUSSIZE "lx"
+#define PRIuBUSSIZE "lu"
/*
* Access methods for bus space.
*/
typedef struct dreamcast_bus_space *bus_space_tag_t;
typedef u_long bus_space_handle_t;
+#define PRIxBSH "lx"
+
struct dreamcast_bus_space {
/* cookie */
void *dbs_cookie;
diff --git a/sys/arch/emips/include/bus.h b/sys/arch/emips/include/bus.h
index b782cb6caba..a3a99491626 100644
--- a/sys/arch/emips/include/bus.h
+++ b/sys/arch/emips/include/bus.h
@@ -1,4 +1,4 @@
-/* $NetBSD: bus.h,v 1.2 2012/02/12 16:34:08 matt Exp $ */
+/* $NetBSD: bus.h,v 1.3 2019/09/23 16:17:55 skrll Exp $ */
/*-
* Copyright (c) 1996, 1997, 1998, 2001 The NetBSD Foundation, Inc.
@@ -47,12 +47,17 @@
typedef u_long bus_addr_t;
typedef u_long bus_size_t;
+#define PRIxBUSADDR "lx"
+#define PRIxBUSSIZE "lx"
+#define PRIuBUSSIZE "lu"
/*
* Access methods for bus resources and address space.
*/
typedef int bus_space_tag_t;
typedef u_long bus_space_handle_t;
+#define PRIxBSH "lx"
+
/*
* int bus_space_map(bus_space_tag_t t, bus_addr_t addr,
* bus_size_t size, int flags, bus_space_handle_t *bshp);
diff --git a/sys/arch/evbcf/include/bus_space.h b/sys/arch/evbcf/include/bus_space.h
index ace68108d74..08550b2ef18 100644
--- a/sys/arch/evbcf/include/bus_space.h
+++ b/sys/arch/evbcf/include/bus_space.h
@@ -1,4 +1,4 @@
-/* $NetBSD: bus_space.h,v 1.2 2014/03/18 18:20:41 riastradh Exp $ */
+/* $NetBSD: bus_space.h,v 1.3 2019/09/23 16:17:55 skrll Exp $ */
/*-
* Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc.
@@ -71,6 +71,9 @@
typedef u_long bus_addr_t;
typedef u_long bus_size_t;
+#define PRIxBUSADDR "lx"
+#define PRIxBUSSIZE "lx"
+#define PRIuBUSSIZE "lu"
/*
* Access methods for bus resources and address space.
*/
@@ -78,6 +81,8 @@ struct mvme68k_bus_space_tag;
typedef struct mvme68k_bus_space_tag *bus_space_tag_t;
typedef u_long bus_space_handle_t;
+#define PRIxBSH "lx"
+
struct mvme68k_bus_space_tag {
void *bs_cookie;
int (*bs_map)(void *, bus_addr_t, bus_size_t,
diff --git a/sys/arch/evbsh3/include/bus_defs.h b/sys/arch/evbsh3/include/bus_defs.h
index cb7cd3b2019..a287aa43144 100644
--- a/sys/arch/evbsh3/include/bus_defs.h
+++ b/sys/arch/evbsh3/include/bus_defs.h
@@ -1,4 +1,4 @@
-/* $NetBSD: bus_defs.h,v 1.1 2011/07/19 15:44:53 dyoung Exp $ */
+/* $NetBSD: bus_defs.h,v 1.2 2019/09/23 16:17:55 skrll Exp $ */
/*-
* Copyright (c) 1996, 1997 The NetBSD Foundation, Inc.
@@ -103,9 +103,15 @@
typedef u_long bus_addr_t;
typedef u_long bus_size_t;
+#define PRIxBUSADDR "lx"
+#define PRIxBUSSIZE "lx"
+#define PRIuBUSSIZE "lu"
+
typedef struct _bus_space *bus_space_tag_t;
typedef u_long bus_space_handle_t;
+#define PRIxBSH "lx"
+
struct _bus_space {
/* cookie */
void *bs_cookie;
diff --git a/sys/arch/ews4800mips/include/bus.h b/sys/arch/ews4800mips/include/bus.h
index 59231a8897a..e1e567db1cd 100644
--- a/sys/arch/ews4800mips/include/bus.h
+++ b/sys/arch/ews4800mips/include/bus.h
@@ -1,4 +1,4 @@
-/* $NetBSD: bus.h,v 1.7 2015/06/23 21:00:23 matt Exp $ */
+/* $NetBSD: bus.h,v 1.8 2019/09/23 16:17:55 skrll Exp $ */
/*-
* Copyright (c) 1997, 1998, 2000, 2001, 2005 The NetBSD Foundation, Inc.
@@ -104,12 +104,17 @@
typedef long bus_addr_t;
typedef long bus_size_t;
+#define PRIxBUSADDR "lx"
+#define PRIxBUSSIZE "lx"
+#define PRIuBUSSIZE "lu"
/*
* Access methods for bus space.
*/
typedef struct ews4800mips_bus_space *bus_space_tag_t;
typedef bus_addr_t bus_space_handle_t;
+#define PRIxBSH PRIxBUSADDR
+
struct extent; /* forward declaration */
struct ews4800mips_bus_space {
diff --git a/sys/arch/hp300/include/bus.h b/sys/arch/hp300/include/bus.h
index a0b53d13a32..0eb4b6a1cf7 100644
--- a/sys/arch/hp300/include/bus.h
+++ b/sys/arch/hp300/include/bus.h
@@ -1,4 +1,4 @@
-/* $NetBSD: bus.h,v 1.18 2012/05/07 18:16:38 tsutsui Exp $ */
+/* $NetBSD: bus.h,v 1.19 2019/09/23 16:17:55 skrll Exp $ */
/*-
* Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc.
@@ -72,12 +72,18 @@
typedef u_long bus_addr_t;
typedef u_long bus_size_t;
+#define PRIxBUSADDR "lx"
+#define PRIxBUSSIZE "lx"
+#define PRIuBUSSIZE "lu"
+
/*
* Access methods for bus resources and address space.
*/
typedef struct bus_space_tag *bus_space_tag_t;
typedef u_long bus_space_handle_t;
+#define PRIxBSH "lx"
+
/*
* Implementation specific structures.
* XXX Don't use outside of bus_space definitions!
diff --git a/sys/arch/hpcmips/include/bus_types.h b/sys/arch/hpcmips/include/bus_types.h
index e7a3557e4c6..9987de37adb 100644
--- a/sys/arch/hpcmips/include/bus_types.h
+++ b/sys/arch/hpcmips/include/bus_types.h
@@ -1,4 +1,4 @@
-/* $NetBSD: bus_types.h,v 1.2 2011/02/26 12:04:25 tsutsui Exp $ */
+/* $NetBSD: bus_types.h,v 1.3 2019/09/23 16:17:55 skrll Exp $ */
/*-
* Copyright (c) 2001 TAKEMRUA Shin. All rights reserved.
@@ -36,6 +36,13 @@
typedef u_long bus_addr_t;
typedef u_long bus_size_t;
+
+#define PRIxBUSADDR "lx"
+#define PRIxBUSSIZE "lx"
+#define PRIuBUSSIZE "lu"
+
typedef u_long bus_space_handle_t;
+#define PRIxBSH "lx"
+
#endif /* _HPCMIPS_BUS_TYPES_H_ */
diff --git a/sys/arch/hpcsh/include/bus_defs.h b/sys/arch/hpcsh/include/bus_defs.h
index d2ebe5987aa..bdcde645fcf 100644
--- a/sys/arch/hpcsh/include/bus_defs.h
+++ b/sys/arch/hpcsh/include/bus_defs.h
@@ -1,4 +1,4 @@
-/* $NetBSD: bus_defs.h,v 1.1 2011/07/19 15:31:44 dyoung Exp $ */
+/* $NetBSD: bus_defs.h,v 1.2 2019/09/23 16:17:56 skrll Exp $ */
/*-
* Copyright (c) 1997, 1998, 2000, 2001, 2002 The NetBSD Foundation, Inc.
@@ -102,12 +102,17 @@
typedef u_long bus_addr_t;
typedef u_long bus_size_t;
+#define PRIxBUSADDR "lx"
+#define PRIxBUSSIZE "lx"
+#define PRIuBUSSIZE "lu"
/*
* Access methods for bus space.
*/
typedef struct hpcsh_bus_space *bus_space_tag_t;
typedef u_long bus_space_handle_t;
+#define PRIxBSH "lx"
+
struct extent; /* forward declaration */
struct hpcsh_bus_space {
diff --git a/sys/arch/hppa/include/bus_defs.h b/sys/arch/hppa/include/bus_defs.h
index 5dc92182735..cbde5f2be1e 100644
--- a/sys/arch/hppa/include/bus_defs.h
+++ b/sys/arch/hppa/include/bus_defs.h
@@ -1,4 +1,4 @@
-/* $NetBSD: bus_defs.h,v 1.1 2014/02/24 07:23:43 skrll Exp $ */
+/* $NetBSD: bus_defs.h,v 1.2 2019/09/23 16:17:56 skrll Exp $ */
/* $OpenBSD: bus.h,v 1.13 2001/07/30 14:15:59 art Exp $ */
@@ -39,8 +39,15 @@
*/
typedef u_long bus_addr_t;
typedef u_long bus_size_t;
+
+#define PRIxBUSADDR "lx"
+#define PRIxBUSSIZE "lx"
+#define PRIuBUSSIZE "lu"
+
typedef u_long bus_space_handle_t;
+#define PRIxBSH "lx"
+
struct hppa_bus_space_tag {
void *hbt_cookie;
diff --git a/sys/arch/ia64/include/bus.h b/sys/arch/ia64/include/bus.h
index 964b4a0760c..44e763f8d81 100644
--- a/sys/arch/ia64/include/bus.h
+++ b/sys/arch/ia64/include/bus.h
@@ -1,4 +1,4 @@
-/* $NetBSD: bus.h,v 1.2 2016/09/15 21:45:37 jdolecek Exp $ */
+/* $NetBSD: bus.h,v 1.3 2019/09/23 16:17:56 skrll Exp $ */
/*-
* Copyright (c) 1996, 1997, 1998, 2001 The NetBSD Foundation, Inc.
@@ -124,12 +124,18 @@
typedef u_long bus_addr_t;
typedef u_long bus_size_t;
+#define PRIxBUSADDR "lx"
+#define PRIxBUSSIZE "lx"
+#define PRIuBUSSIZE "lu"
+
/*
* Access methods for bus resources and address space.
*/
typedef int bus_space_tag_t;
typedef u_long bus_space_handle_t;
+#define PRIxBSH "lx"
+
/* map/unmap */
int ia64_bus_space_map(bus_space_tag_t, bus_addr_t,
diff --git a/sys/arch/landisk/include/bus_defs.h b/sys/arch/landisk/include/bus_defs.h
index 45724be810d..a786874d2f2 100644
--- a/sys/arch/landisk/include/bus_defs.h
+++ b/sys/arch/landisk/include/bus_defs.h
@@ -1,4 +1,4 @@
-/* $NetBSD: bus_defs.h,v 1.1 2011/07/01 17:10:00 dyoung Exp $ */
+/* $NetBSD: bus_defs.h,v 1.2 2019/09/23 16:17:56 skrll Exp $ */
/*-
* Copyright (c) 1996, 1997 The NetBSD Foundation, Inc.
@@ -70,9 +70,15 @@
typedef u_long bus_addr_t;
typedef u_long bus_size_t;
+#define PRIxBUSADDR "lx"
+#define PRIxBUSSIZE "lx"
+#define PRIuBUSSIZE "lu"
+
typedef struct _bus_space *bus_space_tag_t;
typedef u_long bus_space_handle_t;
+#define PRIxBSH "lx"
+
/*
* Turn on BUS_SPACE_DEBUG if the global DEBUG option is enabled.
*/
diff --git a/sys/arch/luna68k/include/bus.h b/sys/arch/luna68k/include/bus.h
index 56c98726f38..c15eb769b42 100644
--- a/sys/arch/luna68k/include/bus.h
+++ b/sys/arch/luna68k/include/bus.h
@@ -1,4 +1,4 @@
-/* $NetBSD: bus.h,v 1.13 2012/05/07 18:16:38 tsutsui Exp $ */
+/* $NetBSD: bus.h,v 1.14 2019/09/23 16:17:56 skrll Exp $ */
/*-
* Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc.
@@ -70,12 +70,18 @@
typedef u_long bus_addr_t;
typedef u_long bus_size_t;
+#define PRIxBUSADDR "lx"
+#define PRIxBUSSIZE "lx"
+#define PRIuBUSSIZE "lu"
+
/*
* Access methods for bus resources and address space.
*/
typedef int bus_space_tag_t;
typedef u_long bus_space_handle_t;
+#define PRIxBSH "lx"
+
/*
* int bus_space_map(bus_space_tag_t t, bus_addr_t addr,
* bus_size_t size, int flags, bus_space_handle_t *bshp);
diff --git a/sys/arch/mac68k/include/bus.h b/sys/arch/mac68k/include/bus.h
index 588931f6d89..8eefae94230 100644
--- a/sys/arch/mac68k/include/bus.h
+++ b/sys/arch/mac68k/include/bus.h
@@ -1,4 +1,4 @@
-/* $NetBSD: bus.h,v 1.27 2019/07/23 07:52:53 rin Exp $ */
+/* $NetBSD: bus.h,v 1.28 2019/09/23 16:17:56 skrll Exp $ */
/*-
* Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc.
@@ -72,6 +72,9 @@
typedef u_long bus_addr_t;
typedef u_long bus_size_t;
+#define PRIxBUSADDR "lx"
+#define PRIxBUSSIZE "lx"
+#define PRIuBUSSIZE "lu"
/*
* Access methods for bus resources and address space.
*/
@@ -81,7 +84,7 @@ typedef struct bus_space_handle_s {
u_long base;
int swapped;
int stride;
-
+
u_int8_t (*bsr1)(bus_space_tag_t, BSH_T *, bus_size_t);
u_int16_t (*bsr2)(bus_space_tag_t, BSH_T *, bus_size_t);
u_int32_t (*bsr4)(bus_space_tag_t, BSH_T *, bus_size_t);
diff --git a/sys/arch/mipsco/include/bus.h b/sys/arch/mipsco/include/bus.h
index c960ef7c37d..b75246cdda4 100644
--- a/sys/arch/mipsco/include/bus.h
+++ b/sys/arch/mipsco/include/bus.h
@@ -1,4 +1,4 @@
-/* $NetBSD: bus.h,v 1.21 2012/02/12 16:34:09 matt Exp $ */
+/* $NetBSD: bus.h,v 1.22 2019/09/23 16:17:56 skrll Exp $ */
/*-
* Copyright (c) 1996, 1997, 1998, 2001 The NetBSD Foundation, Inc.
@@ -109,10 +109,17 @@
typedef u_long bus_addr_t;
typedef u_long bus_size_t;
+#define PRIxBUSADDR "lx"
+#define PRIxBUSSIZE "lx"
+#define PRIuBUSSIZE "lu"
+
/*
* Access methods for bus resources and address space.
*/
typedef u_int32_t bus_space_handle_t;
+
+#define PRIxBSH "lx"
+
typedef struct mipsco_bus_space *bus_space_tag_t;
struct mipsco_bus_space {
diff --git a/sys/arch/mvme68k/include/bus_space.h b/sys/arch/mvme68k/include/bus_space.h
index 1c2b471c324..4ba6003d151 100644
--- a/sys/arch/mvme68k/include/bus_space.h
+++ b/sys/arch/mvme68k/include/bus_space.h
@@ -1,4 +1,4 @@
-/* $NetBSD: bus_space.h,v 1.14 2012/02/12 16:34:09 matt Exp $ */
+/* $NetBSD: bus_space.h,v 1.15 2019/09/23 16:17:56 skrll Exp $ */
/*-
* Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc.
@@ -73,6 +73,10 @@
typedef u_long bus_addr_t;
typedef u_long bus_size_t;
+#define PRIxBUSADDR "lx"
+#define PRIxBUSSIZE "lx"
+#define PRIuBUSSIZE "lu"
+
/*
* Access methods for bus resources and address space.
*/
@@ -80,6 +84,8 @@ struct mvme68k_bus_space_tag;
typedef struct mvme68k_bus_space_tag *bus_space_tag_t;
typedef u_long bus_space_handle_t;
+#define PRIxBSH "lx"
+
struct mvme68k_bus_space_tag {
void *bs_cookie;
int (*bs_map)(void *, bus_addr_t, bus_size_t,
diff --git a/sys/arch/news68k/include/bus.h b/sys/arch/news68k/include/bus.h
index 73a196ab1e3..e888ddcc989 100644
--- a/sys/arch/news68k/include/bus.h
+++ b/sys/arch/news68k/include/bus.h
@@ -1,4 +1,4 @@
-/* $NetBSD: bus.h,v 1.9 2012/05/07 18:16:38 tsutsui Exp $ */
+/* $NetBSD: bus.h,v 1.10 2019/09/23 16:17:57 skrll Exp $ */
/*-
* Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc.
@@ -73,12 +73,18 @@
typedef u_long bus_addr_t;
typedef u_long bus_size_t;
+#define PRIxBUSADDR "lx"
+#define PRIxBUSSIZE "lx"
+#define PRIuBUSSIZE "lu"
+
/*
* Access methods for bus resources and address space.
*/
typedef int bus_space_tag_t;
typedef u_long bus_space_handle_t;
+#define PRIxBSH "lx"
+
/*
* int bus_space_map(bus_space_tag_t t, bus_addr_t addr,
* bus_size_t size, int flags, bus_space_handle_t *bshp);
diff --git a/sys/arch/newsmips/include/bus.h b/sys/arch/newsmips/include/bus.h
index 64bfe04f3d6..34a4b647485 100644
--- a/sys/arch/newsmips/include/bus.h
+++ b/sys/arch/newsmips/include/bus.h
@@ -1,4 +1,4 @@
-/* $NetBSD: bus.h,v 1.20 2012/02/12 16:34:10 matt Exp $ */
+/* $NetBSD: bus.h,v 1.21 2019/09/23 16:17:57 skrll Exp $ */
/*
* Copyright (c) 1996, 1997, 1998, 2001 The NetBSD Foundation, Inc.
@@ -47,12 +47,18 @@
typedef u_long bus_addr_t;
typedef u_long bus_size_t;
+#define PRIxBUSADDR "lx"
+#define PRIxBUSSIZE "lx"
+#define PRIuBUSSIZE "lu"
+
/*
* Access methods for bus resources and address space.
*/
typedef int bus_space_tag_t;
typedef u_long bus_space_handle_t;
+#define PRIxBSH "lx"
+
/*
* int bus_space_map(bus_space_tag_t t, bus_addr_t addr,
* bus_size_t size, int flags, bus_space_handle_t *bshp);
diff --git a/sys/arch/next68k/include/bus_space.h b/sys/arch/next68k/include/bus_space.h
index 11fb0948129..e1a83c1d5af 100644
--- a/sys/arch/next68k/include/bus_space.h
+++ b/sys/arch/next68k/include/bus_space.h
@@ -1,4 +1,4 @@
-/* $NetBSD: bus_space.h,v 1.16 2012/02/12 16:34:10 matt Exp $ */
+/* $NetBSD: bus_space.h,v 1.17 2019/09/23 16:17:57 skrll Exp $ */
/*-
* Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc.
@@ -64,12 +64,18 @@
typedef u_long bus_addr_t;
typedef u_long bus_size_t;
+#define PRIxBUSADDR "lx"
+#define PRIxBUSSIZE "lx"
+#define PRIuBUSSIZE "lu"
+
/*
* Access methods for bus resources and address space.
*/
typedef volatile char * bus_space_tag_t;
typedef u_long bus_space_handle_t;
+#define PRIxBSH "lx"
+
/*
* Value for the next68k bus space tag, not to be used directly by MI code.
*/
diff --git a/sys/arch/or1k/include/bus_defs.h b/sys/arch/or1k/include/bus_defs.h
index af9a7259407..9a4ce8c2b0c 100644
--- a/sys/arch/or1k/include/bus_defs.h
+++ b/sys/arch/or1k/include/bus_defs.h
@@ -1,4 +1,4 @@
-/* $NetBSD: bus_defs.h,v 1.1 2014/09/03 19:34:26 matt Exp $ */
+/* $NetBSD: bus_defs.h,v 1.2 2019/09/23 16:17:57 skrll Exp $ */
/* $OpenBSD: bus.h,v 1.1 1997/10/13 10:53:42 pefo Exp $ */
/*-
@@ -103,7 +103,14 @@
typedef uintptr_t bus_addr_t;
typedef uintptr_t bus_size_t;
+#define PRIxBUSADDR PRIxPTR
+#define PRIxBUSSIZE PRIxPTR
+#define PRIuBUSSIZE PRIuPTR
+
typedef uintptr_t bus_space_handle_t;
+
+#define PRIxBSH PRIxPTR
+
typedef const struct or1k_bus_space *bus_space_tag_t;
struct extent;
diff --git a/sys/arch/playstation2/include/bus.h b/sys/arch/playstation2/include/bus.h
index 89ee876f9ec..a761a0f81b8 100644
--- a/sys/arch/playstation2/include/bus.h
+++ b/sys/arch/playstation2/include/bus.h
@@ -1,4 +1,4 @@
-/* $NetBSD: bus.h,v 1.15 2014/07/04 07:59:17 martin Exp $ */
+/* $NetBSD: bus.h,v 1.16 2019/09/23 16:17:57 skrll Exp $ */
/*-
* Copyright (c) 1997, 1998, 2000, 2001 The NetBSD Foundation, Inc.
@@ -105,12 +105,17 @@
typedef long bus_addr_t;
typedef long bus_size_t;
+#define PRIxBUSADDR "lx"
+#define PRIxBUSSIZE "lx"
+#define PRIuBUSSIZE "lu"
/*
* Access methods for bus space.
*/
typedef const struct playstation2_bus_space *bus_space_tag_t;
typedef bus_addr_t bus_space_handle_t;
+#define PRIxBSH PRIxBUSADDR
+
struct extent; /* forward declaration */
struct playstation2_bus_space {
diff --git a/sys/arch/powerpc/include/bus_defs.h b/sys/arch/powerpc/include/bus_defs.h
index f030a8de9d7..fc1b0aa6066 100644
--- a/sys/arch/powerpc/include/bus_defs.h
+++ b/sys/arch/powerpc/include/bus_defs.h
@@ -1,4 +1,4 @@
-/* $NetBSD: bus_defs.h,v 1.2 2014/02/28 05:28:40 matt Exp $ */
+/* $NetBSD: bus_defs.h,v 1.3 2019/09/23 16:17:57 skrll Exp $ */
/* $OpenBSD: bus.h,v 1.1 1997/10/13 10:53:42 pefo Exp $ */
/*-
@@ -110,8 +110,15 @@
typedef uintptr_t bus_addr_t;
typedef uintptr_t bus_size_t;
+#define PRIxBUSADDR PRIxPTR
+#define PRIxBUSSIZE PRIxPTR
+#define PRIuBUSSIZE PRIuPTR
+
#ifndef __HAVE_LOCAL_BUS_SPACE
typedef uintptr_t bus_space_handle_t;
+
+#define PRIxBSH PRIxPTR
+
typedef const struct powerpc_bus_space *bus_space_tag_t;
struct extent;
diff --git a/sys/arch/riscv/include/bus.h b/sys/arch/riscv/include/bus.h
index c7905d50c80..4816f61bd11 100644
--- a/sys/arch/riscv/include/bus.h
+++ b/sys/arch/riscv/include/bus.h
@@ -1,8 +1,16 @@
-/* $NetBSD: bus.h,v 1.1 2014/09/19 17:36:26 matt Exp $ */
+/* $NetBSD: bus.h,v 1.2 2019/09/23 16:17:57 skrll Exp $ */
#ifndef _RISCV_BUS_H_
typedef paddr_t bus_addr_t;
typedef psize_t bus_size_t;
+
+#define PRIxBUSADDR PRIxPADDR
+#define PRIxBUSSIZE PRIxPSIZE
+#define PRIuBUSSIZE PRIuPSIZE
+
typedef struct riscv_bus_space_tag *bus_space_tag_t;
typedef uintptr_t bus_space_handle_t;
+
+#define PRIxBSH PRIxPTR
+
#endif
diff --git a/sys/arch/sh3/include/bus_defs.h b/sys/arch/sh3/include/bus_defs.h
index a648537e5d0..86ee08521a4 100644
--- a/sys/arch/sh3/include/bus_defs.h
+++ b/sys/arch/sh3/include/bus_defs.h
@@ -1,4 +1,4 @@
-/* $NetBSD: bus_defs.h,v 1.1 2011/07/01 17:10:01 dyoung Exp $ */
+/* $NetBSD: bus_defs.h,v 1.2 2019/09/23 16:17:57 skrll Exp $ */
/*-
* Copyright (c) 1996, 1997 The NetBSD Foundation, Inc.
@@ -92,12 +92,18 @@
typedef u_long bus_addr_t;
typedef u_long bus_size_t;
+#define PRIxBUSADDR "lx"
+#define PRIxBUSSIZE "lx"
+#define PRIuBUSSIZE "lu"
+
/*
* Access methods for bus resources and address space.
*/
typedef int bus_space_tag_t;
typedef u_long bus_space_handle_t;
+#define PRIxBSH "lx"
+
/*
* int bus_space_map (bus_space_tag_t t, bus_addr_t addr,
* bus_size_t size, int flags, bus_space_handle_t *bshp);
diff --git a/sys/arch/sparc/include/bus_defs.h b/sys/arch/sparc/include/bus_defs.h
index cfdc4a21ac7..9588e56bbac 100644
--- a/sys/arch/sparc/include/bus_defs.h
+++ b/sys/arch/sparc/include/bus_defs.h
@@ -1,4 +1,4 @@
-/* $NetBSD: bus_defs.h,v 1.1 2011/07/01 17:10:01 dyoung Exp $ */
+/* $NetBSD: bus_defs.h,v 1.2 2019/09/23 16:17:57 skrll Exp $ */
/*-
* Copyright (c) 1996, 1997, 1998, 2001 The NetBSD Foundation, Inc.
@@ -68,9 +68,16 @@
* Bus address and size types
*/
typedef u_long bus_space_handle_t;
+
+#define PRIxBSH "lx"
+
typedef uint64_t bus_addr_t;
typedef u_long bus_size_t;
+#define PRIxBUSADDR PRIx64
+#define PRIxBUSSIZE "lx"
+#define PRIuBUSSIZE "lu"
+
#define SPARC_BUS_SPACE 0
/* bus_addr_t is extended to 64-bits and has the iospace encoded in it */
diff --git a/sys/arch/sparc64/include/bus_defs.h b/sys/arch/sparc64/include/bus_defs.h
index 62dba711458..fbca2f434e2 100644
--- a/sys/arch/sparc64/include/bus_defs.h
+++ b/sys/arch/sparc64/include/bus_defs.h
@@ -1,4 +1,4 @@
-/* $NetBSD: bus_defs.h,v 1.4 2016/11/04 05:41:01 macallan Exp $ */
+/* $NetBSD: bus_defs.h,v 1.5 2019/09/23 16:17:58 skrll Exp $ */
/*-
* Copyright (c) 1996, 1997, 1998, 2001 The NetBSD Foundation, Inc.
@@ -107,6 +107,10 @@ typedef enum bus_type bus_type_t;
typedef uint64_t bus_addr_t;
typedef uint64_t bus_size_t;
+#define PRIxBUSADDR PRIx64
+#define PRIxBUSSIZE PRIx64
+#define PRIuBUSSIZE PRIu64
+
/*
* XXXX -- convert prom virtual address to bus_space_handle_t
*/
diff --git a/sys/arch/sun68k/include/bus.h b/sys/arch/sun68k/include/bus.h
index 2bce4cb5d66..daf22ea9adf 100644
--- a/sys/arch/sun68k/include/bus.h
+++ b/sys/arch/sun68k/include/bus.h
@@ -1,4 +1,4 @@
-/* $NetBSD: bus.h,v 1.18 2011/07/12 05:31:49 mrg Exp $ */
+/* $NetBSD: bus.h,v 1.19 2019/09/23 16:17:58 skrll Exp $ */
/*-
* Copyright (c) 1996, 1997, 1998, 2001 The NetBSD Foundation, Inc.
@@ -74,6 +74,11 @@ typedef u_long bus_type_t;
typedef u_long bus_addr_t;
typedef u_long bus_size_t;
+#define PRIxBSH "lx"
+#define PRIxBUSADDR "lx"
+#define PRIxBUSSIZE "lx"
+#define PRIuBUSSIZE "lu"
+
#define BUS_ADDR_PADDR(x) ((x) & 0xffffffff)
/*
diff --git a/sys/arch/usermode/include/bus.h b/sys/arch/usermode/include/bus.h
index 8ac0ec0d672..43f0538b2ee 100644
--- a/sys/arch/usermode/include/bus.h
+++ b/sys/arch/usermode/include/bus.h
@@ -1,4 +1,4 @@
-/* $NetBSD: bus.h,v 1.4 2011/08/25 11:02:57 jmcneill Exp $ */
+/* $NetBSD: bus.h,v 1.5 2019/09/23 16:17:58 skrll Exp $ */
/*-
* Copyright (c) 2011 Jared D. McNeill <jmcneill@invisible.ca>
@@ -33,8 +33,13 @@ struct bus_space_tag;
typedef struct bus_space_tag *bus_space_tag_t;
typedef vaddr_t bus_space_handle_t;
+
+#define PRIxBSH PRIxVADDR
+
typedef paddr_t bus_addr_t;
+#define PRIxBUSADDR PRIxPADDR
+
bool bus_space_is_equal(bus_space_tag_t, bus_space_tag_t);
bool bus_space_handle_is_equal(bus_space_tag_t, bus_space_handle_t,
bus_space_handle_t);
diff --git a/sys/arch/vax/include/bus.h b/sys/arch/vax/include/bus.h
index 34a48c13b61..98ff808f8ed 100644
--- a/sys/arch/vax/include/bus.h
+++ b/sys/arch/vax/include/bus.h
@@ -1,4 +1,4 @@
-/* $NetBSD: bus.h,v 1.33 2016/04/22 18:13:01 christos Exp $ */
+/* $NetBSD: bus.h,v 1.34 2019/09/23 16:17:58 skrll Exp $ */
/*-
* Copyright (c) 1996, 1997, 1998, 2001 The NetBSD Foundation, Inc.
@@ -96,12 +96,17 @@
typedef paddr_t bus_addr_t;
typedef psize_t bus_size_t;
+#define PRIxBUSADDR PRIxPADDR
+#define PRIxBUSSIZE PRIxPSIZE
+#define PRIuBUSSIZE PRIuPSIZE
/*
* Access methods for bus resources and address space.
*/
typedef struct vax_bus_space *bus_space_tag_t;
typedef vaddr_t bus_space_handle_t;
+#define PRIxBUSADDR PRIxVADDR
+
struct vax_bus_space {
/* cookie */
void *vbs_cookie;
diff --git a/sys/arch/x68k/include/bus.h b/sys/arch/x68k/include/bus.h
index ffc565c882c..f54cc2f638d 100644
--- a/sys/arch/x68k/include/bus.h
+++ b/sys/arch/x68k/include/bus.h
@@ -1,4 +1,4 @@
-/* $NetBSD: bus.h,v 1.25 2012/10/13 06:44:24 tsutsui Exp $ */
+/* $NetBSD: bus.h,v 1.26 2019/09/23 16:17:58 skrll Exp $ */
/*-
* Copyright (c) 1998, 2001 The NetBSD Foundation, Inc.
@@ -44,6 +44,11 @@ typedef u_long bus_addr_t;
typedef u_long bus_size_t;
typedef u_long bus_space_handle_t;
+#define PRIxBUSADDR "lx"
+#define PRIxBUSSIZE "lx"
+#define PRIuBUSSIZE "lu"
+#define PRIxBSH "lx"
+
/*
* Bus space descripter
*/
diff --git a/sys/arch/x86/include/bus_defs.h b/sys/arch/x86/include/bus_defs.h
index 193605cb470..6d699e10d3d 100644
--- a/sys/arch/x86/include/bus_defs.h
+++ b/sys/arch/x86/include/bus_defs.h
@@ -1,4 +1,4 @@
-/* $NetBSD: bus_defs.h,v 1.2 2011/08/25 15:06:10 dyoung Exp $ */
+/* $NetBSD: bus_defs.h,v 1.3 2019/09/23 16:17:58 skrll Exp $ */
/*-
* Copyright (c) 1996, 1997, 1998, 2001 The NetBSD Foundation, Inc.
@@ -80,6 +80,10 @@
typedef paddr_t bus_addr_t;
typedef size_t bus_size_t;
+#define PRIxBUSADDR PRIxPADDR
+#define PRIxBUSSIZE "%zx"
+#define PRIuBUSSIZE "%zu"
+
struct bus_space_tag;
typedef struct bus_space_tag *bus_space_tag_t;
@@ -98,6 +102,8 @@ struct bus_space_tag {
typedef vaddr_t bus_space_handle_t;
+#define PRIxBSH PRIxVADDR
+
typedef struct x86_bus_dma_tag *bus_dma_tag_t;
typedef struct x86_bus_dmamap *bus_dmamap_t;