From 31fae585fe2d26278499c95d0f10ee35d33c7afd Mon Sep 17 00:00:00 2001 From: kettenis Date: Sun, 6 Mar 2022 12:16:27 +0000 Subject: [PATCH] Convert KVA allocation to km_alloc(9). ok mpi@ --- sys/arch/arm/armv7/armv7_space.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/sys/arch/arm/armv7/armv7_space.c b/sys/arch/arm/armv7/armv7_space.c index da3f875a253..9d52adbea7c 100644 --- a/sys/arch/arm/armv7/armv7_space.c +++ b/sys/arch/arm/armv7/armv7_space.c @@ -1,4 +1,4 @@ -/* $OpenBSD: armv7_space.c,v 1.10 2018/03/20 23:04:48 patrick Exp $ */ +/* $OpenBSD: armv7_space.c,v 1.11 2022/03/06 12:16:27 kettenis Exp $ */ /* * Copyright (c) 2001, 2002 Wasabi Systems, Inc. @@ -178,8 +178,8 @@ armv7_bs_map(void *t, uint64_t bpa, bus_size_t size, /* XXX use extent manager to check duplicate mapping */ - va = uvm_km_valloc(kernel_map, endpa - startpa); - if (! va) + va = (vaddr_t)km_alloc(endpa - startpa, &kv_any, &kp_none, &kd_nowait); + if (va == 0) return(ENOMEM); *bshp = (bus_space_handle_t)(va + (bpa - startpa)); @@ -204,9 +204,9 @@ armv7_bs_unmap(void *t, bus_space_handle_t bsh, bus_size_t size) pmap_kremove(va, endva - va); pmap_update(pmap_kernel()); - uvm_km_free(kernel_map, bsh, size); -} + km_free((void *)va, endva - va, &kv_any, &kp_none); +} int armv7_bs_subregion(void *t, bus_space_handle_t bsh, bus_size_t offset, -- 2.20.1