Since oea pmap.c is #included many times, put kernel_pmap_ptr into

its own source module to avoid multiple initialized data definitions.
This commit is contained in:
pooka 2008-12-11 19:30:14 +00:00
parent 914c0c04ad
commit ea4b11acd2
3 changed files with 8 additions and 4 deletions

View File

@ -1,4 +1,4 @@
# $NetBSD: files.powerpc,v 1.70 2008/11/19 18:36:00 ad Exp $
# $NetBSD: files.powerpc,v 1.71 2008/12/11 19:30:14 pooka Exp $
defflag opt_altivec.h ALTIVEC K_ALTIVEC
defflag opt_openpic.h OPENPIC OPENPIC_SERIAL_MODE
@ -51,6 +51,7 @@ file arch/powerpc/oea/oea_machdep.c ppc_oea | ppc_oea64 | ppc_oea64_bridge | p
file arch/powerpc/oea/pmap.c ppc_oea | ppc_oea601
file arch/powerpc/oea/pmap64.c ppc_oea64
file arch/powerpc/oea/pmap64_bridge.c ppc_oea64_bridge
file arch/powerpc/oea/pmap_kernel.c ppc_oea | ppc_oea64 | ppc_oea64_bridge | ppc_oea601
file arch/powerpc/powerpc/fpu.c ppc_oea | ppc_oea64 | ppc_oea64_bridge | ppc_oea601
file arch/powerpc/powerpc/trap.c ppc_oea | ppc_oea64 | ppc_oea64_bridge | ppc_oea601

View File

@ -1,4 +1,4 @@
/* $NetBSD: pmap.c,v 1.63 2008/12/10 11:10:19 pooka Exp $ */
/* $NetBSD: pmap.c,v 1.64 2008/12/11 19:30:14 pooka 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.63 2008/12/10 11:10:19 pooka Exp $");
__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.64 2008/12/11 19:30:14 pooka Exp $");
#define PMAP_NOOPNAMES
@ -105,7 +105,6 @@ static paddr_t pmap_memlimit = -PAGE_SIZE; /* there is no limit */
#endif
struct pmap kernel_pmap_;
struct pmap *const kernel_pmap_ptr = &kernel_pmap_;
unsigned int pmap_pages_stolen;
u_long pmap_pte_valid;
#if defined(DIAGNOSTIC) || defined(DEBUG) || defined(PMAPCHECK)

View File

@ -0,0 +1,4 @@
#include <sys/param.h>
#include <uvm/uvm_extern.h>
extern struct pmap kernel_pmap_;
struct pmap *const kernel_pmap_ptr = &kernel_pmap_;