Index: acpitz.c =================================================================== RCS file: /cvs/src/sys/dev/acpi/acpitz.c,v retrieving revision 1.59 diff -u -p -r1.59 acpitz.c --- acpitz.c 10 Aug 2022 16:58:16 -0000 1.59 +++ acpitz.c 26 Feb 2023 08:11:01 -0000 @@ -77,6 +77,7 @@ struct cfdriver acpitz_cd = { }; void acpitz_init_perf(void *); +void acpitz_attach_thread(void *); void acpitz_setperf(int); void acpitz_monitor(struct acpitz_softc *); void acpitz_refresh(void *); @@ -187,12 +188,24 @@ acpitz_attach(struct device *parent, str { struct acpitz_softc *sc = (struct acpitz_softc *)self; struct acpi_attach_args *aa = aux; - int i; - char name[5]; sc->sc_acpi = (struct acpi_softc *)parent; sc->sc_devnode = aa->aaa_node; + printf("\n"); + + kthread_create_deferred(acpitz_attach_thread, sc); +} + +void +acpitz_attach_thread(void *arg) +{ + struct acpitz_softc *sc = arg; + int i; + char name[5]; + + printf("%s", sc->sc_dev.dv_xname); + TAILQ_INIT(&sc->sc_psl); for (i = 0; i < ACPITZ_MAX_AC; i++) TAILQ_INIT(&sc->sc_alx[i]); @@ -249,7 +262,7 @@ acpitz_attach(struct device *parent, str * piece of code that touches this pointer after all CPUs have been * fully attached */ - kthread_create_deferred(acpitz_init_perf, sc); + acpitz_init_perf(sc); } int