Index: sys/dev/acpica/acpi_cpu.c =================================================================== --- sys/dev/acpica/acpi_cpu.c +++ sys/dev/acpica/acpi_cpu.c @@ -180,7 +180,7 @@ static void acpi_cpu_cx_probe(struct acpi_cpu_softc *sc); static void acpi_cpu_generic_cx_probe(struct acpi_cpu_softc *sc); static int acpi_cpu_cx_cst(struct acpi_cpu_softc *sc); -static void acpi_cpu_startup(void *arg); +static void acpi_cpu_startup(void); static void acpi_cpu_startup_cx(struct acpi_cpu_softc *sc); static void acpi_cpu_cx_list(struct acpi_cpu_softc *sc); #if defined(__i386__) || defined(__amd64__) @@ -355,9 +355,6 @@ cpu_sysctl_tree = SYSCTL_ADD_NODE(&cpu_sysctl_ctx, SYSCTL_CHILDREN(acpi_sc->acpi_sysctl_tree), OID_AUTO, "cpu", CTLFLAG_RD, 0, "node for CPU children"); - - /* Queue post cpu-probing task handler */ - AcpiOsExecute(OSL_NOTIFY_HANDLER, acpi_cpu_startup, NULL); } /* @@ -446,6 +443,9 @@ for (i = 0; i < n; i++) bus_generic_attach(devices[i]); free(devices, M_TEMP); + + /* Run startup after all cpu is attached */ + acpi_cpu_startup(); } SYSINIT(acpi_cpu, SI_SUB_CONFIGURE, SI_ORDER_MIDDLE, @@ -946,7 +946,7 @@ * Call this *after* all CPUs have been attached. */ static void -acpi_cpu_startup(void *arg) +acpi_cpu_startup(void) { struct acpi_cpu_softc *sc; int i; Index: sys/dev/hyperv/vmbus/hv_vmbus_drv_freebsd.c =================================================================== --- sys/dev/hyperv/vmbus/hv_vmbus_drv_freebsd.c +++ sys/dev/hyperv/vmbus/hv_vmbus_drv_freebsd.c @@ -598,15 +598,6 @@ device_printf(dev, "VMBUS: attach dev: %p\n", dev); vmbus_devp = dev; - /* - * 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) - vmbus_bus_init(); - return (0); } @@ -616,14 +607,7 @@ if (vm_guest != VM_GUEST_HV) 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_bus_init(); + vmbus_bus_init(); } static void @@ -670,20 +654,6 @@ return (0); } -static void -vmbus_mod_load(void) -{ - if(bootverbose) - printf("VMBUS: load\n"); -} - -static void -vmbus_mod_unload(void) -{ - if(bootverbose) - printf("VMBUS: unload\n"); -} - static int vmbus_modevent(module_t mod, int what, void *arg) { @@ -691,10 +661,8 @@ case MOD_LOAD: vmbus_init(); - vmbus_mod_load(); break; case MOD_UNLOAD: - vmbus_mod_unload(); break; }