Index: arch/amd64/amd64/cpu.c =================================================================== RCS file: /cvs/src/sys/arch/amd64/amd64/cpu.c,v retrieving revision 1.76 diff -u -p -r1.76 cpu.c --- arch/amd64/amd64/cpu.c 18 Dec 2014 16:23:26 -0000 1.76 +++ arch/amd64/amd64/cpu.c 4 Jan 2015 11:22:50 -0000 @@ -432,6 +432,7 @@ cpu_attach(struct device *parent, struct ci->ci_cpuid = 0; /* False for APs, but they're not used anyway */ #endif ci->ci_func = caa->cpu_func; + ci->ci_ifloor = IPL_NONE; #if defined(MULTIPROCESSOR) /* Index: arch/amd64/amd64/intr.c =================================================================== RCS file: /cvs/src/sys/arch/amd64/amd64/intr.c,v retrieving revision 1.39 diff -u -p -r1.39 intr.c --- arch/amd64/amd64/intr.c 2 Dec 2014 18:13:10 -0000 1.39 +++ arch/amd64/amd64/intr.c 4 Jan 2015 11:22:50 -0000 @@ -514,6 +514,8 @@ intr_disestablish(struct intrhand *ih) int intr_handler(struct intrframe *frame, struct intrhand *ih) { + struct cpu_info *ci = curcpu(); + int floor; int rc; #ifdef MULTIPROCESSOR int need_lock; @@ -526,7 +528,10 @@ intr_handler(struct intrframe *frame, st if (need_lock) __mp_lock(&kernel_lock); #endif + floor = ci->ci_ifloor; + ci->ci_ifloor = ih->ih_level; rc = (*ih->ih_fun)(ih->ih_arg ? ih->ih_arg : frame); + ci->ci_ifloor = floor; #ifdef MULTIPROCESSOR if (need_lock) __mp_unlock(&kernel_lock); Index: arch/amd64/amd64/machdep.c =================================================================== RCS file: /cvs/src/sys/arch/amd64/amd64/machdep.c,v retrieving revision 1.204 diff -u -p -r1.204 machdep.c --- arch/amd64/amd64/machdep.c 21 Dec 2014 16:27:07 -0000 1.204 +++ arch/amd64/amd64/machdep.c 4 Jan 2015 11:22:50 -0000 @@ -1774,14 +1774,18 @@ void splassert_check(int wantipl, const char *func) { int cpl = curcpu()->ci_ilevel; + int floor = curcpu()->ci_ifloor; if (cpl < wantipl) { splassert_fail(wantipl, cpl, func); } - if (wantipl == IPL_NONE && curcpu()->ci_idepth != 0) { splassert_fail(-1, curcpu()->ci_idepth, func); } + if (floor != IPL_NONE && floor > wantipl) { + splassert_fail(wantipl, floor, func); + } + } #endif Index: arch/amd64/include/cpu.h =================================================================== RCS file: /cvs/src/sys/arch/amd64/include/cpu.h,v retrieving revision 1.88 diff -u -p -r1.88 cpu.h --- arch/amd64/include/cpu.h 16 Dec 2014 21:20:23 -0000 1.88 +++ arch/amd64/include/cpu.h 4 Jan 2015 11:22:50 -0000 @@ -84,6 +84,7 @@ struct cpu_info { struct intrsource *ci_isources[MAX_INTR_SOURCES]; u_int64_t ci_ipending; int ci_ilevel; + int ci_ifloor; int ci_idepth; u_int64_t ci_imask[NIPL]; u_int64_t ci_iunmask[NIPL]; Index: kern/subr_pool.c =================================================================== RCS file: /cvs/src/sys/kern/subr_pool.c,v retrieving revision 1.174 diff -u -p -r1.174 subr_pool.c --- kern/subr_pool.c 22 Dec 2014 02:59:53 -0000 1.174 +++ kern/subr_pool.c 4 Jan 2015 11:22:52 -0000 @@ -536,6 +546,9 @@ pool_do_get(struct pool *pp, int flags, MUTEX_ASSERT_LOCKED(&pp->pr_mtx); + if (pp->pr_ipl != -1) + splassert(pp->pr_ipl); + /* * Account for this item now to avoid races if we need to give up * pr_mtx to allocate a page. @@ -627,6 +640,9 @@ pool_put(struct pool *pp, void *v) mtx_enter(&pp->pr_mtx); + if (pp->pr_ipl != -1) + splassert(pp->pr_ipl); + ph = pr_find_pagehead(pp, v); #ifdef DIAGNOSTIC