]> git.baikalelectronics.ru Git - kernel.git/commit
ACPI / EC: Work around method reentrancy limit in ACPICA for _Qxx
authorLv Zheng <lv.zheng@intel.com>
Wed, 3 Aug 2016 01:00:14 +0000 (09:00 +0800)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Thu, 4 Aug 2016 00:07:53 +0000 (02:07 +0200)
commit6cc5743fc5999415df3dd352c3335b6fff33bd08
tree085e46a8bb91d7d82df91955a4929ffb60599eb9
parentd11399e2e618891b39cb73a43b8296b1a9893f57
ACPI / EC: Work around method reentrancy limit in ACPICA for _Qxx

A regression is caused by the following commit:

  Commit: 08e03f6bd7db8217ca54ed2a56b9d3f4c32027b0
  Subject: ACPI / EC: Fix an issue caused by the serialized _Qxx evaluations

In this commit, using system workqueue causes that the maximum parallel
executions of _Qxx can exceed 255. This violates the method reentrancy
limit in ACPICA and generates the following error log:

  ACPI Error: Method reached maximum reentrancy limit (255) (20150818/dsmethod-341)

This patch creates a seperate workqueue and limits the number of parallel
_Qxx evaluations down to a configurable value (can be tuned against number
of online CPUs).

Since EC events are handled after driver probe, we can create the workqueue
in acpi_ec_init().

Fixes: 08e03f6bd7db (ACPI / EC: Fix an issue caused by the serialized _Qxx evaluations)
Link: https://bugzilla.kernel.org/show_bug.cgi?id=135691
Cc: 4.3+ <stable@vger.kernel.org> # 4.3+
Reported-and-tested-by: Helen Buus <ubuntu@hbuus.com>
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/acpi/ec.c