From b9ec7ba93cb8eb72261d377e6bef6e7750c950fb Mon Sep 17 00:00:00 2001 From: Jonathan Matthew Date: Sat, 19 Dec 2020 06:28:43 +0000 Subject: Apply r1.86 of amd64 acpi_machdep.c to arm64 and i386, converting a few uvm_km_valloc(9) to km_alloc(9). tested on arm64 by bluhm@, i386 by me ok kettenis@ --- sys/arch/i386/i386/acpi_machdep.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'sys/arch/i386') diff --git a/sys/arch/i386/i386/acpi_machdep.c b/sys/arch/i386/i386/acpi_machdep.c index ddf4e0730fd..b5319472fe7 100644 --- a/sys/arch/i386/i386/acpi_machdep.c +++ b/sys/arch/i386/i386/acpi_machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: acpi_machdep.c,v 1.74 2020/07/21 03:48:06 deraadt Exp $ */ +/* $OpenBSD: acpi_machdep.c,v 1.75 2020/12/19 06:28:42 jmatthew Exp $ */ /* * Copyright (c) 2005 Thorsten Lockert * @@ -117,7 +117,8 @@ acpi_map(paddr_t pa, size_t len, struct acpi_mem_map *handle) { paddr_t pgpa = trunc_page(pa); paddr_t endpa = round_page(pa + len); - vaddr_t va = uvm_km_valloc(kernel_map, endpa - pgpa); + vaddr_t va = (vaddr_t)km_alloc(endpa - pgpa, &kv_any, &kp_none, + &kd_nowait); if (va == 0) return (ENOMEM); @@ -140,7 +141,7 @@ void acpi_unmap(struct acpi_mem_map *handle) { pmap_kremove(handle->baseva, handle->vsize); - uvm_km_free(kernel_map, handle->baseva, handle->vsize); + km_free((void *)handle->baseva, handle->vsize, &kv_any, &kp_none); } int -- cgit v1.2.3