Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch Add PRIx{P, V}{ADDR, SIZE}, PRIu{P, V}SIZE, and PRIxRE...
details: https://anonhg.NetBSD.org/src/rev/a306d2c43b13
branches: trunk
changeset: 749845:a306d2c43b13
user: matt <matt%NetBSD.org@localhost>
date: Fri Dec 11 05:52:03 2009 +0000
description:
Add PRIx{P,V}{ADDR,SIZE}, PRIu{P,V}SIZE, and PRIxREGISTER{,32,64} for all
(except where they will be added via merge). These should be used to print
{p,v}{addr,size}_t and register*_t as appropriate.
diffstat:
sys/arch/alpha/include/types.h | 14 ++++++++------
sys/arch/amd64/include/types.h | 14 +++++++++++---
sys/arch/arm/include/types.h | 25 ++++++++++++++++---------
sys/arch/hppa/include/types.h | 9 ++++++++-
sys/arch/i386/include/types.h | 12 +++++++++++-
sys/arch/ia64/include/types.h | 9 ++++++++-
sys/arch/m68k/include/types.h | 21 ++++++++++++++-------
sys/arch/powerpc/include/types.h | 11 ++++++++++-
sys/arch/sh3/include/types.h | 9 ++++++++-
sys/arch/sparc/include/types.h | 16 +++++++++++++++-
sys/arch/usermode/include/types.h | 9 ++++++++-
sys/arch/vax/include/types.h | 9 ++++++++-
12 files changed, 125 insertions(+), 33 deletions(-)
diffs (truncated from 403 to 300 lines):
diff -r 2b53cbc26eef -r a306d2c43b13 sys/arch/alpha/include/types.h
--- a/sys/arch/alpha/include/types.h Thu Dec 10 20:55:17 2009 +0000
+++ b/sys/arch/alpha/include/types.h Fri Dec 11 05:52:03 2009 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: types.h,v 1.41 2009/08/20 21:31:49 matt Exp $ */
+/* $NetBSD: types.h,v 1.42 2009/12/11 05:52:03 matt Exp $ */
/*-
* Copyright (c) 1990, 1993
@@ -50,15 +50,17 @@
typedef unsigned long psize_t;
typedef unsigned long vaddr_t;
typedef unsigned long vsize_t;
-#define PRTxPADDR "lx"
-#define PRTxPSIZE "lx"
-#define PRTxVADDR "lx"
-#define PRTxVSIZE "lx"
+#define PRIxPADDR "lx"
+#define PRIxPSIZE "lx"
+#define PRIuPSIZE "lu"
+#define PRIxVADDR "lx"
+#define PRIxVSIZE "lx"
+#define PRIuVSIZE "lu"
#endif
typedef long int register_t;
#if defined(_NETBSD_SOURCE)
-#define PRTxREGISTER "lx"
+#define PRIxREGISTER "lx"
#endif
typedef volatile int __cpu_simple_lock_t;
diff -r 2b53cbc26eef -r a306d2c43b13 sys/arch/amd64/include/types.h
--- a/sys/arch/amd64/include/types.h Thu Dec 10 20:55:17 2009 +0000
+++ b/sys/arch/amd64/include/types.h Fri Dec 11 05:52:03 2009 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: types.h,v 1.32 2009/04/19 14:11:36 ad Exp $ */
+/* $NetBSD: types.h,v 1.33 2009/12/11 05:52:03 matt Exp $ */
/*-
* Copyright (c) 1990 The Regents of the University of California.
@@ -52,10 +52,18 @@
typedef unsigned long psize_t;
typedef unsigned long vaddr_t;
typedef unsigned long vsize_t;
+#define PRIxPADDR "lx"
+#define PRIxPSIZE "lx"
+#define PRIuPSIZE "lu"
+#define PRIxVADDR "lx"
+#define PRIxVSIZE "lx"
+#define PRIuVSIZE "lu"
#endif
-typedef long int register_t;
-typedef int register32_t;
+typedef long int register_t;
+typedef int register32_t;
+#define PRIxREGISTER "lx"
+#define PRIxREGISTER32 "x"
typedef volatile unsigned char __cpu_simple_lock_t;
diff -r 2b53cbc26eef -r a306d2c43b13 sys/arch/arm/include/types.h
--- a/sys/arch/arm/include/types.h Thu Dec 10 20:55:17 2009 +0000
+++ b/sys/arch/arm/include/types.h Fri Dec 11 05:52:03 2009 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: types.h,v 1.16 2008/01/20 18:09:05 joerg Exp $ */
+/* $NetBSD: types.h,v 1.17 2009/12/11 05:52:03 matt Exp $ */
/*
* Copyright (c) 1990 The Regents of the University of California.
@@ -46,21 +46,28 @@
/* NB: This should probably be if defined(_KERNEL) */
#if defined(_NETBSD_SOURCE)
-typedef unsigned long vm_offset_t;
-typedef unsigned long vm_size_t;
+typedef unsigned long vm_offset_t; /* depreciated */
+typedef unsigned long vm_size_t; /* depreciated */
-typedef vm_offset_t paddr_t;
-typedef vm_size_t psize_t;
-typedef vm_offset_t vaddr_t;
-typedef vm_size_t vsize_t;
+typedef unsigned long paddr_t;
+typedef unsigned long psize_t;
+typedef unsigned long vaddr_t;
+typedef unsigned long vsize_t;
+#define PRIxPADDR "lx"
+#define PRIxPSIZE "lx"
+#define PRIuPSIZE "lu"
+#define PRIxVADDR "lx"
+#define PRIxVSIZE "lx"
+#define PRIuVSIZE "lu"
#endif
+typedef int register_t;
+#define PRIxREGISTER "x"
+
typedef unsigned long pmc_evid_t;
#define PMC_INVALID_EVID (-1)
typedef unsigned long pmc_ctr_t;
-typedef int register_t;
-
/*
* This should have always been an 8-bit type, but since it's been exposed
* to user-space, we don't want ABI breakage there.
diff -r 2b53cbc26eef -r a306d2c43b13 sys/arch/hppa/include/types.h
--- a/sys/arch/hppa/include/types.h Thu Dec 10 20:55:17 2009 +0000
+++ b/sys/arch/hppa/include/types.h Fri Dec 11 05:52:03 2009 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: types.h,v 1.16 2007/10/17 19:54:41 garbled Exp $ */
+/* $NetBSD: types.h,v 1.17 2009/12/11 05:52:03 matt Exp $ */
/* $OpenBSD: types.h,v 1.6 2001/08/11 01:58:34 art Exp $ */
@@ -55,6 +55,12 @@
typedef unsigned long vsize_t;
typedef unsigned long paddr_t;
typedef unsigned long psize_t;
+#define PRIxVADDR "lx"
+#define PRIxVSIZE "lx"
+#define PRIuVSIZE "lu"
+#define PRIxPADDR "lx"
+#define PRIxPSIZE "lx"
+#define PRIuPSIZE "lu"
/* XXX DIE DIE DIE */
typedef unsigned long vm_offset_t;
typedef unsigned long vm_size_t;
@@ -73,6 +79,7 @@
#define __SIMPLELOCK_UNLOCKED { { 1, 1, 1, 1} }
typedef int register_t;
+#define PRIxREGISTER "x"
#define __MACHINE_STACK_GROWS_UP /* stack grows to higher addresses */
#define __HAVE_FUNCTION_DESCRIPTORS /* function ptrs may be descriptors */
diff -r 2b53cbc26eef -r a306d2c43b13 sys/arch/i386/include/types.h
--- a/sys/arch/i386/include/types.h Thu Dec 10 20:55:17 2009 +0000
+++ b/sys/arch/i386/include/types.h Fri Dec 11 05:52:03 2009 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: types.h,v 1.66 2009/06/28 09:24:09 ad Exp $ */
+/* $NetBSD: types.h,v 1.67 2009/12/11 05:52:03 matt Exp $ */
/*-
* Copyright (c) 1990 The Regents of the University of California.
@@ -52,17 +52,27 @@
#ifdef PAE
typedef unsigned long long paddr_t;
typedef unsigned long long psize_t;
+#define PRIxPADDR "llx"
+#define PRIxPSIZE "llx"
+#define PRIuPSIZE "llu"
#else
typedef unsigned long paddr_t;
typedef unsigned long psize_t;
+#define PRIxPADDR "lx"
+#define PRIxPSIZE "lx"
+#define PRIuPSIZE "lu"
#endif /* PAE */
typedef unsigned long vaddr_t;
typedef unsigned long vsize_t;
+#define PRIxVADDR "lx"
+#define PRIxVSIZE "lx"
+#define PRIuVSIZE "lu"
#endif
typedef int pmc_evid_t;
typedef __uint64_t pmc_ctr_t;
typedef int register_t;
+#define PRIxREGISTER "x"
typedef volatile unsigned char __cpu_simple_lock_t;
diff -r 2b53cbc26eef -r a306d2c43b13 sys/arch/ia64/include/types.h
--- a/sys/arch/ia64/include/types.h Thu Dec 10 20:55:17 2009 +0000
+++ b/sys/arch/ia64/include/types.h Fri Dec 11 05:52:03 2009 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: types.h,v 1.4 2008/03/20 09:09:20 kochi Exp $ */
+/* $NetBSD: types.h,v 1.5 2009/12/11 05:52:03 matt Exp $ */
/*-
* Copyright (c) 1990 The Regents of the University of California.
@@ -50,11 +50,18 @@
typedef unsigned long psize_t;
typedef unsigned long vaddr_t;
typedef unsigned long vsize_t;
+#define PRIxPADDR "lx"
+#define PRIxPSIZE "lx"
+#define PRIuPSIZE "lu"
+#define PRIxVADDR "lx"
+#define PRIxVSIZE "lx"
+#define PRIuVSIZE "lu"
#endif
typedef int pmc_evid_t;
typedef __uint64_t pmc_ctr_t;
typedef long int register_t;
+#define PRIxREGISTER "lx"
typedef __volatile int __cpu_simple_lock_t;
diff -r 2b53cbc26eef -r a306d2c43b13 sys/arch/m68k/include/types.h
--- a/sys/arch/m68k/include/types.h Thu Dec 10 20:55:17 2009 +0000
+++ b/sys/arch/m68k/include/types.h Fri Dec 11 05:52:03 2009 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: types.h,v 1.27 2007/10/17 19:55:05 garbled Exp $ */
+/* $NetBSD: types.h,v 1.28 2009/12/11 05:52:03 matt Exp $ */
/*-
* Copyright (c) 1990 The Regents of the University of California.
@@ -45,16 +45,23 @@
/* NB: This should probably be if defined(_KERNEL) */
#if defined(_NETBSD_SOURCE)
-typedef unsigned long vm_offset_t;
-typedef unsigned long vm_size_t;
+typedef unsigned long vm_offset_t; /* depreciated */
+typedef unsigned long vm_size_t; /* depreciated */
-typedef vm_offset_t paddr_t;
-typedef vm_size_t psize_t;
-typedef vm_offset_t vaddr_t;
-typedef vm_size_t vsize_t;
+typedef unsigned long paddr_t;
+typedef unsigned long psize_t;
+typedef unsigned long vaddr_t;
+typedef unsigned long vsize_t;
+#define PRIxPADDR "lx"
+#define PRIxPSIZE "lx"
+#define PRIuPSIZE "lu"
+#define PRIxVADDR "lx"
+#define PRIxVSIZE "lx"
+#define PRIuVSIZE "lu"
#endif
typedef int register_t;
+#define PRIxREGISTER "x"
typedef volatile unsigned char __cpu_simple_lock_t;
diff -r 2b53cbc26eef -r a306d2c43b13 sys/arch/powerpc/include/types.h
--- a/sys/arch/powerpc/include/types.h Thu Dec 10 20:55:17 2009 +0000
+++ b/sys/arch/powerpc/include/types.h Fri Dec 11 05:52:03 2009 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: types.h,v 1.33 2008/01/31 05:30:00 matt Exp $ */
+/* $NetBSD: types.h,v 1.34 2009/12/11 05:52:03 matt Exp $ */
/*-
* Copyright (C) 1995 Wolfgang Solfrank.
@@ -42,6 +42,12 @@
#if defined(_NETBSD_SOURCE)
typedef unsigned long paddr_t, vaddr_t;
typedef unsigned long psize_t, vsize_t;
+#define PRIxPADDR "lx"
+#define PRIxPSIZE "lx"
+#define PRIuPSIZE "lu"
+#define PRIxVADDR "lx"
+#define PRIxVSIZE "lx"
+#define PRIuVSIZE "lu"
#endif
/*
@@ -50,6 +56,9 @@
typedef unsigned long register_t;
typedef __uint64_t register64_t;
typedef __uint32_t register32_t;
+#define PRIxREGISTER "lx"
+#define PRIxREGISTER64 PRIx64
+#define PRIxREGISTER32 PRIx32
#if defined(_KERNEL)
typedef struct label_t {
diff -r 2b53cbc26eef -r a306d2c43b13 sys/arch/sh3/include/types.h
--- a/sys/arch/sh3/include/types.h Thu Dec 10 20:55:17 2009 +0000
+++ b/sys/arch/sh3/include/types.h Fri Dec 11 05:52:03 2009 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: types.h,v 1.28 2009/10/21 21:12:02 rmind Exp $ */
+/* $NetBSD: types.h,v 1.29 2009/12/11 05:52:04 matt Exp $ */
/*-
* Copyright (c) 1990 The Regents of the University of California.
@@ -53,9 +53,16 @@
typedef unsigned long psize_t;
typedef unsigned long vaddr_t;
typedef unsigned long vsize_t;
+#define PRIxPADDR "lx"
+#define PRIxPSIZE "lx"
+#define PRIuPSIZE "lu"
+#define PRIxVADDR "lx"
+#define PRIxVSIZE "lx"
+#define PRIuVSIZE "lu"
#endif
typedef int register_t;
+#define PRIxREGISTER "x"
typedef volatile unsigned char __cpu_simple_lock_t;
Home |
Main Index |
Thread Index |
Old Index