Attempting to sleep in interrupts

M. Warner Losh imp at bsdimp.com
Tue Nov 8 11:06:51 PST 2005


In message: <200511081913.15042.thierry at herbelot.com>
            Thierry Herbelot <thierry at herbelot.com> writes:
: I also see this kind of panic :

: fwohci0: fwohci_pci_suspend
: panic: trying to sleep while sleeping is prohibited

The root of this problem is:

...
: bus_generic_suspend(c1d6f000,3,1,101dc70,0) at bus_generic_suspend+0x4a
: acpi_SetSleepState(c1dd2080,3,0,cb70dc38,c0660a63) at acpi_SetSleepState+0x16a
: acpi_pm_func(0,c1dd2080,1,cb70dc80,c07e8d47) at acpi_pm_func+0x3a
: power_pm_suspend(1) at power_pm_suspend+0x23
: scgetc(c1f88800,2,c0669865,c1e7a900,c0997fa0) at scgetc+0x4ef
: sckbdevent(c0997fa0,0,c1f88800) at sckbdevent+0x1c8
: atkbd_intr(c0997fa0,0,cb70dcec,c0632c9a,c0997fa0) at atkbd_intr+0x20
: atkbdintr(c0997fa0) at atkbdintr+0x16

We're calling the entire suspend chain from an interrupt handler.
Granted, this interrupt hanlder is in an ithread, but we still
prohibit sleeping there.

The solution is to have power_pm_suspend call the callback function
using a taskqueue.

Warner


More information about the freebsd-current mailing list