diff options
author | Mark Kettenis <kettenis@cvs.openbsd.org> | 2009-01-28 20:15:15 +0000 |
---|---|---|
committer | Mark Kettenis <kettenis@cvs.openbsd.org> | 2009-01-28 20:15:15 +0000 |
commit | fe6597f1f52e28f34c16d4fea6afcb0dd79e60ab (patch) | |
tree | 720b158b4ea02b42dcc068818017642cf270581f /sys/arch/socppc | |
parent | d22e1b51780dcb589e4e9253793b203b66acebf5 (diff) |
Make bus_mem_add_mapping() return ENOMEM if we fail to allocate kva instead
of panicing.
Diffstat (limited to 'sys/arch/socppc')
-rw-r--r-- | sys/arch/socppc/socppc/machdep.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/sys/arch/socppc/socppc/machdep.c b/sys/arch/socppc/socppc/machdep.c index ca0a96c6f55..e598baf53db 100644 --- a/sys/arch/socppc/socppc/machdep.c +++ b/sys/arch/socppc/socppc/machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: machdep.c,v 1.7 2008/12/04 16:02:20 maja Exp $ */ +/* $OpenBSD: machdep.c,v 1.8 2009/01/28 20:15:14 kettenis Exp $ */ /* $NetBSD: machdep.c,v 1.4 1996/10/16 19:33:11 ws Exp $ */ /* @@ -536,8 +536,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 |