Date: Tue, 08 Nov 2005 12:05:36 -0700 (MST) From: "M. Warner Losh" <imp@bsdimp.com> To: thierry@herbelot.com Cc: freebsd-current@freebsd.org Subject: Re: Attempting to sleep in interrupts Message-ID: <20051108.120536.90824853.imp@bsdimp.com> In-Reply-To: <200511081913.15042.thierry@herbelot.com> References: <20051107094655.GA76489@cirb503493.alcatel.com.au> <200511081913.15042.thierry@herbelot.com>
next in thread | previous in thread | raw e-mail | index | archive | help
In message: <200511081913.15042.thierry@herbelot.com> Thierry Herbelot <thierry@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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20051108.120536.90824853.imp>