summaryrefslogtreecommitdiff
path: root/sys/arch/i386
diff options
context:
space:
mode:
authorJonathan Matthew <jmatthew@cvs.openbsd.org>2020-12-19 06:28:43 +0000
committerJonathan Matthew <jmatthew@cvs.openbsd.org>2020-12-19 06:28:43 +0000
commitb9ec7ba93cb8eb72261d377e6bef6e7750c950fb (patch)
treef2725725e48921837d9ab98dda83b09afcb27ffe /sys/arch/i386
parent9cb12812280d4471ba70f0f1d14761fe781f291d (diff)
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@
Diffstat (limited to 'sys/arch/i386')
-rw-r--r--sys/arch/i386/i386/acpi_machdep.c7
1 files changed, 4 insertions, 3 deletions
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 <tholo@sigmasoft.com>
*
@@ -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