Put VM_PAGE_TO_MD() definition in one place. No functional changes.

This commit is contained in:
uebayasi 2010-11-12 07:59:24 +00:00
parent 7c913ac77e
commit 4f1dd4067f
11 changed files with 25 additions and 41 deletions

View File

@ -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 <sys/cdefs.h> /* 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 <sys/param.h>
#include <sys/systm.h>
@ -159,8 +159,6 @@ __KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.254 2010/11/10 09:27:21 uebayasi Exp $");
#include <machine/rpb.h>
#endif
#define VM_PAGE_TO_MD(pg) (&(pg)->mdpage)
#ifdef DEBUG
#define PDB_FOLLOW 0x0001
#define PDB_INIT 0x0002

View File

@ -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 <sys/cdefs.h>
__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 <sys/param.h>
#include <sys/conf.h>
@ -92,8 +92,6 @@ __KERNEL_RCSID(0, "$NetBSD: mem.c,v 1.29 2010/11/06 11:46:00 uebayasi Exp $");
#include <uvm/uvm.h>
#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 */

View File

@ -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 <machine/param.h>
#include <arm/arm32/katelib.h>
__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

View File

@ -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 <sys/cdefs.h>
__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 <ddb/db_output.h>
#endif
#define VM_PAGE_TO_MD(pg) (&(pg)->mdpage)
#ifdef PMAPDEBUG
#define static /**/

View File

@ -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 <sys/cdefs.h>
__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 <sys/param.h>
#include <sys/systm.h>
@ -102,8 +102,6 @@ __KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.26 2010/11/10 09:27:22 uebayasi Exp $");
#include <machine/cpufunc.h>
#include <machine/md_var.h>
#define VM_PAGE_TO_MD(pg) (&(pg)->mdpage)
/*
* Kernel virtual memory management.

View File

@ -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 <sys/cdefs.h>
__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 <mips/locore.h>
#include <mips/pte.h>
#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);

View File

@ -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 <sys/cdefs.h>
__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 <powerpc/oea/spr.h>
#include <powerpc/oea/sr_601.h>
#define VM_PAGE_TO_MD(pg) (&(pg)->mdpage)
#ifdef ALTIVEC
int pmap_use_altivec;
#endif

View File

@ -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 <sys/cdefs.h>
__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 <powerpc/psl.h>
#define VM_PAGE_TO_MD(pg) (&(pg)->mdpage)
#define MFMSR() mfmsr()
#define MTMSR(psl) __asm volatile("sync; mtmsr %0; isync" :: "r"(psl))

View File

@ -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 <sys/cdefs.h>
__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 <sys/param.h>
#include <sys/systm.h>
@ -43,8 +43,6 @@ __KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.76 2010/11/10 09:27:24 uebayasi Exp $");
#include <sh3/mmu.h>
#include <sh3/cache.h>
#define VM_PAGE_TO_MD(pg) (&(pg)->mdpage)
#ifdef DEBUG
#define STATIC
#else

View File

@ -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 <sys/cdefs.h>
__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 */

View File

@ -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.
*/