--- mp_x86.c 2022-01-20 18:48:29.163349000 +0700 +++ mp_x86.c 2022-01-20 18:51:14.654156000 +0700 @@ -1669,14 +1669,19 @@ uint32_t generation; int cpu; +#ifdef __i386__ + sched_pin(); +#endif +#ifdef __amd64__ + KASSERT(curthread->td_pinned > 0, ("curthread not pinned")); +#endif + /* * It is not necessary to signal other CPUs while booting or * when in the debugger. */ if (kdb_active || panicstr != NULL || !smp_started) goto local_cb; - - KASSERT(curthread->td_pinned > 0, ("curthread not pinned")); /* * Check for other cpus. Return if none.