summaryrefslogtreecommitdiffstats
path: root/drivers/acpi/internal.h
diff options
context:
space:
mode:
authorLv Zheng <lv.zheng@intel.com>2015-06-11 13:21:32 +0800
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2015-06-15 14:35:59 +0200
commit9d8993be2d9149bc8b3132dad030ff5960f5abcc (patch)
treec1f8582120cb66910739a0a62b66a3cd57a8090e /drivers/acpi/internal.h
parentf8b8eb71533338654f39211a87efeca35055566b (diff)
downloadlinux-9d8993be2d9149bc8b3132dad030ff5960f5abcc.tar.bz2
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>
Diffstat (limited to 'drivers/acpi/internal.h')
-rw-r--r--drivers/acpi/internal.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/acpi/internal.h b/drivers/acpi/internal.h
index 61cb50674359..b09756abc6e8 100644
--- a/drivers/acpi/internal.h
+++ b/drivers/acpi/internal.h
@@ -139,6 +139,7 @@ struct acpi_ec {
spinlock_t lock;
struct work_struct work;
unsigned long timestamp;
+ unsigned long nr_pending_queries;
};
extern struct acpi_ec *first_ec;