Wed Dec 31 06:54:33 2008 UTC ()
Adjust comments (which were added by me) to sync with m68k/pmap_motorola.c.


(tsutsui)
diff -r1.139 -r1.140 src/sys/arch/amiga/amiga/pmap.c

cvs diff -r1.139 -r1.140 src/sys/arch/amiga/amiga/Attic/pmap.c (expand / switch to unified diff)

--- src/sys/arch/amiga/amiga/Attic/pmap.c 2008/12/19 18:49:38 1.139
+++ src/sys/arch/amiga/amiga/Attic/pmap.c 2008/12/31 06:54:33 1.140
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: pmap.c,v 1.139 2008/12/19 18:49:38 cegger Exp $ */ 1/* $NetBSD: pmap.c,v 1.140 2008/12/31 06:54:33 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.139 2008/12/19 18:49:38 cegger Exp $"); 103__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.140 2008/12/31 06:54:33 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
@@ -332,36 +332,36 @@ void pmap_collect1(pmap_t, paddr_t, pad @@ -332,36 +332,36 @@ void pmap_collect1(pmap_t, paddr_t, pad
332 */ 332 */
333void *CADDR1, *CADDR2; 333void *CADDR1, *CADDR2;
334char *vmmap; 334char *vmmap;
335 335
336#define PAGE_IS_MANAGED(pa) (pmap_initialized \ 336#define PAGE_IS_MANAGED(pa) (pmap_initialized \
337 && vm_physseg_find(atop((pa)), NULL) != -1) 337 && vm_physseg_find(atop((pa)), NULL) != -1)
338 338
339static inline struct pv_entry *pa_to_pvh(paddr_t pa); 339static inline struct pv_entry *pa_to_pvh(paddr_t pa);
340static inline char *pa_to_attribute(paddr_t pa); 340static inline char *pa_to_attribute(paddr_t pa);
341 341
342static inline struct pv_entry * 342static inline struct pv_entry *
343pa_to_pvh(paddr_t pa) 343pa_to_pvh(paddr_t pa)
344{ 344{
345 int bank, pg = 0; /* gcc4 -Wunitialized */ 345 int bank, pg = 0; /* XXX gcc4 -Wuninitialized */
346 346
347 bank = vm_physseg_find(atop((pa)), &pg); 347 bank = vm_physseg_find(atop((pa)), &pg);
348 return &vm_physmem[bank].pmseg.pvent[pg]; 348 return &vm_physmem[bank].pmseg.pvent[pg];
349} 349}
350 350
351static inline char * 351static inline char *
352pa_to_attribute(paddr_t pa) 352pa_to_attribute(paddr_t pa)
353{ 353{
354 int bank, pg = 0; /* gcc4 -Wuninitialized */ 354 int bank, pg = 0; /* XXX gcc4 -Wuninitialized */
355 355
356 bank = vm_physseg_find(atop((pa)), &pg); 356 bank = vm_physseg_find(atop((pa)), &pg);
357 return &vm_physmem[bank].pmseg.attrs[pg]; 357 return &vm_physmem[bank].pmseg.attrs[pg];
358} 358}
359 359
360/* 360/*
361 * Initialize the pmap module. 361 * Initialize the pmap module.
362 * Called by vm_init, to initialize any structures that the pmap 362 * Called by vm_init, to initialize any structures that the pmap
363 * system needs to map virtual memory. 363 * system needs to map virtual memory.
364 */ 364 */
365void 365void
366pmap_init() 366pmap_init()
367{ 367{