On 14 October 2011 16:11, Maxim Ignatenko <[email protected]> wrote: > Hi, > > I have this code: > https://gitorious.org/acpi_call-freebsd/acpi_call-freebsd/blobs/5e6a79869721a2bd8de88b5cfa90c14b429cb5c7/acpi_call.c > It works just fine when loaded into kernel manually, but crashes if > loaded during boot via loader.conf: http://i.imgur.com/fLPen.png > > I've added some printf's to acpi_register_ioctl() to track down where > it hangs and crashes after about one minute: > http://pastebin.com/vvJutWLA > > What am I missing? Do I need to somehow (how?) specify module > initialization order? Or just call acpi_register_ioctl() by some other > mean when it would not cause panic? >
Hi. The call of mtx_lock_spin() (as seen from your attached screenshot) on MTX_DEF acpi mutex tells me that you try to use it before it was initialized. This is usually done in acpi_attach() routine which is called with SI_SUB_DRIVERS (? - correct me if I'm wrong) order. Your module is initialized with the earlier SI_SUB_KLD order. That also might depend on whether acpi.ko is statically compiled in, even though you have MODULE_DEPEND(acpi_call, acpi, 1, 1, 1); First I would change the order in DECLARE_MODULE() to a more common SI_SUB_EXEC. -- wbr, pluknet _______________________________________________ [email protected] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-acpi To unsubscribe, send any mail to "[email protected]"
