Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/evbarm/fdt Actually release the VA in fdt_unmap_range



details:   https://anonhg.NetBSD.org/src/rev/5fff7358465b
branches:  trunk
changeset: 371232:5fff7358465b
user:      skrll <skrll%NetBSD.org@localhost>
date:      Fri Sep 30 06:39:54 2022 +0000

description:
Actually release the VA in fdt_unmap_range

diffstat:

 sys/arch/evbarm/fdt/fdt_machdep.c |  9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)

diffs (32 lines):

diff -r 8637381f5f89 -r 5fff7358465b sys/arch/evbarm/fdt/fdt_machdep.c
--- a/sys/arch/evbarm/fdt/fdt_machdep.c Fri Sep 30 06:36:28 2022 +0000
+++ b/sys/arch/evbarm/fdt/fdt_machdep.c Fri Sep 30 06:39:54 2022 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: fdt_machdep.c,v 1.94 2022/09/30 06:36:28 skrll Exp $ */
+/* $NetBSD: fdt_machdep.c,v 1.95 2022/09/30 06:39:54 skrll Exp $ */
 
 /*-
  * Copyright (c) 2015-2017 Jared McNeill <jmcneill%invisible.ca@localhost>
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: fdt_machdep.c,v 1.94 2022/09/30 06:36:28 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: fdt_machdep.c,v 1.95 2022/09/30 06:39:54 skrll Exp $");
 
 #include "opt_arm_debug.h"
 #include "opt_bootconfig.h"
@@ -342,9 +342,12 @@
        const char *start = ptr, *end = start + size;
        const vaddr_t startva = trunc_page((vaddr_t)(uintptr_t)start);
        const vaddr_t endva = round_page((vaddr_t)(uintptr_t)end);
+       const vsize_t sz = endva - startva;
 
-       pmap_kremove(startva, endva - startva);
+       pmap_kremove(startva, sz);
        pmap_update(pmap_kernel());
+
+       uvm_km_free(kernel_map, startva, sz, UVM_KMF_VAONLY);
 }
 
 static void



Home | Main Index | Thread Index | Old Index