Thu Jan 1 08:11:45 2009 UTC ()
Remove declarations of CADDR1, CADDR2, and vmmap.
These variables have been moved into pmap_bootstrap.c
and <m68k/pmap_motorola.h> has extern decls for them.


(tsutsui)
diff -r1.111 -r1.112 src/sys/arch/atari/atari/pmap.c

cvs diff -r1.111 -r1.112 src/sys/arch/atari/atari/Attic/pmap.c (expand / switch to unified diff)

--- src/sys/arch/atari/atari/Attic/pmap.c 2009/01/01 04:10:25 1.111
+++ src/sys/arch/atari/atari/Attic/pmap.c 2009/01/01 08:11:45 1.112
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: pmap.c,v 1.111 2009/01/01 04:10:25 tsutsui Exp $ */ 1/* $NetBSD: pmap.c,v 1.112 2009/01/01 08:11:45 tsutsui Exp $ */
2 2
3/*- 3/*-
4 * Copyright (c) 1999 The NetBSD Foundation, Inc. 4 * Copyright (c) 1999 The NetBSD Foundation, Inc.
5 * All rights reserved. 5 * All rights reserved.
6 * 6 *
7 * This code is derived from software contributed to The NetBSD Foundation 7 * This code is derived from software contributed to The NetBSD Foundation
8 * by Jason R. Thorpe. 8 * by Jason R. Thorpe.
9 * 9 *
10 * Redistribution and use in source and binary forms, with or without 10 * Redistribution and use in source and binary forms, with or without
11 * modification, are permitted provided that the following conditions 11 * modification, are permitted provided that the following conditions
12 * are met: 12 * are met:
13 * 1. Redistributions of source code must retain the above copyright 13 * 1. Redistributions of source code must retain the above copyright
14 * notice, this list of conditions and the following disclaimer. 14 * notice, this list of conditions and the following disclaimer.
@@ -90,27 +90,27 @@ @@ -90,27 +90,27 @@
90 * of virtual-to-physical mappings must be done as 90 * of virtual-to-physical mappings must be done as
91 * requested. 91 * requested.
92 * 92 *
93 * In order to cope with hardware architectures which 93 * In order to cope with hardware architectures which
94 * make virtual-to-physical map invalidates expensive, 94 * make virtual-to-physical map invalidates expensive,
95 * this module may delay invalidate or reduced protection 95 * this module may delay invalidate or reduced protection
96 * operations until such time as they are actually 96 * operations until such time as they are actually
97 * necessary. This module is given full information as 97 * necessary. This module is given full information as
98 * to which processors are currently using which maps, 98 * to which processors are currently using which maps,
99 * and to when physical maps must be made correct. 99 * and to when physical maps must be made correct.
100 */ 100 */
101 101
102#include <sys/cdefs.h> 102#include <sys/cdefs.h>
103__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.111 2009/01/01 04:10:25 tsutsui Exp $"); 103__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.112 2009/01/01 08:11:45 tsutsui Exp $");
104 104
105#include <sys/param.h> 105#include <sys/param.h>
106#include <sys/systm.h> 106#include <sys/systm.h>
107#include <sys/proc.h> 107#include <sys/proc.h>
108#include <sys/malloc.h> 108#include <sys/malloc.h>
109#include <sys/user.h> 109#include <sys/user.h>
110 110
111#include <uvm/uvm.h> 111#include <uvm/uvm.h>
112 112
113#include <machine/pte.h> 113#include <machine/pte.h>
114#include <machine/cpu.h> 114#include <machine/cpu.h>
115#include <machine/vmparam.h> 115#include <machine/vmparam.h>
116 116
@@ -306,32 +306,26 @@ static void pmap_changebit(vaddr_t, int, @@ -306,32 +306,26 @@ static void pmap_changebit(vaddr_t, int,
306struct pv_entry * pmap_alloc_pv(void); 306struct pv_entry * pmap_alloc_pv(void);
307void pmap_free_pv(struct pv_entry *); 307void pmap_free_pv(struct pv_entry *);
308void pmap_pinit(pmap_t); 308void pmap_pinit(pmap_t);
309void pmap_release(pmap_t); 309void pmap_release(pmap_t);
310static void pmap_remove_mapping(pmap_t, vaddr_t, pt_entry_t *, int); 310static void pmap_remove_mapping(pmap_t, vaddr_t, pt_entry_t *, int);
311 311
312void pmap_collect1(pmap_t, paddr_t, paddr_t); 312void pmap_collect1(pmap_t, paddr_t, paddr_t);
313 313
314/* pmap_remove_mapping flags */ 314/* pmap_remove_mapping flags */
315#define PRM_TFLUSH 0x01 315#define PRM_TFLUSH 0x01
316#define PRM_CFLUSH 0x02 316#define PRM_CFLUSH 0x02
317#define PRM_KEEPPTPAGE 0x04 317#define PRM_KEEPPTPAGE 0x04
318 318
319/* 
320 * All those kernel PT submaps that BSD is so fond of 
321 */ 
322void *CADDR1, *CADDR2; 
323char *vmmap; 
324 
325#define PAGE_IS_MANAGED(pa) (pmap_initialized \ 319#define PAGE_IS_MANAGED(pa) (pmap_initialized \
326 && vm_physseg_find(atop((pa)), NULL) != -1) 320 && vm_physseg_find(atop((pa)), NULL) != -1)
327 321
328static inline struct pv_entry *pa_to_pvh(paddr_t pa); 322static inline struct pv_entry *pa_to_pvh(paddr_t pa);
329static inline char *pa_to_attribute(paddr_t pa); 323static inline char *pa_to_attribute(paddr_t pa);
330 324
331static inline struct pv_entry * 325static inline struct pv_entry *
332pa_to_pvh(paddr_t pa) 326pa_to_pvh(paddr_t pa)
333{ 327{
334 int bank, pg = 0; /* XXX gcc4 -Wuninitialized */ 328 int bank, pg = 0; /* XXX gcc4 -Wuninitialized */
335 329
336 bank = vm_physseg_find(atop((pa)), &pg); 330 bank = vm_physseg_find(atop((pa)), &pg);
337 return &vm_physmem[bank].pmseg.pvent[pg]; 331 return &vm_physmem[bank].pmseg.pvent[pg];