Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/arm/arm32 cache pmap in vmapbuf.
details: https://anonhg.NetBSD.org/src/rev/91de2f7f1903
branches: trunk
changeset: 336981:91de2f7f1903
user: matt <matt%NetBSD.org@localhost>
date: Sun Mar 29 09:47:48 2015 +0000
description:
cache pmap in vmapbuf.
diffstat:
sys/arch/arm/arm32/vm_machdep.c | 9 +++++----
1 files changed, 5 insertions(+), 4 deletions(-)
diffs (40 lines):
diff -r 411ed0fc434c -r 91de2f7f1903 sys/arch/arm/arm32/vm_machdep.c
--- a/sys/arch/arm/arm32/vm_machdep.c Sun Mar 29 09:43:26 2015 +0000
+++ b/sys/arch/arm/arm32/vm_machdep.c Sun Mar 29 09:47:48 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: vm_machdep.c,v 1.69 2014/03/10 05:18:34 matt Exp $ */
+/* $NetBSD: vm_machdep.c,v 1.70 2015/03/29 09:47:48 matt Exp $ */
/*
* Copyright (c) 1994-1998 Mark Brinicombe.
@@ -44,7 +44,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: vm_machdep.c,v 1.69 2014/03/10 05:18:34 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vm_machdep.c,v 1.70 2015/03/29 09:47:48 matt Exp $");
#include "opt_armfpe.h"
#include "opt_pmap_debug.h"
@@ -216,9 +216,11 @@
int
vmapbuf(struct buf *bp, vsize_t len)
{
+ struct pmap * const pm = vm_map_pmap(&bp->b_proc->p_vmspace->vm_map);
vaddr_t faddr, taddr, off;
paddr_t fpa;
+ KASSERT(pm != pmap_kernel());
#ifdef PMAP_DEBUG
if (pmap_debug_level > 0)
@@ -242,8 +244,7 @@
* non-NULL.
*/
while (len) {
- (void) pmap_extract(vm_map_pmap(&bp->b_proc->p_vmspace->vm_map),
- faddr, &fpa);
+ (void) pmap_extract(pm, faddr, &fpa);
pmap_kenter_pa(taddr, fpa, VM_PROT_READ|VM_PROT_WRITE,
PMAP_WIRED);
faddr += PAGE_SIZE;
Home |
Main Index |
Thread Index |
Old Index