Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/uebayasi-xip]: src/sys/arch Convert all VM_MDPAGE_INIT()'s to take struc...



details:   https://anonhg.NetBSD.org/src/rev/fd48cd29da2d
branches:  uebayasi-xip
changeset: 751595:fd48cd29da2d
user:      uebayasi <uebayasi%NetBSD.org@localhost>
date:      Tue Feb 23 15:27:55 2010 +0000

description:
Convert all VM_MDPAGE_INIT()'s to take struct vm_page_md * and paddr_t.

diffstat:

 sys/arch/alpha/include/vmparam.h       |   8 ++++----
 sys/arch/amd64/include/vmparam.h       |   8 ++++----
 sys/arch/hppa/include/vmparam.h        |  12 ++++++------
 sys/arch/i386/include/vmparam.h        |   8 ++++----
 sys/arch/ia64/include/vmparam.h        |   8 ++++----
 sys/arch/mips/include/vmparam.h        |   6 +++---
 sys/arch/powerpc/include/oea/vmparam.h |   6 +++---
 sys/arch/sh3/include/vmparam.h         |   5 ++---
 sys/arch/sparc/include/vmparam.h       |  12 ++++++------
 sys/arch/sparc64/include/vmparam.h     |  10 +++++-----
 sys/arch/vax/include/vmparam.h         |   4 ++--
 11 files changed, 43 insertions(+), 44 deletions(-)

diffs (243 lines):

diff -r cf0accb04c2a -r fd48cd29da2d sys/arch/alpha/include/vmparam.h
--- a/sys/arch/alpha/include/vmparam.h  Tue Feb 23 08:46:17 2010 +0000
+++ b/sys/arch/alpha/include/vmparam.h  Tue Feb 23 15:27:55 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: vmparam.h,v 1.33 2009/03/06 20:31:46 joerg Exp $ */
+/* $NetBSD: vmparam.h,v 1.33.2.1 2010/02/23 15:27:55 uebayasi Exp $ */
 
 /*
  * Copyright (c) 1992, 1993
@@ -162,10 +162,10 @@
        unsigned pvh_refcnt;
 };
 
-#define        VM_MDPAGE_INIT(pg)                                              \
+#define        VM_MDPAGE_INIT(md, pa)                                          \
 do {                                                                   \
-       (pg)->mdpage.pvh_list = NULL;                                   \
-       (pg)->mdpage.pvh_refcnt = 0;                                    \
+       (md)->pvh_list = NULL;                                          \
+       (md)->pvh_refcnt = 0;                                           \
 } while (/*CONSTCOND*/0)
 
 #endif /* ! _ALPHA_VMPARAM_H_ */
diff -r cf0accb04c2a -r fd48cd29da2d sys/arch/amd64/include/vmparam.h
--- a/sys/arch/amd64/include/vmparam.h  Tue Feb 23 08:46:17 2010 +0000
+++ b/sys/arch/amd64/include/vmparam.h  Tue Feb 23 15:27:55 2010 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: vmparam.h,v 1.22 2009/11/22 21:41:03 bouyer Exp $      */
+/*     $NetBSD: vmparam.h,v 1.22.2.1 2010/02/23 15:27:55 uebayasi Exp $        */
 
 /*-
  * Copyright (c) 1990 The Regents of the University of California.
@@ -160,9 +160,9 @@
 #include <x86/pmap_pv.h>
 
 #define        __HAVE_VM_PAGE_MD
-#define        VM_MDPAGE_INIT(pg) \
-       memset(&(pg)->mdpage, 0, sizeof((pg)->mdpage)); \
-       PMAP_PAGE_INIT(&(pg)->mdpage.mp_pp)
+#define        VM_MDPAGE_INIT(md, pa) \
+       memset((md), 0, sizeof(*(md))); \
+       PMAP_PAGE_INIT(&(md)->mp_pp)
 
 struct vm_page_md {
        struct pmap_page mp_pp;
diff -r cf0accb04c2a -r fd48cd29da2d sys/arch/hppa/include/vmparam.h
--- a/sys/arch/hppa/include/vmparam.h   Tue Feb 23 08:46:17 2010 +0000
+++ b/sys/arch/hppa/include/vmparam.h   Tue Feb 23 15:27:55 2010 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: vmparam.h,v 1.14 2009/04/30 07:01:27 skrll Exp $       */
+/*     $NetBSD: vmparam.h,v 1.14.2.1 2010/02/23 15:27:55 uebayasi Exp $        */
 
 /*     $OpenBSD: vmparam.h,v 1.33 2006/06/04 17:21:24 miod Exp $       */
 
@@ -112,12 +112,12 @@
        int             pvh_aliases;    /* alias counting */
 };
 
-#define        VM_MDPAGE_INIT(pg) \
+#define        VM_MDPAGE_INIT(md, pa) \
 do {                                                                   \
-       mutex_init(&(pg)->mdpage.pvh_lock, MUTEX_NODEBUG, IPL_VM);      \
-       (pg)->mdpage.pvh_list = NULL;                                   \
-       (pg)->mdpage.pvh_attrs = 0;                                     \
-       (pg)->mdpage.pvh_aliases = 0;                                   \
+       mutex_init(&(md)->pvh_lock, MUTEX_NODEBUG, IPL_VM);             \
+       (md)->pvh_list = NULL;                                          \
+       (md)->pvh_attrs = 0;                                            \
+       (md)->pvh_aliases = 0;                                          \
 } while (0)
 #endif
 
diff -r cf0accb04c2a -r fd48cd29da2d sys/arch/i386/include/vmparam.h
--- a/sys/arch/i386/include/vmparam.h   Tue Feb 23 08:46:17 2010 +0000
+++ b/sys/arch/i386/include/vmparam.h   Tue Feb 23 15:27:55 2010 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: vmparam.h,v 1.70 2009/03/06 20:31:49 joerg Exp $       */
+/*     $NetBSD: vmparam.h,v 1.70.2.1 2010/02/23 15:27:55 uebayasi Exp $        */
 
 /*-
  * Copyright (c) 1990 The Regents of the University of California.
@@ -137,9 +137,9 @@
 #include <x86/pmap_pv.h>
 
 #define        __HAVE_VM_PAGE_MD
-#define        VM_MDPAGE_INIT(pg) \
-       memset(&(pg)->mdpage, 0, sizeof((pg)->mdpage)); \
-       PMAP_PAGE_INIT(&(pg)->mdpage.mp_pp)
+#define        VM_MDPAGE_INIT(md, pa) \
+       memset((md), 0, sizeof(*(md))); \
+       PMAP_PAGE_INIT(&(md)->mp_pp)
 
 struct vm_page_md {
        struct pmap_page mp_pp;
diff -r cf0accb04c2a -r fd48cd29da2d sys/arch/ia64/include/vmparam.h
--- a/sys/arch/ia64/include/vmparam.h   Tue Feb 23 08:46:17 2010 +0000
+++ b/sys/arch/ia64/include/vmparam.h   Tue Feb 23 15:27:55 2010 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: vmparam.h,v 1.5 2009/07/20 04:41:37 kiyohara Exp $     */
+/*     $NetBSD: vmparam.h,v 1.5.2.1 2010/02/23 15:27:56 uebayasi Exp $ */
 
 /*-
  * Copyright (c) 1990 The Regents of the University of California.
@@ -125,10 +125,10 @@
        int pvh_attrs;                  /* page attributes */
 };
 
-#define        VM_MDPAGE_INIT(pg)                                              \
+#define        VM_MDPAGE_INIT(md, pa)                                          \
 do {                                                                   \
-       TAILQ_INIT(&(pg)->mdpage.pv_list);                              \
-       mutex_init(&(pg)->mdpage.pv_mutex, MUTEX_DEFAULT, IPL_NONE);    \
+       TAILQ_INIT(&(md)->pv_list);                                     \
+       mutex_init(&(md)->pv_mutex, MUTEX_DEFAULT, IPL_NONE);           \
 } while (/*CONSTCOND*/0)
 #endif /*_LOCORE*/
 
diff -r cf0accb04c2a -r fd48cd29da2d sys/arch/mips/include/vmparam.h
--- a/sys/arch/mips/include/vmparam.h   Tue Feb 23 08:46:17 2010 +0000
+++ b/sys/arch/mips/include/vmparam.h   Tue Feb 23 15:27:55 2010 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: vmparam.h,v 1.44 2009/12/14 00:46:05 matt Exp $        */
+/*     $NetBSD: vmparam.h,v 1.44.2.1 2010/02/23 15:27:56 uebayasi Exp $        */
 
 /*
  * Copyright (c) 1992, 1993
@@ -212,9 +212,9 @@
        u_int pvh_attrs;                /* page attributes */
 };
 
-#define VM_MDPAGE_INIT(pg)                                             \
+#define VM_MDPAGE_INIT(md, pa)                                         \
 do {                                                                   \
-       (pg)->mdpage.pvh_list = NULL;                                   \
+       (md)->pvh_list = NULL;                                          \
 } while (/* CONSTCOND */ 0)
 
 #ifndef VM_NFREELIST
diff -r cf0accb04c2a -r fd48cd29da2d sys/arch/powerpc/include/oea/vmparam.h
--- a/sys/arch/powerpc/include/oea/vmparam.h    Tue Feb 23 08:46:17 2010 +0000
+++ b/sys/arch/powerpc/include/oea/vmparam.h    Tue Feb 23 15:27:55 2010 +0000
@@ -206,9 +206,9 @@
        unsigned int mdpg_attrs; 
 };
 
-#define        VM_MDPAGE_INIT(pg) do {                 \
-       LIST_INIT(&(pg)->mdpage.mdpg_pvoh);     \
-       (pg)->mdpage.mdpg_attrs = 0;            \
+#define        VM_MDPAGE_INIT(md, pa) do {             \
+       LIST_INIT(&(md)->mdpg_pvoh);            \
+       (md)->mdpg_attrs = 0;                   \
 } while (/*CONSTCOND*/0)
 
 #endif /* _LOCORE */
diff -r cf0accb04c2a -r fd48cd29da2d sys/arch/sh3/include/vmparam.h
--- a/sys/arch/sh3/include/vmparam.h    Tue Feb 23 08:46:17 2010 +0000
+++ b/sys/arch/sh3/include/vmparam.h    Tue Feb 23 15:27:55 2010 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: vmparam.h,v 1.19 2009/03/06 20:31:51 joerg Exp $       */
+/*     $NetBSD: vmparam.h,v 1.19.2.1 2010/02/23 15:27:56 uebayasi Exp $        */
 
 /*-
  * Copyright (c) 2002 The NetBSD Foundation, Inc.
@@ -97,9 +97,8 @@
        int pvh_flags;
 };
 
-#define        VM_MDPAGE_INIT(pg)                                              \
+#define        VM_MDPAGE_INIT(pvh, pa)                                         \
 do {                                                                   \
-       struct vm_page_md *pvh = &(pg)->mdpage;                         \
        SLIST_INIT(&pvh->pvh_head);                                     \
        pvh->pvh_flags = 0;                                             \
 } while (/*CONSTCOND*/0)
diff -r cf0accb04c2a -r fd48cd29da2d sys/arch/sparc/include/vmparam.h
--- a/sys/arch/sparc/include/vmparam.h  Tue Feb 23 08:46:17 2010 +0000
+++ b/sys/arch/sparc/include/vmparam.h  Tue Feb 23 15:27:55 2010 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: vmparam.h,v 1.40 2009/03/06 20:31:52 joerg Exp $ */
+/*     $NetBSD: vmparam.h,v 1.40.2.1 2010/02/23 15:27:56 uebayasi Exp $ */
 
 /*
  * Copyright (c) 1992, 1993
@@ -138,11 +138,11 @@
 };
 #define VM_MDPAGE_PVHEAD(pg)   (&(pg)->mdpage.pvlisthead)
 
-#define VM_MDPAGE_INIT(pg) do {                                \
-       (pg)->mdpage.pvlisthead.pv_next = NULL;         \
-       (pg)->mdpage.pvlisthead.pv_pmap = NULL;         \
-       (pg)->mdpage.pvlisthead.pv_va = 0;              \
-       (pg)->mdpage.pvlisthead.pv_flags = 0;           \
+#define VM_MDPAGE_INIT(md, pa) do {                    \
+       (md)->pvlisthead.pv_next = NULL;                \
+       (md)->pvlisthead.pv_pmap = NULL;                \
+       (md)->pvlisthead.pv_va = 0;                     \
+       (md)->pvlisthead.pv_flags = 0;                  \
 } while(/*CONSTCOND*/0)
 
 #endif /* _SPARC_VMPARAM_H_ */
diff -r cf0accb04c2a -r fd48cd29da2d sys/arch/sparc64/include/vmparam.h
--- a/sys/arch/sparc64/include/vmparam.h        Tue Feb 23 08:46:17 2010 +0000
+++ b/sys/arch/sparc64/include/vmparam.h        Tue Feb 23 15:27:55 2010 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: vmparam.h,v 1.30 2009/03/06 20:31:52 joerg Exp $ */
+/*     $NetBSD: vmparam.h,v 1.30.2.1 2010/02/23 15:27:56 uebayasi Exp $ */
 
 /*
  * Copyright (c) 1992, 1993
@@ -189,11 +189,11 @@
 struct vm_page_md {
        struct pv_entry mdpg_pvh;
 };
-#define        VM_MDPAGE_INIT(pg)                                              \
+#define        VM_MDPAGE_INIT(md, pa)                                          \
 do {                                                                   \
-       (pg)->mdpage.mdpg_pvh.pv_next = NULL;                           \
-       (pg)->mdpage.mdpg_pvh.pv_pmap = NULL;                           \
-       (pg)->mdpage.mdpg_pvh.pv_va = 0;                                \
+       (md)->mdpg_pvh.pv_next = NULL;                                  \
+       (md)->mdpg_pvh.pv_pmap = NULL;                                  \
+       (md)->mdpg_pvh.pv_va = 0;                                       \
 } while (/*CONSTCOND*/0)
 
 #endif /* _KERNEL */
diff -r cf0accb04c2a -r fd48cd29da2d sys/arch/vax/include/vmparam.h
--- a/sys/arch/vax/include/vmparam.h    Tue Feb 23 08:46:17 2010 +0000
+++ b/sys/arch/vax/include/vmparam.h    Tue Feb 23 15:27:55 2010 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: vmparam.h,v 1.45 2009/03/06 20:31:53 joerg Exp $       */
+/*     $NetBSD: vmparam.h,v 1.45.2.1 2010/02/23 15:27:57 uebayasi Exp $        */
 
 /*-
  * Copyright (c) 1990 The Regents of the University of California.
@@ -116,7 +116,7 @@
        unsigned int md_attrs;
 };
 
-#define        VM_MDPAGE_INIT(pg)      ((pg)->mdpage.md_attrs = 0)
+#define        VM_MDPAGE_INIT(md, pa)  ((md)->md_attrs = 0)
 #endif
 
 



Home | Main Index | Thread Index | Old Index