OSDN Git Service

ACPI / EC: Convert event handling work queue into loop style.
authorLv Zheng <lv.zheng@intel.com>
Thu, 11 Jun 2015 05:21:32 +0000 (13:21 +0800)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Mon, 15 Jun 2015 12:35:59 +0000 (14:35 +0200)
commit9d8993be2d9149bc8b3132dad030ff5960f5abcc
treec1f8582120cb66910739a0a62b66a3cd57a8090e
parentf8b8eb71533338654f39211a87efeca35055566b
ACPI / EC: Convert event handling work queue into loop style.

During the period that a work queue is scheduled (queued up for run) but
hasn't been run, second schedule_work() could fail. This may not lead to
the loss of queries because QR_EC is always ensured to be submitted after
the work queue has been in the running state.

The event handling work queue can be changed into the loop style to allow
us to control the code in a more flexible way:
1. Makes it possible to add event=0x00 termination condition in the loop.
2. Increases the thoughput of the QR_EC transactions as the 2nd+ QR_EC
   transactions may be handled in the same work item used for the 1st QR_EC
   transaction, thus the delay caused by the 2nd+ work item scheduling can
   be eliminated.

Except the logging message changes and the throughput improvement, this
patch is just a funcitonal no-op.

Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Tested-by: Gabriele Mazzotta <gabriele.mzt@gmail.com>
Tested-by: Tigran Gabrielyan <tigrangab@gmail.com>
Tested-by: Adrien D <ghbdtn@openmailbox.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/acpi/ec.c
drivers/acpi/internal.h