Module Name:    src
Committed By:   flxd
Date:           Sun Oct  8 12:09:44 UTC 2017

Modified Files:
        src/sys/arch/arm/arm32: vm_machdep.c

Log Message:
In vmapbuf use pmap_enter(pmap_kernel(), ...) and not pmap_kenter_pa as the
former handles multiple mappings for VIPT AND VIVT correctly whereas the latter
doesn't work for VIVT. PR port-shark/52102
>From skrll@. Tested by martin@ and me.


To generate a diff of this commit:
cvs rdiff -u -r1.70 -r1.71 src/sys/arch/arm/arm32/vm_machdep.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/arm/arm32/vm_machdep.c
diff -u src/sys/arch/arm/arm32/vm_machdep.c:1.70 src/sys/arch/arm/arm32/vm_machdep.c:1.71
--- src/sys/arch/arm/arm32/vm_machdep.c:1.70	Sun Mar 29 09:47:48 2015
+++ src/sys/arch/arm/arm32/vm_machdep.c	Sun Oct  8 12:09:44 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: vm_machdep.c,v 1.70 2015/03/29 09:47:48 matt Exp $	*/
+/*	$NetBSD: vm_machdep.c,v 1.71 2017/10/08 12:09:44 flxd Exp $	*/
 
 /*
  * Copyright (c) 1994-1998 Mark Brinicombe.
@@ -44,7 +44,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: vm_machdep.c,v 1.70 2015/03/29 09:47:48 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vm_machdep.c,v 1.71 2017/10/08 12:09:44 flxd Exp $");
 
 #include "opt_armfpe.h"
 #include "opt_pmap_debug.h"
@@ -245,7 +245,7 @@ vmapbuf(struct buf *bp, vsize_t len)
 	 */
 	while (len) {
 		(void) pmap_extract(pm, faddr, &fpa);
-		pmap_kenter_pa(taddr, fpa, VM_PROT_READ|VM_PROT_WRITE,
+		pmap_enter(pmap_kernel(), taddr, fpa, VM_PROT_READ|VM_PROT_WRITE,
 		    PMAP_WIRED);
 		faddr += PAGE_SIZE;
 		taddr += PAGE_SIZE;
@@ -281,7 +281,7 @@ vunmapbuf(struct buf *bp, vsize_t len)
 	off = (vaddr_t)bp->b_data - addr;
 	len = round_page(off + len);
 
-	pmap_kremove(addr, len);
+	pmap_remove(pmap_kernel(), addr, len);
 	pmap_update(pmap_kernel());
 	uvm_km_free(phys_map, addr, len, UVM_KMF_VAONLY);
 	bp->b_data = bp->b_saveaddr;

Reply via email to