pool_get in powerpc64's pmap might fail when uvm_km_pages.free == 0.
This might cause KASSERT(slbd) to panic 'kernel diagnostic assertion
"sbld" failed'. Remove this KASSERT and add a check for PMAP_CANFAIL.
pmap_enter calls without PMAP_CANFAIL might still panic.
ok mpi@ jca@
-/* $OpenBSD: pmap.c,v 1.61 2024/04/03 19:30:59 gkoehler Exp $ */
+/* $OpenBSD: pmap.c,v 1.62 2024/06/04 17:31:59 gkoehler Exp $ */
/*
* Copyright (c) 2015 Martin Pieuchot
slbd = pmap_slbd_lookup(pm, va);
if (slbd == NULL) {
slbd = pmap_slbd_alloc(pm, va);
- KASSERT(slbd);
+ if (slbd == NULL) {
+ if ((flags & PMAP_CANFAIL) == 0)
+ panic("%s: unable to allocate slbd", __func__);
+ return ENOMEM;
+ }
}
vp1 = slbd->slbd_vp;