Source-Changes-HG archive

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

[src/yamt-km]: src/sys/arch/evbsh3/evbsh3 - use new api.



details:   https://anonhg.NetBSD.org/src/rev/bdc1fa69159d
branches:  yamt-km
changeset: 573343:bdc1fa69159d
user:      yamt <yamt%NetBSD.org@localhost>
date:      Sun Feb 13 10:25:38 2005 +0000

description:
- use new api.
- don't leave pages mapped at kva being freed.

diffstat:

 sys/arch/evbsh3/evbsh3/machdep.c |  10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)

diffs (38 lines):

diff -r 984c54b22beb -r bdc1fa69159d sys/arch/evbsh3/evbsh3/machdep.c
--- a/sys/arch/evbsh3/evbsh3/machdep.c  Sun Feb 13 10:20:49 2005 +0000
+++ b/sys/arch/evbsh3/evbsh3/machdep.c  Sun Feb 13 10:25:38 2005 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: machdep.c,v 1.51 2004/03/24 15:34:48 atatat Exp $      */
+/*     $NetBSD: machdep.c,v 1.51.10.1 2005/02/13 10:25:38 yamt Exp $   */
 
 /*-
  * Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc.
@@ -72,7 +72,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.51 2004/03/24 15:34:48 atatat Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.51.10.1 2005/02/13 10:25:38 yamt Exp $");
 
 #include "opt_ddb.h"
 #include "opt_kgdb.h"
@@ -441,7 +441,7 @@
                panic("sh3_pcmcia_mem_add_mapping: overflow");
 #endif
 
-       va = uvm_km_valloc(kernel_map, endpa - pa);
+       va = uvm_km_alloc(kernel_map, endpa - pa, 0, UVM_KMF_VAONLY);
        if (va == 0){
                printf("shpcmcia_add_mapping: nomem \n");
                return (ENOMEM);
@@ -513,7 +513,9 @@
        /*
         * Free the kernel virtual mapping.
         */
-       uvm_km_free(kernel_map, va, endva - va);
+       pmap_kremove(va, endva - va);
+       pmap_update(pmap_kernel());
+       uvm_km_free(kernel_map, va, endva - va, UVM_KMF_VAONLY);
 
 #if 0
        if (extent_free(ex, bpa, size,



Home | Main Index | Thread Index | Old Index