Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch Slight adjustment to last; move pmap_kenter_pa() to...
details: https://anonhg.NetBSD.org/src/rev/5a81f73f4e52
branches: trunk
changeset: 474965:5a81f73f4e52
user: thorpej <thorpej%NetBSD.org@localhost>
date: Wed Jul 28 01:17:01 1999 +0000
description:
Slight adjustment to last; move pmap_kenter_pa() to where the other
pmap_k* functions are.
diffstat:
sys/arch/i386/i386/pmap.c | 61 ++++++++++++++++++--------------------------
sys/arch/pc532/pc532/pmap.c | 61 ++++++++++++++++++--------------------------
2 files changed, 50 insertions(+), 72 deletions(-)
diffs (164 lines):
diff -r 41d2900b503f -r 5a81f73f4e52 sys/arch/i386/i386/pmap.c
--- a/sys/arch/i386/i386/pmap.c Wed Jul 28 01:07:52 1999 +0000
+++ b/sys/arch/i386/i386/pmap.c Wed Jul 28 01:17:01 1999 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pmap.c,v 1.75 1999/07/28 01:07:58 thorpej Exp $ */
+/* $NetBSD: pmap.c,v 1.76 1999/07/28 01:17:01 thorpej Exp $ */
/*
*
@@ -599,9 +599,30 @@
* => should be faster than normal pmap enter function
*/
-/*
- * resides in pmap.h
- */
+void
+pmap_kenter_pa(va, pa, prot)
+ vaddr_t va;
+ paddr_t pa;
+ vm_prot_t prot;
+{
+ struct pmap *pm = pmap_kernel();
+ pt_entry_t *pte, opte;
+ int s;
+
+ s = splimp();
+ simple_lock(&pm->pm_obj.vmobjlock);
+ pm->pm_stats.resident_count++;
+ pm->pm_stats.wired_count++;
+ simple_unlock(&pm->pm_obj.vmobjlock);
+ splx(s);
+
+ pte = vtopte(va);
+ opte = *pte;
+ *pte = pa | ((prot & VM_PROT_WRITE)? PG_RW : PG_RO) |
+ PG_V | pmap_pg_g; /* zap! */
+ if (pmap_valid_entry(opte))
+ pmap_update_pg(va);
+}
/*
* pmap_kremove: remove a kernel mapping(s) without R/M (pv_entry) tracking
@@ -3543,38 +3564,6 @@
}
/*
- * pmap_kenter_pa: enter a kernel mapping without R/M (pv_entry) tracking
- *
- * => no need to lock anything, assume va is already allocated
- * => should be faster than normal pmap enter function
- */
-
-void
-pmap_kenter_pa(va, pa, prot)
- vaddr_t va;
- paddr_t pa;
- vm_prot_t prot;
-{
- struct pmap *pm = pmap_kernel();
- pt_entry_t *pte, opte;
- int s;
-
- s = splimp();
- simple_lock(&pm->pm_obj.vmobjlock);
- pm->pm_stats.resident_count++;
- pm->pm_stats.wired_count++;
- simple_unlock(&pm->pm_obj.vmobjlock);
- splx(s);
-
- pte = vtopte(va);
- opte = *pte;
- *pte = pa | ((prot & VM_PROT_WRITE)? PG_RW : PG_RO) |
- PG_V | pmap_pg_g; /* zap! */
- if (pmap_valid_entry(opte))
- pmap_update_pg(va);
-}
-
-/*
* pmap_growkernel: increase usage of KVM space
*
* => we allocate new PTPs for the kernel and install them in all
diff -r 41d2900b503f -r 5a81f73f4e52 sys/arch/pc532/pc532/pmap.c
--- a/sys/arch/pc532/pc532/pmap.c Wed Jul 28 01:07:52 1999 +0000
+++ b/sys/arch/pc532/pc532/pmap.c Wed Jul 28 01:17:01 1999 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pmap.c,v 1.41 1999/07/28 01:07:52 thorpej Exp $ */
+/* $NetBSD: pmap.c,v 1.42 1999/07/28 01:17:03 thorpej Exp $ */
/*
*
@@ -578,9 +578,30 @@
* => should be faster than normal pmap enter function
*/
-/*
- * resides in pmap.h
- */
+void
+pmap_kenter_pa(va, pa, prot)
+ vaddr_t va;
+ paddr_t pa;
+ vm_prot_t prot;
+{
+ struct pmap *pm = pmap_kernel();
+ pt_entry_t *pte, opte;
+ int s;
+
+ s = splimp();
+ simple_lock(&pm->pm_obj.vmobjlock);
+ pm->pm_stats.resident_count++;
+ pm->pm_stats.wired_count++;
+ simple_unlock(&pm->pm_obj.vmobjlock);
+ splx(s);
+
+ pte = vtopte(va);
+ opte = *pte;
+ *pte = pa | ((prot & VM_PROT_WRITE)? PG_RW : PG_RO) |
+ PG_V; /* zap! */
+ if (pmap_valid_entry(opte))
+ pmap_update_pg(va);
+}
/*
* pmap_kremove: remove a kernel mapping(s) without R/M (pv_entry) tracking
@@ -3308,38 +3329,6 @@
}
/*
- * pmap_kenter_pa: enter a kernel mapping without R/M (pv_entry) tracking
- *
- * => no need to lock anything, assume va is already allocated
- * => should be faster than normal pmap enter function
- */
-
-void
-pmap_kenter_pa(va, pa, prot)
- vaddr_t va;
- paddr_t pa;
- vm_prot_t prot;
-{
- struct pmap *pm = pmap_kernel();
- pt_entry_t *pte, opte;
- int s;
-
- s = splimp();
- simple_lock(&pm->pm_obj.vmobjlock);
- pm->pm_stats.resident_count++;
- pm->pm_stats.wired_count++;
- simple_unlock(&pm->pm_obj.vmobjlock);
- splx(s);
-
- pte = vtopte(va);
- opte = *pte;
- *pte = pa | ((prot & VM_PROT_WRITE)? PG_RW : PG_RO) |
- PG_V; /* zap! */
- if (pmap_valid_entry(opte))
- pmap_update_pg(va);
-}
-
-/*
* pmap_growkernel: increase usage of KVM space
*
* => we allocate new PTPs for the kernel and install them in all
Home |
Main Index |
Thread Index |
Old Index