summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@cvs.openbsd.org>2009-01-22 22:41:43 +0000
committerMark Kettenis <kettenis@cvs.openbsd.org>2009-01-22 22:41:43 +0000
commit372e335d1e768b84323d869a513e8269d220779d (patch)
tree823caf3417ced2e1a9cddf33251db1f8ef00b508 /sys
parent7e043f6178590949bf55377c4e9b962779329801 (diff)
Make bus_mem_add_mapping() return ENOMEM if we fail to allocate kva instead
of panicing. ok drahn@
Diffstat (limited to 'sys')
-rw-r--r--sys/arch/macppc/macppc/machdep.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/sys/arch/macppc/macppc/machdep.c b/sys/arch/macppc/macppc/machdep.c
index f44acf2b272..67005512a79 100644
--- a/sys/arch/macppc/macppc/machdep.c
+++ b/sys/arch/macppc/macppc/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.103 2008/11/22 14:42:29 art Exp $ */
+/* $OpenBSD: machdep.c,v 1.104 2009/01/22 22:41:42 kettenis Exp $ */
/* $NetBSD: machdep.c,v 1.4 1996/10/16 19:33:11 ws Exp $ */
/*
@@ -1229,8 +1229,7 @@ bus_mem_add_mapping(bus_addr_t bpa, bus_size_t size, int cacheable,
vaddr = uvm_km_kmemalloc(phys_map, NULL, len,
UVM_KMF_NOWAIT|UVM_KMF_VALLOC);
if (vaddr == 0)
- panic("bus_mem_add_mapping: kvm alloc of 0x%x failed",
- len);
+ return (ENOMEM);
}
*bshp = vaddr + off;
#ifdef DEBUG_BUS_MEM_ADD_MAPPING