Recursion in ACPI EC causes GPE lockup
Hans Petter Selasky
hps at selasky.org
Tue Nov 29 15:52:08 UTC 2016
Hi,
I've managed to debug a problem in acpi_ec.c with a recent skylake laptop:
In EcSpaceHandler() there is a call to EcGpeQueryHandler(). This causes
EcSpaceHandler() to recurse during cold boot.
When EcGpeQueryHandler() is recursing it appears that because the
completion of a GPE interrupt also invokes EcSpaceHandler() again, we go
into an infinite loop, and the ACPI just generate more and more commands
that EcGpeQueryHandler() never completes, because it is reading the
command queue first all the way.
Solution: Don't allow EcGpeQueryHandler() to recurse this way. The
attached patch entirely fixes my problem.
Can someone here review the attached patch?
--HPS
-------------- next part --------------
A non-text attachment was scrubbed...
Name: acpi_ec.c.diff
Type: text/x-patch
Size: 2319 bytes
Desc: not available
URL: <http://lists.freebsd.org/pipermail/freebsd-acpi/attachments/20161129/e1a4629c/attachment.bin>
More information about the freebsd-acpi
mailing list