diff options
author | Lv Zheng <lv.zheng@intel.com> | 2016-08-03 09:07:58 +0800 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2016-08-17 02:37:02 +0200 |
commit | df45db6177f8dde380d44149cca46ad800a00575 (patch) | |
tree | cb42fc57f30847b2b38b19e3790e50ff140f5592 /drivers/acpi/internal.h | |
parent | 694d0d0bb2030d2e36df73e2d23d5770511dbc8d (diff) | |
download | lwn-df45db6177f8dde380d44149cca46ad800a00575.tar.gz lwn-df45db6177f8dde380d44149cca46ad800a00575.zip |
ACPI / EC: Add PM operations for suspend/resume noirq stage
It is reported that on some platforms, resume speed is not fast. The cause
is: in noirq stage, EC driver is working in polling mode, and each state
machine advancement requires a context switch.
The context switch is not necessary to the EC driver's polling mode. This
patch implements PM hooks to automatically switch the driver to/from the
busy polling mode to eliminate the overhead caused by the context switch.
This finally contributes to the tuning result: acpi_pm_finish() execution
time is improved from 192ms to 6ms.
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Reported-and-tested-by: Todd E Brandt <todd.e.brandt@linux.intel.com>
[ rjw: Subject ]
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/acpi/internal.h')
-rw-r--r-- | drivers/acpi/internal.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/acpi/internal.h b/drivers/acpi/internal.h index 940218ff0193..6996121ee003 100644 --- a/drivers/acpi/internal.h +++ b/drivers/acpi/internal.h @@ -174,6 +174,8 @@ struct acpi_ec { struct work_struct work; unsigned long timestamp; unsigned long nr_pending_queries; + bool saved_busy_polling; + unsigned int saved_polling_guard; }; extern struct acpi_ec *first_ec; |