Tue Nov 2 06:07:06 2010 UTC ()
Fix build of evbarm.


(uebayasi)
diff -r1.27 -r1.28 src/sys/arch/arm/arm32/mem.c
diff -r1.95 -r1.96 src/sys/arch/arm/include/arm32/pmap.h

cvs diff -r1.27 -r1.28 src/sys/arch/arm/arm32/Attic/mem.c (expand / switch to unified diff)

--- src/sys/arch/arm/arm32/Attic/mem.c 2010/10/30 18:35:38 1.27
+++ src/sys/arch/arm/arm32/Attic/mem.c 2010/11/02 06:07:05 1.28
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: mem.c,v 1.27 2010/10/30 18:35:38 uebayasi Exp $ */ 1/* $NetBSD: mem.c,v 1.28 2010/11/02 06:07:05 uebayasi Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 1982, 1986, 1990, 1993 4 * Copyright (c) 1982, 1986, 1990, 1993
5 * The Regents of the University of California. All rights reserved. 5 * The Regents of the University of California. All rights reserved.
6 * 6 *
7 * This code is derived from software contributed to Berkeley by 7 * This code is derived from software contributed to Berkeley by
8 * the Systems Programming Group of the University of Utah Computer 8 * the Systems Programming Group of the University of Utah Computer
9 * Science Department. 9 * Science Department.
10 * 10 *
11 * Redistribution and use in source and binary forms, with or without 11 * Redistribution and use in source and binary forms, with or without
12 * modification, are permitted provided that the following conditions 12 * modification, are permitted provided that the following conditions
13 * are met: 13 * are met:
14 * 1. Redistributions of source code must retain the above copyright 14 * 1. Redistributions of source code must retain the above copyright
@@ -66,27 +66,27 @@ @@ -66,27 +66,27 @@
66 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 66 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
67 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 67 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
68 * SUCH DAMAGE. 68 * SUCH DAMAGE.
69 */ 69 */
70 70
71/* 71/*
72 * Memory special file 72 * Memory special file
73 */ 73 */
74 74
75#include "opt_arm32_pmap.h" 75#include "opt_arm32_pmap.h"
76#include "opt_compat_netbsd.h" 76#include "opt_compat_netbsd.h"
77 77
78#include <sys/cdefs.h> 78#include <sys/cdefs.h>
79__KERNEL_RCSID(0, "$NetBSD: mem.c,v 1.27 2010/10/30 18:35:38 uebayasi Exp $"); 79__KERNEL_RCSID(0, "$NetBSD: mem.c,v 1.28 2010/11/02 06:07:05 uebayasi Exp $");
80 80
81#include <sys/param.h> 81#include <sys/param.h>
82#include <sys/conf.h> 82#include <sys/conf.h>
83#include <sys/buf.h> 83#include <sys/buf.h>
84#include <sys/systm.h> 84#include <sys/systm.h>
85#include <sys/uio.h> 85#include <sys/uio.h>
86#include <sys/malloc.h> 86#include <sys/malloc.h>
87#include <sys/proc.h> 87#include <sys/proc.h>
88#include <sys/fcntl.h> 88#include <sys/fcntl.h>
89#include <sys/kauth.h> 89#include <sys/kauth.h>
90 90
91#include <machine/cpu.h> 91#include <machine/cpu.h>
92 92
@@ -136,27 +136,27 @@ mmrw(dev_t dev, struct uio *uio, int fla @@ -136,27 +136,27 @@ mmrw(dev_t dev, struct uio *uio, int fla
136 continue; 136 continue;
137 } 137 }
138 switch (minor(dev)) { 138 switch (minor(dev)) {
139 139
140 case DEV_MEM: 140 case DEV_MEM:
141 v = uio->uio_offset; 141 v = uio->uio_offset;
142 prot = uio->uio_rw == UIO_READ ? VM_PROT_READ : 142 prot = uio->uio_rw == UIO_READ ? VM_PROT_READ :
143 VM_PROT_WRITE; 143 VM_PROT_WRITE;
144 m = memhook; 144 m = memhook;
145#ifdef PMAP_CACHE_VIPT 145#ifdef PMAP_CACHE_VIPT
146 { 146 {
147 struct vm_page *pg; 147 struct vm_page *pg;
148 pg = PHYS_TO_VM_PAGE(trunc_page(v)); 148 pg = PHYS_TO_VM_PAGE(trunc_page(v));
149 if (pg != NULL && pmap_is_page_colored_p(pg)) 149 if (pg != NULL && pmap_is_page_colored_p(VM_PAGE_TO_MD(pg)))
150 o = VM_PAGE_TO_MD(pg)->pvh_attrs; 150 o = VM_PAGE_TO_MD(pg)->pvh_attrs;
151 else 151 else
152 o = v; 152 o = v;
153 m += o & arm_cache_prefer_mask; 153 m += o & arm_cache_prefer_mask;
154 } 154 }
155#endif 155#endif
156 mutex_enter(&memlock); 156 mutex_enter(&memlock);
157 pmap_enter(pmap_kernel(), m, 157 pmap_enter(pmap_kernel(), m,
158 trunc_page(v), prot, prot|PMAP_WIRED); 158 trunc_page(v), prot, prot|PMAP_WIRED);
159 pmap_update(pmap_kernel()); 159 pmap_update(pmap_kernel());
160 o = uio->uio_offset & PGOFSET; 160 o = uio->uio_offset & PGOFSET;
161 c = min(uio->uio_resid, (int)(PAGE_SIZE - o)); 161 c = min(uio->uio_resid, (int)(PAGE_SIZE - o));
162 error = uiomove((char *)m + o, c, uio); 162 error = uiomove((char *)m + o, c, uio);

cvs diff -r1.95 -r1.96 src/sys/arch/arm/include/arm32/pmap.h (expand / switch to unified diff)

--- src/sys/arch/arm/include/arm32/pmap.h 2010/06/16 22:06:53 1.95
+++ src/sys/arch/arm/include/arm32/pmap.h 2010/11/02 06:07:06 1.96
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: pmap.h,v 1.95 2010/06/16 22:06:53 jmcneill Exp $ */ 1/* $NetBSD: pmap.h,v 1.96 2010/11/02 06:07:06 uebayasi Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 2002, 2003 Wasabi Systems, Inc. 4 * Copyright (c) 2002, 2003 Wasabi Systems, Inc.
5 * All rights reserved. 5 * All rights reserved.
6 * 6 *
7 * Written by Jason R. Thorpe & Steve C. Woodford for Wasabi Systems, Inc. 7 * Written by Jason R. Thorpe & Steve C. Woodford for Wasabi Systems, Inc.
8 * 8 *
9 * Redistribution and use in source and binary forms, with or without 9 * Redistribution and use in source and binary forms, with or without
10 * modification, are permitted provided that the following conditions 10 * modification, are permitted provided that the following conditions
11 * are met: 11 * are met:
12 * 1. Redistributions of source code must retain the above copyright 12 * 1. Redistributions of source code must retain the above copyright
13 * notice, this list of conditions and the following disclaimer. 13 * notice, this list of conditions and the following disclaimer.
14 * 2. Redistributions in binary form must reproduce the above copyright 14 * 2. Redistributions in binary form must reproduce the above copyright
@@ -262,28 +262,28 @@ extern pv_addr_t kernel_l1pt; @@ -262,28 +262,28 @@ extern pv_addr_t kernel_l1pt;
262 */ 262 */
263extern int pmap_debug_level; /* Only exists if PMAP_DEBUG */ 263extern int pmap_debug_level; /* Only exists if PMAP_DEBUG */
264 264
265/* 265/*
266 * Macros that we need to export 266 * Macros that we need to export
267 */ 267 */
268#define pmap_resident_count(pmap) ((pmap)->pm_stats.resident_count) 268#define pmap_resident_count(pmap) ((pmap)->pm_stats.resident_count)
269#define pmap_wired_count(pmap) ((pmap)->pm_stats.wired_count) 269#define pmap_wired_count(pmap) ((pmap)->pm_stats.wired_count)
270 270
271#define pmap_is_modified(pg) \ 271#define pmap_is_modified(pg) \
272 (((pg)->mdpage.pvh_attrs & PVF_MOD) != 0) 272 (((pg)->mdpage.pvh_attrs & PVF_MOD) != 0)
273#define pmap_is_referenced(pg) \ 273#define pmap_is_referenced(pg) \
274 (((pg)->mdpage.pvh_attrs & PVF_REF) != 0) 274 (((pg)->mdpage.pvh_attrs & PVF_REF) != 0)
275#define pmap_is_page_colored_p(pg) \ 275#define pmap_is_page_colored_p(md) \
276 (((pg)->mdpage.pvh_attrs & PVF_COLORED) != 0) 276 (((md)->pvh_attrs & PVF_COLORED) != 0)
277 277
278#define pmap_copy(dp, sp, da, l, sa) /* nothing */ 278#define pmap_copy(dp, sp, da, l, sa) /* nothing */
279 279
280#define pmap_phys_address(ppn) (arm_ptob((ppn))) 280#define pmap_phys_address(ppn) (arm_ptob((ppn)))
281 281
282/* 282/*
283 * Functions that we need to export 283 * Functions that we need to export
284 */ 284 */
285void pmap_procwr(struct proc *, vaddr_t, int); 285void pmap_procwr(struct proc *, vaddr_t, int);
286void pmap_remove_all(pmap_t); 286void pmap_remove_all(pmap_t);
287bool pmap_extract(pmap_t, vaddr_t, paddr_t *); 287bool pmap_extract(pmap_t, vaddr_t, paddr_t *);
288 288
289#define PMAP_NEED_PROCWR 289#define PMAP_NEED_PROCWR