Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/yamt-km]: src/sys/arch/powerpc/powerpc - don't leave page mapping at kva...



details:   https://anonhg.NetBSD.org/src/rev/905cf4d6d232
branches:  yamt-km
changeset: 573309:905cf4d6d232
user:      yamt <yamt%NetBSD.org@localhost>
date:      Fri Jan 28 13:40:26 2005 +0000

description:
- don't leave page mapping at kva which is being freed.
- convert to new apis.

diffstat:

 sys/arch/powerpc/powerpc/bus_dma.c |  9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)

diffs (37 lines):

diff -r ad97f593cb09 -r 905cf4d6d232 sys/arch/powerpc/powerpc/bus_dma.c
--- a/sys/arch/powerpc/powerpc/bus_dma.c        Fri Jan 28 10:37:07 2005 +0000
+++ b/sys/arch/powerpc/powerpc/bus_dma.c        Fri Jan 28 13:40:26 2005 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: bus_dma.c,v 1.20 2004/11/28 17:34:46 thorpej Exp $     */
+/*     $NetBSD: bus_dma.c,v 1.20.6.1 2005/01/28 13:40:26 yamt Exp $    */
 
 /*-
  * Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc.
@@ -38,7 +38,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: bus_dma.c,v 1.20 2004/11/28 17:34:46 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: bus_dma.c,v 1.20.6.1 2005/01/28 13:40:26 yamt Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -648,7 +648,7 @@
 
        size = round_page(size);
 
-       va = uvm_km_valloc(kernel_map, size);
+       va = uvm_km_alloc(kernel_map, size, 0, UVM_KMF_VAONLY);
 
        if (va == 0)
                return (ENOMEM);
@@ -697,7 +697,8 @@
 
        size = round_page(size);
 
-       uvm_km_free(kernel_map, (vaddr_t)kva, size);
+       pmap_kremove((vaddr_t)kva, size);
+       uvm_km_free(kernel_map, (vaddr_t)kva, size, UVM_KMF_VAONLY);
 }
 
 /*



Home | Main Index | Thread Index | Old Index