Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys Move PMAP_KMPAGE to be used in pmap_kenter_pa flags argu...
details: https://anonhg.NetBSD.org/src/rev/7cd9ab717d12
branches: trunk
changeset: 754838:7cd9ab717d12
user: cegger <cegger%NetBSD.org@localhost>
date: Fri May 14 05:02:05 2010 +0000
description:
Move PMAP_KMPAGE to be used in pmap_kenter_pa flags argument.
'Looks good to me' gimpy@
diffstat:
sys/arch/arm/arm32/pmap.c | 14 +++++++-------
sys/kern/kern_malloc_debug.c | 6 +++---
sys/uvm/uvm_km.c | 8 ++++----
sys/uvm/uvm_kmguard.c | 6 +++---
4 files changed, 17 insertions(+), 17 deletions(-)
diffs (153 lines):
diff -r a495367e4436 -r 7cd9ab717d12 sys/arch/arm/arm32/pmap.c
--- a/sys/arch/arm/arm32/pmap.c Fri May 14 03:25:20 2010 +0000
+++ b/sys/arch/arm/arm32/pmap.c Fri May 14 05:02:05 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pmap.c,v 1.212 2010/02/15 07:55:33 skrll Exp $ */
+/* $NetBSD: pmap.c,v 1.213 2010/05/14 05:02:05 cegger Exp $ */
/*
* Copyright 2003 Wasabi Systems, Inc.
@@ -211,7 +211,7 @@
#include <machine/param.h>
#include <arm/arm32/katelib.h>
-__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.212 2010/02/15 07:55:33 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.213 2010/05/14 05:02:05 cegger Exp $");
#ifdef PMAP_DEBUG
@@ -3318,7 +3318,7 @@
struct l2_bucket *l2b;
pt_entry_t *ptep, opte;
#ifdef PMAP_CACHE_VIVT
- struct vm_page *pg = (prot & PMAP_KMPAGE) ? PHYS_TO_VM_PAGE(pa) : NULL;
+ struct vm_page *pg = (flags & PMAP_KMPAGE) ? PHYS_TO_VM_PAGE(pa) : NULL;
#endif
#ifdef PMAP_CACHE_VIPT
struct vm_page *pg = PHYS_TO_VM_PAGE(pa);
@@ -3346,7 +3346,7 @@
if (opg) {
KASSERT(opg != pg);
KASSERT((opg->mdpage.pvh_attrs & PVF_KMPAGE) == 0);
- KASSERT((prot & PMAP_KMPAGE) == 0);
+ KASSERT((flags & PMAP_KMPAGE) == 0);
simple_lock(&opg->mdpage.pvh_slock);
pv = pmap_kremove_pg(opg, va);
simple_unlock(&opg->mdpage.pvh_slock);
@@ -3366,7 +3366,7 @@
PTE_SYNC(ptep);
if (pg) {
- if (prot & PMAP_KMPAGE) {
+ if (flags & PMAP_KMPAGE) {
simple_lock(&pg->mdpage.pvh_slock);
KASSERT(pg->mdpage.urw_mappings == 0);
KASSERT(pg->mdpage.uro_mappings == 0);
@@ -4769,7 +4769,7 @@
*/
KASSERT(SLIST_EMPTY(&pg->mdpage.pvh_list));
pmap_kenter_pa(va, pa,
- VM_PROT_READ|VM_PROT_WRITE|PMAP_KMPAGE, 0);
+ VM_PROT_READ|VM_PROT_WRITE, PMAP_KMPAGE);
#endif
}
@@ -5457,7 +5457,7 @@
paddr_t pa = VM_PAGE_TO_PHYS(m);
pmap_kenter_pa(va, pa,
- VM_PROT_READ|VM_PROT_WRITE|PMAP_KMPAGE, 0);
+ VM_PROT_READ|VM_PROT_WRITE, PMAP_KMPAGE);
/*
* Make sure the L1 descriptor table is mapped
diff -r a495367e4436 -r 7cd9ab717d12 sys/kern/kern_malloc_debug.c
--- a/sys/kern/kern_malloc_debug.c Fri May 14 03:25:20 2010 +0000
+++ b/sys/kern/kern_malloc_debug.c Fri May 14 05:02:05 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: kern_malloc_debug.c,v 1.22 2009/11/07 07:27:49 cegger Exp $ */
+/* $NetBSD: kern_malloc_debug.c,v 1.23 2010/05/14 05:02:06 cegger Exp $ */
/*
* Copyright (c) 1999, 2000 Artur Grabowski <art%openbsd.org@localhost>
@@ -56,7 +56,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: kern_malloc_debug.c,v 1.22 2009/11/07 07:27:49 cegger Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_malloc_debug.c,v 1.23 2010/05/14 05:02:06 cegger Exp $");
#include <sys/param.h>
#include <sys/proc.h>
@@ -156,7 +156,7 @@
splx(s);
pmap_kenter_pa(md->md_va, md->md_pa,
- VM_PROT_READ|VM_PROT_WRITE|PMAP_KMPAGE, 0);
+ VM_PROT_READ|VM_PROT_WRITE, PMAP_KMPAGE);
pmap_update(pmap_kernel());
md->md_size = size;
diff -r a495367e4436 -r 7cd9ab717d12 sys/uvm/uvm_km.c
--- a/sys/uvm/uvm_km.c Fri May 14 03:25:20 2010 +0000
+++ b/sys/uvm/uvm_km.c Fri May 14 05:02:05 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: uvm_km.c,v 1.105 2010/02/08 19:02:33 joerg Exp $ */
+/* $NetBSD: uvm_km.c,v 1.106 2010/05/14 05:02:06 cegger Exp $ */
/*
* Copyright (c) 1997 Charles D. Cranor and Washington University.
@@ -127,7 +127,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uvm_km.c,v 1.105 2010/02/08 19:02:33 joerg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uvm_km.c,v 1.106 2010/05/14 05:02:06 cegger Exp $");
#include "opt_uvmhist.h"
@@ -626,7 +626,7 @@
*/
pmap_kenter_pa(loopva, VM_PAGE_TO_PHYS(pg),
- prot | PMAP_KMPAGE, 0);
+ prot, PMAP_KMPAGE);
loopva += PAGE_SIZE;
offset += PAGE_SIZE;
loopsize -= PAGE_SIZE;
@@ -711,7 +711,7 @@
}
}
pmap_kenter_pa(va, VM_PAGE_TO_PHYS(pg),
- VM_PROT_READ|VM_PROT_WRITE|PMAP_KMPAGE, 0);
+ VM_PROT_READ|VM_PROT_WRITE, PMAP_KMPAGE);
pmap_update(pmap_kernel());
return va;
diff -r a495367e4436 -r 7cd9ab717d12 sys/uvm/uvm_kmguard.c
--- a/sys/uvm/uvm_kmguard.c Fri May 14 03:25:20 2010 +0000
+++ b/sys/uvm/uvm_kmguard.c Fri May 14 05:02:05 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: uvm_kmguard.c,v 1.2 2009/11/07 07:27:49 cegger Exp $ */
+/* $NetBSD: uvm_kmguard.c,v 1.3 2010/05/14 05:02:06 cegger Exp $ */
/*-
* Copyright (c) 2009 The NetBSD Foundation, Inc.
@@ -38,7 +38,7 @@
* - Use-after-free
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uvm_kmguard.c,v 1.2 2009/11/07 07:27:49 cegger Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uvm_kmguard.c,v 1.3 2010/05/14 05:02:06 cegger Exp $");
#include <sys/param.h>
#include <sys/malloc.h>
@@ -150,7 +150,7 @@
pg->flags &= ~PG_BUSY; /* new page */
UVM_PAGE_OWN(pg, NULL);
pmap_kenter_pa(va, VM_PAGE_TO_PHYS(pg),
- VM_PROT_READ | VM_PROT_WRITE | PMAP_KMPAGE, 0);
+ VM_PROT_READ | VM_PROT_WRITE, PMAP_KMPAGE);
pmap_update(pmap_kernel());
/*
Home |
Main Index |
Thread Index |
Old Index