Index: sys/dev/hyperv/vmbus/vmbus.c =================================================================== --- sys/dev/hyperv/vmbus/vmbus.c +++ sys/dev/hyperv/vmbus/vmbus.c @@ -1274,17 +1274,6 @@ */ vmbus_sc->vmbus_event_proc = vmbus_event_proc_dummy; -#ifndef EARLY_AP_STARTUP - /* - * If the system has already booted and thread - * scheduling is possible indicated by the global - * cold set to zero, we just call the driver - * initialization directly. - */ - if (!cold) -#endif - vmbus_doattach(vmbus_sc); - return (0); } @@ -1317,8 +1306,6 @@ return (0); } -#ifndef EARLY_AP_STARTUP - static void vmbus_sysinit(void *arg __unused) { @@ -1327,20 +1314,15 @@ if (vm_guest != VM_GUEST_HV || sc == NULL) return; - /* - * If the system has already booted and thread - * scheduling is possible, as indicated by the - * global cold set to zero, we just call the driver - * initialization directly. - */ - if (!cold) - vmbus_doattach(sc); + vmbus_doattach(sc); } /* * NOTE: * We have to start as the last step of SI_SUB_SMP, i.e. after SMP is * initialized. */ +#ifdef EARLY_AP_STARTUP +SYSINIT(vmbus_initialize, SI_SUB_PSEUDO, SI_ORDER_ANY, vmbus_sysinit, NULL); +#else SYSINIT(vmbus_initialize, SI_SUB_SMP, SI_ORDER_ANY, vmbus_sysinit, NULL); - -#endif /* !EARLY_AP_STARTUP */ +#endif