From 4f1dd4067f7acc7296eec809d074c4fac138ac8d Mon Sep 17 00:00:00 2001 From: uebayasi Date: Fri, 12 Nov 2010 07:59:24 +0000 Subject: [PATCH] Put VM_PAGE_TO_MD() definition in one place. No functional changes. --- sys/arch/alpha/alpha/pmap.c | 6 ++---- sys/arch/arm/arm32/mem.c | 6 ++---- sys/arch/arm/arm32/pmap.c | 6 ++---- sys/arch/hppa/hppa/pmap.c | 6 ++---- sys/arch/ia64/ia64/pmap.c | 6 ++---- sys/arch/mips/mips/pmap.c | 6 ++---- sys/arch/powerpc/oea/pmap.c | 6 ++---- sys/arch/powerpc/powerpc/pmap_subr.c | 6 ++---- sys/arch/sh3/sh3/pmap.c | 6 ++---- sys/arch/sparc64/sparc64/pmap.c | 6 ++---- sys/uvm/uvm_page.h | 6 +++++- 11 files changed, 25 insertions(+), 41 deletions(-) diff --git a/sys/arch/alpha/alpha/pmap.c b/sys/arch/alpha/alpha/pmap.c index e639813a5bf7..4ac692a9c50d 100644 --- a/sys/arch/alpha/alpha/pmap.c +++ b/sys/arch/alpha/alpha/pmap.c @@ -1,4 +1,4 @@ -/* $NetBSD: pmap.c,v 1.254 2010/11/10 09:27:21 uebayasi Exp $ */ +/* $NetBSD: pmap.c,v 1.255 2010/11/12 07:59:25 uebayasi Exp $ */ /*- * Copyright (c) 1998, 1999, 2000, 2001, 2007, 2008 The NetBSD Foundation, Inc. @@ -140,7 +140,7 @@ #include /* RCS ID & Copyright macro defns */ -__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.254 2010/11/10 09:27:21 uebayasi Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.255 2010/11/12 07:59:25 uebayasi Exp $"); #include #include @@ -159,8 +159,6 @@ __KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.254 2010/11/10 09:27:21 uebayasi Exp $"); #include #endif -#define VM_PAGE_TO_MD(pg) (&(pg)->mdpage) - #ifdef DEBUG #define PDB_FOLLOW 0x0001 #define PDB_INIT 0x0002 diff --git a/sys/arch/arm/arm32/mem.c b/sys/arch/arm/arm32/mem.c index 59a349e657b6..9647e732efa8 100644 --- a/sys/arch/arm/arm32/mem.c +++ b/sys/arch/arm/arm32/mem.c @@ -1,4 +1,4 @@ -/* $NetBSD: mem.c,v 1.29 2010/11/06 11:46:00 uebayasi Exp $ */ +/* $NetBSD: mem.c,v 1.30 2010/11/12 07:59:25 uebayasi Exp $ */ /* * Copyright (c) 1982, 1986, 1990, 1993 @@ -76,7 +76,7 @@ #include "opt_compat_netbsd.h" #include -__KERNEL_RCSID(0, "$NetBSD: mem.c,v 1.29 2010/11/06 11:46:00 uebayasi Exp $"); +__KERNEL_RCSID(0, "$NetBSD: mem.c,v 1.30 2010/11/12 07:59:25 uebayasi Exp $"); #include #include @@ -92,8 +92,6 @@ __KERNEL_RCSID(0, "$NetBSD: mem.c,v 1.29 2010/11/06 11:46:00 uebayasi Exp $"); #include -#define VM_PAGE_TO_MD(pg) (&(pg)->mdpage) - extern vaddr_t memhook; /* in pmap.c (poor name!) */ extern kmutex_t memlock; /* in pmap.c */ extern void *zeropage; /* in pmap.c */ diff --git a/sys/arch/arm/arm32/pmap.c b/sys/arch/arm/arm32/pmap.c index 80c61cf582de..1105a7d55c8b 100644 --- a/sys/arch/arm/arm32/pmap.c +++ b/sys/arch/arm/arm32/pmap.c @@ -1,4 +1,4 @@ -/* $NetBSD: pmap.c,v 1.218 2010/11/10 09:27:22 uebayasi Exp $ */ +/* $NetBSD: pmap.c,v 1.219 2010/11/12 07:59:25 uebayasi Exp $ */ /* * Copyright 2003 Wasabi Systems, Inc. @@ -211,9 +211,7 @@ #include #include -__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.218 2010/11/10 09:27:22 uebayasi Exp $"); - -#define VM_PAGE_TO_MD(pg) (&(pg)->mdpage) +__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.219 2010/11/12 07:59:25 uebayasi Exp $"); #ifdef PMAP_DEBUG diff --git a/sys/arch/hppa/hppa/pmap.c b/sys/arch/hppa/hppa/pmap.c index eef0d03569e5..9c4a5ee8a57b 100644 --- a/sys/arch/hppa/hppa/pmap.c +++ b/sys/arch/hppa/hppa/pmap.c @@ -1,4 +1,4 @@ -/* $NetBSD: pmap.c,v 1.77 2010/10/30 17:20:43 uebayasi Exp $ */ +/* $NetBSD: pmap.c,v 1.78 2010/11/12 07:59:26 uebayasi Exp $ */ /*- * Copyright (c) 2001, 2002 The NetBSD Foundation, Inc. @@ -65,7 +65,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.77 2010/10/30 17:20:43 uebayasi Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.78 2010/11/12 07:59:26 uebayasi Exp $"); #include "opt_cputype.h" @@ -91,8 +91,6 @@ __KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.77 2010/10/30 17:20:43 uebayasi Exp $"); #include #endif -#define VM_PAGE_TO_MD(pg) (&(pg)->mdpage) - #ifdef PMAPDEBUG #define static /**/ diff --git a/sys/arch/ia64/ia64/pmap.c b/sys/arch/ia64/ia64/pmap.c index 68ef257d75ba..bbb4916be5c6 100644 --- a/sys/arch/ia64/ia64/pmap.c +++ b/sys/arch/ia64/ia64/pmap.c @@ -1,4 +1,4 @@ -/* $NetBSD: pmap.c,v 1.26 2010/11/10 09:27:22 uebayasi Exp $ */ +/* $NetBSD: pmap.c,v 1.27 2010/11/12 07:59:26 uebayasi Exp $ */ /*- @@ -85,7 +85,7 @@ #include -__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.26 2010/11/10 09:27:22 uebayasi Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.27 2010/11/12 07:59:26 uebayasi Exp $"); #include #include @@ -102,8 +102,6 @@ __KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.26 2010/11/10 09:27:22 uebayasi Exp $"); #include #include -#define VM_PAGE_TO_MD(pg) (&(pg)->mdpage) - /* * Kernel virtual memory management. diff --git a/sys/arch/mips/mips/pmap.c b/sys/arch/mips/mips/pmap.c index df7536a2d619..0bc67b755608 100644 --- a/sys/arch/mips/mips/pmap.c +++ b/sys/arch/mips/mips/pmap.c @@ -1,4 +1,4 @@ -/* $NetBSD: pmap.c,v 1.191 2010/11/10 09:27:23 uebayasi Exp $ */ +/* $NetBSD: pmap.c,v 1.192 2010/11/12 07:59:26 uebayasi Exp $ */ /*- * Copyright (c) 1998, 2001 The NetBSD Foundation, Inc. @@ -67,7 +67,7 @@ #include -__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.191 2010/11/10 09:27:23 uebayasi Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.192 2010/11/12 07:59:26 uebayasi Exp $"); /* * Manages physical address maps. @@ -134,8 +134,6 @@ __KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.191 2010/11/10 09:27:23 uebayasi Exp $"); #include #include -#define VM_PAGE_TO_MD(pg) (&(pg)->mdpage) - CTASSERT(MIPS_KSEG0_START < 0); CTASSERT((intptr_t)MIPS_PHYS_TO_KSEG0(0x1000) < 0); CTASSERT(MIPS_KSEG1_START < 0); diff --git a/sys/arch/powerpc/oea/pmap.c b/sys/arch/powerpc/oea/pmap.c index c25ecbee1c27..5e2d02d863f7 100644 --- a/sys/arch/powerpc/oea/pmap.c +++ b/sys/arch/powerpc/oea/pmap.c @@ -1,4 +1,4 @@ -/* $NetBSD: pmap.c,v 1.73 2010/11/10 09:27:23 uebayasi Exp $ */ +/* $NetBSD: pmap.c,v 1.74 2010/11/12 07:59:26 uebayasi Exp $ */ /*- * Copyright (c) 2001 The NetBSD Foundation, Inc. * All rights reserved. @@ -63,7 +63,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.73 2010/11/10 09:27:23 uebayasi Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.74 2010/11/12 07:59:26 uebayasi Exp $"); #define PMAP_NOOPNAMES @@ -91,8 +91,6 @@ __KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.73 2010/11/10 09:27:23 uebayasi Exp $"); #include #include -#define VM_PAGE_TO_MD(pg) (&(pg)->mdpage) - #ifdef ALTIVEC int pmap_use_altivec; #endif diff --git a/sys/arch/powerpc/powerpc/pmap_subr.c b/sys/arch/powerpc/powerpc/pmap_subr.c index 0d2cc82574b5..cd0ea990d53d 100644 --- a/sys/arch/powerpc/powerpc/pmap_subr.c +++ b/sys/arch/powerpc/powerpc/pmap_subr.c @@ -1,4 +1,4 @@ -/* $NetBSD: pmap_subr.c,v 1.24 2010/11/06 11:46:02 uebayasi Exp $ */ +/* $NetBSD: pmap_subr.c,v 1.25 2010/11/12 07:59:27 uebayasi Exp $ */ /*- * Copyright (c) 2001 The NetBSD Foundation, Inc. * All rights reserved. @@ -29,7 +29,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: pmap_subr.c,v 1.24 2010/11/06 11:46:02 uebayasi Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pmap_subr.c,v 1.25 2010/11/12 07:59:27 uebayasi Exp $"); #include "opt_multiprocessor.h" #include "opt_altivec.h" @@ -51,8 +51,6 @@ __KERNEL_RCSID(0, "$NetBSD: pmap_subr.c,v 1.24 2010/11/06 11:46:02 uebayasi Exp #endif #include -#define VM_PAGE_TO_MD(pg) (&(pg)->mdpage) - #define MFMSR() mfmsr() #define MTMSR(psl) __asm volatile("sync; mtmsr %0; isync" :: "r"(psl)) diff --git a/sys/arch/sh3/sh3/pmap.c b/sys/arch/sh3/sh3/pmap.c index 978201ba5da1..1532414a7fa6 100644 --- a/sys/arch/sh3/sh3/pmap.c +++ b/sys/arch/sh3/sh3/pmap.c @@ -1,4 +1,4 @@ -/* $NetBSD: pmap.c,v 1.76 2010/11/10 09:27:24 uebayasi Exp $ */ +/* $NetBSD: pmap.c,v 1.77 2010/11/12 07:59:27 uebayasi Exp $ */ /*- * Copyright (c) 2002 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.76 2010/11/10 09:27:24 uebayasi Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.77 2010/11/12 07:59:27 uebayasi Exp $"); #include #include @@ -43,8 +43,6 @@ __KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.76 2010/11/10 09:27:24 uebayasi Exp $"); #include #include -#define VM_PAGE_TO_MD(pg) (&(pg)->mdpage) - #ifdef DEBUG #define STATIC #else diff --git a/sys/arch/sparc64/sparc64/pmap.c b/sys/arch/sparc64/sparc64/pmap.c index 544f00d65363..2018abb71406 100644 --- a/sys/arch/sparc64/sparc64/pmap.c +++ b/sys/arch/sparc64/sparc64/pmap.c @@ -1,4 +1,4 @@ -/* $NetBSD: pmap.c,v 1.268 2010/11/02 13:09:29 uebayasi Exp $ */ +/* $NetBSD: pmap.c,v 1.269 2010/11/12 07:59:27 uebayasi Exp $ */ /* * * Copyright (C) 1996-1999 Eduardo Horvath. @@ -26,7 +26,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.268 2010/11/02 13:09:29 uebayasi Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.269 2010/11/12 07:59:27 uebayasi Exp $"); #undef NO_VCACHE /* Don't forget the locked TLB in dostart */ #define HWREF @@ -73,8 +73,6 @@ __KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.268 2010/11/02 13:09:29 uebayasi Exp $"); #define db_printf printf #endif -#define VM_PAGE_TO_MD(pg) (&(pg)->mdpage) - #define MEG (1<<20) /* 1MB */ #define KB (1<<10) /* 1KB */ diff --git a/sys/uvm/uvm_page.h b/sys/uvm/uvm_page.h index 0beb98b6caae..e7fecff544d5 100644 --- a/sys/uvm/uvm_page.h +++ b/sys/uvm/uvm_page.h @@ -1,4 +1,4 @@ -/* $NetBSD: uvm_page.h,v 1.65 2010/11/12 05:23:41 uebayasi Exp $ */ +/* $NetBSD: uvm_page.h,v 1.66 2010/11/12 07:59:24 uebayasi Exp $ */ /* * Copyright (c) 1997 Charles D. Cranor and Washington University. @@ -306,6 +306,10 @@ paddr_t uvm_vm_page_to_phys(const struct vm_page *); #define VM_PAGE_TO_PHYS(entry) uvm_vm_page_to_phys(entry) +#ifdef __HAVE_VM_PAGE_MD +#define VM_PAGE_TO_MD(pg) (&(pg)->mdpage) +#endif + /* * Compute the page color bucket for a given page. */