summaryrefslogtreecommitdiff
path: root/sys/arch/amd64
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@cvs.openbsd.org>2018-10-23 17:51:33 +0000
committerMark Kettenis <kettenis@cvs.openbsd.org>2018-10-23 17:51:33 +0000
commit09e1139ec1a83a86f069a5c5b9f33ae342a0b443 (patch)
treef079582b40befba69944c21437b2956e88d9fa8d /sys/arch/amd64
parentc8096d374cfdc6230fefe96a87324cb6bd599cf8 (diff)
Comvert a few uvm_km_alloc(9) and uvm_km_valloc(9) calls to km_alloc(9).
ok deraadt@, mlarkin@, visa@
Diffstat (limited to 'sys/arch/amd64')
-rw-r--r--sys/arch/amd64/amd64/acpi_machdep.c7
-rw-r--r--sys/arch/amd64/amd64/bios.c4
-rw-r--r--sys/arch/amd64/amd64/cpu.c4
3 files changed, 8 insertions, 7 deletions
diff --git a/sys/arch/amd64/amd64/acpi_machdep.c b/sys/arch/amd64/amd64/acpi_machdep.c
index f136f0743d4..ca9016c192f 100644
--- a/sys/arch/amd64/amd64/acpi_machdep.c
+++ b/sys/arch/amd64/amd64/acpi_machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: acpi_machdep.c,v 1.85 2018/08/19 08:23:47 kettenis Exp $ */
+/* $OpenBSD: acpi_machdep.c,v 1.86 2018/10/23 17:51:32 kettenis Exp $ */
/*
* Copyright (c) 2005 Thorsten Lockert <tholo@sigmasoft.com>
*
@@ -106,7 +106,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);
@@ -129,7 +130,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
diff --git a/sys/arch/amd64/amd64/bios.c b/sys/arch/amd64/amd64/bios.c
index 7132d5bb57c..e4076a9c678 100644
--- a/sys/arch/amd64/amd64/bios.c
+++ b/sys/arch/amd64/amd64/bios.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: bios.c,v 1.36 2018/04/28 15:44:59 jasper Exp $ */
+/* $OpenBSD: bios.c,v 1.37 2018/10/23 17:51:32 kettenis Exp $ */
/*
* Copyright (c) 2006 Gordon Willem Klok <gklok@cogeco.ca>
*
@@ -108,7 +108,7 @@ bios_attach(struct device *parent, struct device *self, void *aux)
if (hdr != NULL) {
pa = trunc_page(hdr->addr);
end = round_page(hdr->addr + hdr->size);
- va = uvm_km_valloc(kernel_map, end-pa);
+ va = (vaddr_t)km_alloc(end - pa, &kv_any, &kp_none, &kd_nowait);
if (va == 0)
goto out;
diff --git a/sys/arch/amd64/amd64/cpu.c b/sys/arch/amd64/amd64/cpu.c
index 14ef556ecc6..0d1b11cd824 100644
--- a/sys/arch/amd64/amd64/cpu.c
+++ b/sys/arch/amd64/amd64/cpu.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cpu.c,v 1.129 2018/10/04 05:00:40 guenther Exp $ */
+/* $OpenBSD: cpu.c,v 1.130 2018/10/23 17:51:32 kettenis Exp $ */
/* $NetBSD: cpu.c,v 1.1 2003/04/26 18:39:26 fvdl Exp $ */
/*-
@@ -417,7 +417,7 @@ cpu_attach(struct device *parent, struct device *self, void *aux)
/*
* Allocate UPAGES contiguous pages for the idle PCB and stack.
*/
- kstack = uvm_km_alloc (kernel_map, USPACE);
+ kstack = (vaddr_t)km_alloc(USPACE, &kv_any, &kp_dirty, &kd_nowait);
if (kstack == 0) {
if (caa->cpu_role != CPU_ROLE_AP) {
panic("cpu_attach: unable to allocate idle stack for"