[RFC PATCH v6 0/3] ACPI / EC: Tune the timing of EC events arrival during S3-exit

2017-09-28 Thread Lv Zheng
. If Linux EC driver started to detect events during early OS S3-exit, it need to timely poll EC events during noirq stages as in this stage there is no EC event triggering source. This patchset implements earlier EC event handling for Linux. Lv Zheng (3): ACPI / EC: Fix possible driver order

[RFC PATCH v6 1/3] ACPI / EC: Fix possible driver order issue by moving EC event handling earlier

2017-09-28 Thread Lv Zheng
event handling is enabled and the noirq stage is ended. Known issue: 1. Event ocurred between acpi_ec_unblock_transactions() and acpi_ec_resume() may still lead to the order issue. This can only be fixed by adding a periodic detection mechanism during the noirq stage. Signed-off-by: Lv Zheng

[RFC PATCH v6 2/3] ACPI / EC: Add event detection support for noirq stages

2017-09-28 Thread Lv Zheng
dropped, and the events occurred in early S3-exit could be deferred to acpi_ec_resume(). This patch solves event losses in S3-entry and resume order in S3-exit by timely polling EC events during these periods. Link: https://bugzilla.kernel.org/show_bug.cgi?id=196129 [#1] Signed-off-by: Lv Zheng

[RFC PATCH v6 3/3] ACPI / EC: Enable noirq stage event detection

2017-09-28 Thread Lv Zheng
handle special BIOS requirements. If this commit is bisected to be a regression culprit, please report this to bugzilla.kernel.org for further investigation. Link: https://bugzilla.kernel.org/show_bug.cgi?id=196129 Signed-off-by: Lv Zheng Tested-by: Tomislav Ivek --- drivers/acpi/ec.c | 2 +- 1

[PATCH 2/2] ACPI / EC: Fix a regression related to the PM ops support of ECDT device

2017-09-26 Thread Lv Zheng
d,resume,bind. Fixes: c2b46d679b30 (ACPI / EC: Add PM operations to improve event handling for resume process) Link: https://bugzilla.kernel.org/show_bug.cgi?id=196847 Reported-by: Luya Tshimbalanga Tested-by: Luya Tshimbalanga Cc: 4.9+ # 4.9+ Signed-off-by: Lv Zheng --

[PATCH 1/2] ACPI / EC: Fix a regression related to the triggering source of the EC event handling

2017-09-26 Thread Lv Zheng
irk) Fixes: 9c40f956ce9b (Revert "ACPI / EC: Enable event freeze mode..." to fix a regression) Link: https://bugzilla.kernel.org/show_bug.cgi?id=196833 Signed-off-by: Lv Zheng Reported-by: Alistair Hamilton Tested-by: Alistair Hamilton Cc: 4.11+ # 4.11+ --- drivers/acpi/ec.c | 12 +++-

[PATCH 0/2] ACPI / EC: EC regression fixes related to EC event stuck

2017-09-26 Thread Lv Zheng
uning acpi.ec_freeze_events=Y. Note that PATCH 02 depends on PATCH 01 to be safe for driver unbind. Lv Zheng (2): ACPI / EC: Fix a regression related to the triggering source of the EC event handling ACPI / EC: Fix a regression related to the PM ops support of ECDT device drivers/acpi

[PATCH] tools/power/acpi: Add multi-threading test facility

2017-09-07 Thread Lv Zheng
PI EC loads: sudo tools/power/acpi/acpimt.sh \ -t 10 \ -d tools/power/acpi/acpidbg \ -f /proc/acpi/button/lid/LID0/state \ -f /sys/class/power_supply/AC0/online \ -f /sys/class/power_supply/BAT0/status Signed-off-by: Lv Zheng --- tools/power/acpi/acpimt.sh

[PATCH v4 2/3] ACPI / EC: Add event detection support for noirq stages

2017-08-31 Thread Lv Zheng
ttps://bugzilla.kernel.org/show_bug.cgi?id=196129 [#1] Signed-off-by: Lv Zheng Tested-by: Tomislav Ivek --- drivers/acpi/ec.c | 93 +++-- drivers/acpi/internal.h | 1 + 2 files changed, 92 insertions(+), 2 deletions(-) diff --git a/drivers/

[PATCH v4 3/3] ACPI / EC: Enable noirq stage event detection

2017-08-31 Thread Lv Zheng
handle special BIOS requirements. If this commit is bisected to be a regression culprit, please report this to bugzilla.kernel.org for further investigation. Link: https://bugzilla.kernel.org/show_bug.cgi?id=196129 Signed-off-by: Lv Zheng Tested-by: Tomislav Ivek --- drivers/acpi/ec.c | 2 +- 1

[PATCH v4 1/3] ACPI / EC: Fix possible driver order issue by moving EC event handling earlier

2017-08-31 Thread Lv Zheng
acpi_ec_unblock_transactions() and acpi_ec_resume() may still lead to the order issue. This can only be fixed by adding a periodic detection mechanism during the noirq stage. Signed-off-by: Lv Zheng Tested-by: Tomislav Ivek --- drivers/acpi/ec.c | 23 +++ 1 file changed, 19 insertions(+), 4

[PATCH v4 0/3] ACPI / EC: Fix EC event handling issues

2017-08-31 Thread Lv Zheng
handling may stuck. This patchset fixes these issues. v4 of this patch series re-orders the fixes so that the fix of the problem 2 could be independent against the fix of the problem 1, this is done by refining the fix of the problem 2, making it immune to the problem 3. Lv Zheng (3): ACPI / EC: Fix

[PATCH v3 4/4] ACPI / EC: Enable noirq stage GPE polling

2017-08-10 Thread Lv Zheng
regression culprit, please report this to bugzilla.kernel.org for further investigation. Link: https://bugzilla.kernel.org/show_bug.cgi?id=196129 Signed-off-by: Lv Zheng Tested-by: Tomislav Ivek --- drivers/acpi/ec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/acpi

[PATCH v3 2/4] ACPI / EC: Add IRQ polling support for noirq stages

2017-08-10 Thread Lv Zheng
e problem 1 and problem 2. This patch has been validated to be able to improve situation related to the reported bug (see Link #1) which requires to handle EC GPEs longer during suspend. Link: https://bugzilla.kernel.org/show_bug.cgi?id=196129 [#1] Signed-off-by: Lv Zheng Tested-by: Tomislav Ive

[PATCH v3 0/4] ACPI / EC: Poll more EC events during suspend/resume

2017-08-10 Thread Lv Zheng
EC events earlier during resume, and have great opportunities to fix some driver order issues caused by the deferred detected EC events. v3 of this patch series only contains patch description updates. Lv Zheng (4): ACPI / EC: Cleanup EC GPE mask flag ACPI / EC: Add IRQ polling support for

[PATCH v3 3/4] ACPI / EC: Add support to handle EC events earlier

2017-08-10 Thread Lv Zheng
Now as GPE poller is implemented, EC driver is able to detect EC events during suspend/resume noirq stages, we can try to move EC event handling earlier without being worried about post-resume event stuck. This may help to solve driver order issues during resume. Signed-off-by: Lv Zheng Tested

[PATCH v3 1/4] ACPI / EC: Cleanup EC GPE mask flag

2017-08-10 Thread Lv Zheng
EC_FLAGS_COMMAND_STORM is actually used to mask GPE during IRQ processing. This patch cleans it up using more readable flag/function names. Signed-off-by: Lv Zheng Tested-by: Tomislav Ivek --- drivers/acpi/ec.c | 23 +++ 1 file changed, 11 insertions(+), 12 deletions

[PATCH 2/2] ACPICA: Events: Dispatch GPEs after enabling for the first time

2017-08-10 Thread Lv Zheng
a's report and Rafael's original Linux based fix. Based on Linux commit originated from Rafael J. Wysocki, fixed by Lv Zheng, tested by Mika Westerberg. Original-by: Rafael J. Wysocki Signed-off-by: Lv Zheng Tested-by: Mika Westerberg --- drivers/acpi/acpica/evxfgpe.c | 22 ++

[PATCH 0/2] ACPICA: Events: Fix GPE enabling issues related to edge-triggered GPEs

2017-08-10 Thread Lv Zheng
it is enabled. This patchset fixes these 2 problems. Lv Zheng (2): ACPICA: Events: Stop unconditionally clearing ACPI IRQs during suspend/resume ACPICA: Events: Dispatch GPEs after enabling for the first time drivers/acpi/acpica/evgpe.c | 7 --- drivers/acpi/acpica/evxfgpe.c

[PATCH 1/2] ACPICA: Events: Stop unconditionally clearing ACPI IRQs during suspend/resume

2017-08-10 Thread Lv Zheng
as no-ops. Please report any regression related to this commit to the ACPI component on kernel bugzilla. Reported by Eric Bakula-Davis, fixed by Lv Zheng. Link: https://bugzilla.kernel.org/show_bug.cgi?id=196249 Signed-off-by: Lv Zheng Reported-and-tested-by: Eric Bakula-Davis Tested-by: Mika

[PATCH v2 4/4] ACPI / EC: Enable noirq stage GPE polling

2017-07-30 Thread Lv Zheng
regression culprit, please report this to bugzilla.kernel.org for further investigation. Signed-off-by: Lv Zheng --- drivers/acpi/ec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/acpi/ec.c b/drivers/acpi/ec.c index 5f951ba..f5d629b 100644 --- a/drivers/acpi/ec.c +++ b

[PATCH v2 3/4] ACPI / EC: Add support to handle EC events earlier

2017-07-30 Thread Lv Zheng
Now as GPE poller is implemented, EC driver is able to detect EC events during suspend/resume noirq stages, we can try to move EC event handling earlier without being worried about post-resume event stuck. Signed-off-by: Lv Zheng --- drivers/acpi/ec.c | 4 +++- 1 file changed, 3 insertions

[PATCH v2 2/4] ACPI / EC: Add IRQ polling support for noirq stages

2017-07-30 Thread Lv Zheng
ost of the platforms may not require this, this patch prepares an option to make this behavior configurable. Note that this solution can also solve problem 2. Link: https://bugzilla.kernel.org/show_bug.cgi?id=196129 [#1] Signed-off-by: Lv Zheng --- drivers/acpi/ec.c | 130 ++

[PATCH v2 1/4] ACPI / EC: Cleanup EC GPE mask flag

2017-07-30 Thread Lv Zheng
EC_FLAGS_COMMAND_STORM is actually used to mask GPE during IRQ processing. This patch cleans it up using more readable flag/function names. Signed-off-by: Lv Zheng --- drivers/acpi/ec.c | 23 +++ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/drivers/acpi

[PATCH v2 0/4] ACPI / EC: Solve EC event handling issues

2017-07-30 Thread Lv Zheng
noirq stage to poll EC GPEs. In this newest timer version, timer running period is shortened and thus is safer for s2idle mode. After adding such a mechanism, we can try to handle EC events earlier after resume, this may be able to solve some driver order issues. Lv Zheng (4): ACPI / EC: Cleanup EC

[PATCH 3/3] ACPI: EC: Enable noirq stage GPE polling

2017-07-27 Thread Lv Zheng
regression culprit, please report this to bugzilla.kernel.org for further investigation. Signed-off-by: Lv Zheng --- drivers/acpi/ec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/acpi/ec.c b/drivers/acpi/ec.c index 47f900c..12e0c8a 100644 --- a/drivers/acpi/ec.c +++ b

[PATCH 1/3] ACPI / EC: Cleanup EC GPE mask flag

2017-07-27 Thread Lv Zheng
EC_FLAGS_COMMAND_STORM is actually used to mask GPE during IRQ processing. This patch cleans it up using more readable flag/function names. Signed-off-by: Lv Zheng --- drivers/acpi/ec.c | 23 +++ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/drivers/acpi

[PATCH 2/3] ACPI: EC: Add IRQ polling support for noirq stages

2017-07-27 Thread Lv Zheng
how_bug.cgi?id=196129 [#1] Signed-off-by: Lv Zheng --- drivers/acpi/ec.c | 135 drivers/acpi/internal.h | 1 + 2 files changed, 136 insertions(+) diff --git a/drivers/acpi/ec.c b/drivers/acpi/ec.c index 54879c7..47f900c 100644 --- a/driver

[PATCH 2/2] ACPI: EC: Revert "ACPI / EC: Enable event freeze mode..." to fix a regression

2017-07-11 Thread Lv Zheng
Tested-by: Damjan Georgievski Signed-off-by: Lv Zheng Cc: Stable # 4.9+ --- drivers/acpi/ec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/acpi/ec.c b/drivers/acpi/ec.c index 05e4eb5..ddb01e9 100644 --- a/drivers/acpi/ec.c +++ b/drivers/acpi/ec.c @@ -147,7 +147,7

[PATCH 1/2] ACPI: EC: Drop EC noirq hooks to fix a regression

2017-07-11 Thread Lv Zheng
P. Signed-off-by: Lv Zheng Cc: Stable # all applicable --- drivers/acpi/ec.c | 19 --- 1 file changed, 19 deletions(-) diff --git a/drivers/acpi/ec.c b/drivers/acpi/ec.c index 854d428..05e4eb5 100644 --- a/drivers/acpi/ec.c +++ b/drivers/acpi/ec.c @@ -1870,24 +1870,6 @@

[RFC PATCH v6 4/5] ACPI: button: extract input creation/destruction helpers

2017-06-21 Thread Lv Zheng
dynamic creation/destruction of the input node. Signed-off-by: Benjamin Tissoires Signed-off-by: Lv Zheng --- drivers/acpi/button.c | 86 +++ 1 file changed, 53 insertions(+), 33 deletions(-) diff --git a/drivers/acpi/button.c b/drivers/acpi/button.c

[RFC PATCH v6 3/5] ACPI: button: Rework lid_init_state=ignore mode

2017-06-21 Thread Lv Zheng
tate=ignore ABI change solution is now too complicated if its purpose is to only solve this final incompliant use case. This patch re-works it by unconditionally prepending "open" complement events. Cc: Cc: Benjamin Tissoires Cc: Peter Hutterer Signed-off-by: Lv Zheng --- drivers

[RFC PATCH v6 5/5] ACPI: button: Add an optional workaround to fix a persistent close issue for old userspace

2017-06-21 Thread Lv Zheng
left to userspace to handle with a hwdb file and a udev rule. Reworked by Lv to make this solution optional, code based on top of old "ignore" mode and make lid_reliable configurable to all lid devices to eliminate the difficulties of synchronously handling global lid_device. S

[RFC PATCH v6 2/5] ACPI: button: Add an optional workaround to fix an event missing issue for old userspace

2017-06-21 Thread Lv Zheng
way, this patch prepares an option for users to enable on failure platforms for old userspace programs. Users can configure update interval via button.lid_update_interval. This should be configured to a smaller value than HoldoffTimeoutSec in /etc/systemd/logind.conf. Cc: Cc: Benjamin Tissoires

[RFC PATCH v6 1/5] ACPI: button: Add a workaround to fix an order issue for old userspace

2017-06-21 Thread Lv Zheng
hus systemd still considers the last state as "close" and suspends the platform after the HoldoffTimeoutSec times out. Cc: Cc: Benjamin Tissoires Cc: Peter Hutterer Signed-off-by: Lv Zheng --- drivers/acpi/button.c | 36 ++-- 1 file changed, 34 inser

[RFC PATCH v6 0/5] ACPI: button: Fix button.lid_init_state=method mode

2017-06-21 Thread Lv Zheng
only adds complement open events. 3.2. lid_unreliable=1: dymamically adds/removes input node. Benjamin Tissoires (2): ACPI: button: extract input creation/destruction helpers ACPI: button: Add an optional workaround to fix a persistent close issue for old userspace Lv Zheng (3): ACP

[PATCH v3 2/4] ACPI / EC: Add support to skip boot stage DSDT probe

2017-06-14 Thread Lv Zheng
g.cgi?id=195651 [#3] Tested-by: Daniel Drake Signed-off-by: Lv Zheng --- drivers/acpi/ec.c | 22 ++ 1 file changed, 22 insertions(+) diff --git a/drivers/acpi/ec.c b/drivers/acpi/ec.c index c1f480b..44b973e 100644 --- a/drivers/acpi/ec.c +++ b/drivers/acpi/ec.c @@ -1667,12 +

[PATCH v3 3/4] ACPI / EC: Fix media keys not working problem on some Asus laptops

2017-06-14 Thread Lv Zheng
y: Lv Zheng Signed-off-by: Lv Zheng --- drivers/acpi/ec.c | 49 +++-- 1 file changed, 43 insertions(+), 6 deletions(-) diff --git a/drivers/acpi/ec.c b/drivers/acpi/ec.c index 44b973e..2189048 100644 --- a/drivers/acpi/ec.c +++ b/drivers/acpi/ec.c @@ -

[PATCH v3 4/4] ACPI / EC: Add quirk for GL720VMK

2017-06-14 Thread Lv Zheng
From: Carlo Caione ASUS GL720VMK is also affected by the EC GPE preference issue. Signed-off-by: Carlo Caione Signed-off-by: Lv Zheng --- drivers/acpi/ec.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/acpi/ec.c b/drivers/acpi/ec.c index 2189048..ab04f0c

[PATCH v3 1/4] ACPI / EC: Enhance boot EC sanity check

2017-06-14 Thread Lv Zheng
l.org/show_bug.cgi?id=195651 Tested-by: Daniel Drake Signed-off-by: Lv Zheng --- drivers/acpi/ec.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/acpi/ec.c b/drivers/acpi/ec.c index c24235d..c1f480b 100644 --- a/drivers/acpi/ec.c +++ b/drivers/acpi/ec.c @@ -1362,6 +1362,8 @@ ec_parse_d

[PATCH v3 0/4] ACPI / EC: Add quirk modes for boot EC support

2017-06-14 Thread Lv Zheng
ACPI / EC: Fix media keys not working problem on some Asus laptops Lv Zheng (2): ACPI / EC: Enhance boot EC sanity check ACPI / EC: Add support to skip boot stage DSDT probe drivers/acpi/ec.c | 77 ++- 1 file changed, 71 insertions(+), 6

[PATCH 2/3] ACPI: EC: Fix EC command visibility for dynamic debug

2017-06-13 Thread Lv Zheng
s affects bugzilla triage work. This patch fixes this issue by enabling acpi_ec_cmd_string() for CONFIG_DYNAMIC_DEBUG. Tested-by: Wang Wendy Tested-by: Feng Chenzhou Signed-off-by: Lv Zheng --- drivers/acpi/ec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/acpi/

[PATCH 3/3] ACPI: EC: Change EC noirq tuning to be an optional behavior

2017-06-13 Thread Lv Zheng
d-off-by: Lv Zheng --- drivers/acpi/ec.c | 20 ++-- 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/drivers/acpi/ec.c b/drivers/acpi/ec.c index f3ff591..de5dde6 100644 --- a/drivers/acpi/ec.c +++ b/drivers/acpi/ec.c @@ -151,6 +151,10 @@ static bool ec_freeze_e

[PATCH 1/3] ACPI: EC: Fix an EC event IRQ storming issue

2017-06-13 Thread Lv Zheng
ink: https://jira01.devtools.intel.com/browse/LCK-4004 [#1] Tested-by: Wang Wendy Tested-by: Feng Chenzhou Signed-off-by: Lv Zheng --- drivers/acpi/ec.c | 11 ++- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/drivers/acpi/ec.c b/drivers/acpi/ec.c index c24235d..30d7f82 10

[RFC PATCH v5 1/2] ACPI: button: Fix issue that button notify cannot report stateful SW_LID state

2017-06-07 Thread Lv Zheng
nously updating lid state. Thus this patch doesn't kill the timer after seeing the BIOS notification, but continously sending _LID return value to the input layer for button.lid_init_state=method mode. The users can configure update interval via button.lid_update_interval. Cc: Cc: Benjamin Ti

[RFC PATCH v5 2/2] ACPI: button: Add a quirk mode for Surface Pro 1 like laptop

2017-06-07 Thread Lv Zheng
Since such platform only sends "close", old complicated "open" complement event mechanism is replaced by a simpler one of always prepending "open" before any events. Cc: Cc: Benjamin Tissoires Cc: Peter Hutterer Signed-

[RFC PATCH 0/2] ACPI: button: Fix button.lid_init_state=method mode

2017-06-07 Thread Lv Zheng
change again is unnecessary for such platforms, so this patch simply converts "lid_unreliable" into "button.lid_init_state=ignore". This material is just sent to demonstrate solutions and issues, the final solution is not determined yet. So marking them a

[PATCH v5] ACPICA: Tables: Add mechanism to allow to balance late stage acpi_get_table() independently

2017-06-06 Thread Lv Zheng
nce message. Lv Zheng. Signed-off-by: Lv Zheng --- drivers/acpi/acpica/tbutils.c | 36 +++- include/acpi/actbl.h | 13 + 2 files changed, 40 insertions(+), 9 deletions(-) diff --git a/drivers/acpi/acpica/tbutils.c b/drivers/acpi/acpica/tbutils.

[RFC PATCH v4 5/5] ACPI: button: Cleanup lid notification logics

2017-05-31 Thread Lv Zheng
Hutterer Signed-off-by: Lv Zheng --- drivers/acpi/button.c | 17 ++--- 1 file changed, 14 insertions(+), 3 deletions(-) Index: linux-acpica/drivers/acpi/button.c === --- linux-acpica.orig/drivers/acpi/button.c +++ linux

[RFC PATCH v4 2/5] ACPI: button: Extends complement switch event support for all modes

2017-05-31 Thread Lv Zheng
sing new indication: generating complement switch event for BIOS notified "close". So that when button driver is reverted back to "method" mode, it won't act worse than "ignore" mode on fixed systemd. Tested with systemd 233, all modes worked fine (no suspend/res

[RFC PATCH v4 4/5] ACPI: button: Fix lid notification locks

2017-05-31 Thread Lv Zheng
to raw notifier in order not to have events lost. Cc: Peter Hutterer Cc: Benjamin Tissoires Signed-off-by: Lv Zheng --- drivers/acpi/button.c | 53 --- 1 file changed, 29 insertions(+), 24 deletions(-) diff --git a/drivers/acpi/button.c b

[RFC PATCH v4 3/5] ACPI: button: Add lid event type debugging messages

2017-05-31 Thread Lv Zheng
This patch adds very useful debugging information to lid events. These messages and with ec_log_drv() can be used to demonstrate the order between acpi_ec_resume() and acpi_button_resume(). Cc: Benjamin Tissoires Cc: Peter Hutterer Signed-off-by: Lv Zheng --- drivers/acpi/button.c | 5

[RFC PATCH v4 1/5] ACPI: button: Add indication of BIOS notification and faked events

2017-05-31 Thread Lv Zheng
This patch adds a parameter to acpi_lid_notify_state() so that it can act differently against BIOS notification and kernel faked events. Cc: Cc: Benjamin Tissoires Cc: Peter Hutterer Signed-off-by: Lv Zheng --- drivers/acpi/button.c | 14 -- 1 file changed, 8 insertions(+), 6

[RFC PATCH v3 1/5] ACPI: button: Add indication of BIOS notification and faked events

2017-05-26 Thread Lv Zheng
This patch adds a parameter to acpi_lid_notify_state() so that it can act differently against BIOS notification and kernel faked events. Cc: Cc: Benjamin Tissoires Cc: Peter Hutterer Signed-off-by: Lv Zheng --- drivers/acpi/button.c | 14 -- 1 file changed, 8 insertions(+), 6

[RFC PATCH v3 2/5] ACPI: button: Extends complement switch event support for all modes

2017-05-26 Thread Lv Zheng
sing new indication: generating complement switch event for BIOS notified "close". So that when button driver is reverted back to "method" mode, it won't act worse than "ignore" mode on fixed systemd. Tested with systemd 233, all mode

[RFC PATCH v3 4/5] ACPI: button: Fix lid notification

2017-05-26 Thread Lv Zheng
to raw notifier in order not to have events lost. Cc: Peter Hutterer Cc: Benjamin Tissoires Signed-off-by: Lv Zheng --- drivers/acpi/button.c | 53 --- 1 file changed, 29 insertions(+), 24 deletions(-) diff --git a/drivers/acpi/button.c b

[RFC PATCH v3 5/5] ACPI: button: Always notify kernel space using _LID returning value

2017-05-26 Thread Lv Zheng
. This is a no-op cleanup, but facilitates administrators to configure to notify kernel drivers with faked lid init states via command line "button.lid_notify_init_state=Y". Cc: Cc: Cc: Benjamin Tissoires Cc: Peter Hutterer Signed-off-by: Lv Zheng --- drivers/acpi/button.c

[RFC PATCH v3 3/5] ACPI: button: Add lid event type debugging messages

2017-05-26 Thread Lv Zheng
This patch adds very useful debugging information to lid events. These messages and with ec_log_drv() can be used to demonstrate the order between acpi_ec_resume() and acpi_button_resume(). Cc: Benjamin Tissoires Cc: Peter Hutterer Signed-off-by: Lv Zheng --- drivers/acpi/button.c | 5

[PATCH v2 3/3] ACPI / EC: Fix media keys not working problem on some Asus laptops

2017-05-19 Thread Lv Zheng
l.org/show_bug.cgi?id=195651 Tested-by: Daniel Drake Signed-off-by: Chris Chiu Signed-off-by: Lv Zheng --- drivers/acpi/ec.c | 50 -- 1 file changed, 44 insertions(+), 6 deletions(-) diff --git a/drivers/acpi/ec.c b/drivers/acpi/ec.c index e2

[PATCH v2 2/3] ACPI / EC: Add support to skip boot stage DSDT probe

2017-05-19 Thread Lv Zheng
avior less effective. Link: http://bugzilla.kernel.org/show_bug.cgi?id=11880 [#1] Link: http://bugzilla.kernel.org/show_bug.cgi?id=119261 [#2] Link: http://bugzilla.kernel.org/show_bug.cgi?id=195651 [#3] Tested-by: Daniel Drake Signed-off-by: Lv Zheng --- drivers/acpi/ec.c | 8 1 file c

[PATCH v2 0/3] ACPI / EC: Add quirk modes for boot EC support

2017-05-19 Thread Lv Zheng
a keys not working problem on some Asus laptops Lv Zheng (2): ACPI / EC: Enhance boot EC sanity check ACPI / EC: Add support to skip boot stage DSDT probe drivers/acpi/ec.c | 66 ++- 1 file changed, 60 insertions(+), 6 deletions(-) -- 2.7.4

[PATCH v2 1/3] ACPI / EC: Enhance boot EC sanity check

2017-05-19 Thread Lv Zheng
bing wrong namespace ECs. Link: https://bugzilla.kernel.org/show_bug.cgi?id=195651 Tested-by: Daniel Drake Signed-off-by: Lv Zheng --- drivers/acpi/ec.c | 8 1 file changed, 8 insertions(+) diff --git a/drivers/acpi/ec.c b/drivers/acpi/ec.c index c24235d..a920db6 100644 --- a/drivers/acpi/

[PATCH v4 2/4] ACPICA: Tables: Add mechanism to allow to balance late stage acpi_get_table() independently

2017-05-08 Thread Lv Zheng
er be incremented/decremented to invalidate the table descriptor (means preventing table unmappings) so that acpi_put_table() balance changes can be done independently to each others. Lv Zheng. Cc: Dan Williams Signed-off-by: Lv Zheng --- drivers/acpi/acpica/tbutils.c

[PATCH v4 3/4] ACPI: sysfs: Fix acpi_get_table() leak

2017-05-08 Thread Lv Zheng
table ->validation_count is decremented after each read. Reported-by: Anush Seetharaman Signed-off-by: Dan Williams Signed-off-by: Lv Zheng --- drivers/acpi/sysfs.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/acpi/sysfs.c b/drivers/acpi/sysfs.c index 1b5e

[PATCH v4 4/4] ACPI: Fix memory mapping leaks in current sysfs dumpable ACPI tables support

2017-05-08 Thread Lv Zheng
acpidump execution, potentially causing problem on server platforms. With the new APIs, it is possible to release such useless table mappings. Signed-off-by: Lv Zheng --- drivers/acpi/sysfs.c | 41 +++-- 1 file changed, 31 insertions(+), 10 deletions(-) diff

[PATCH v4 1/4] ACPICA: Tables: Fix regression introduced by a too early mechanism enabling

2017-05-08 Thread Lv Zheng
by Lv Zheng. Fixes: 174cc7187e6f ("ACPICA: Tables: Back port acpi_get_table_with_size() and early_acpi_os_unmap_memory() from Linux kernel") Cc: Reported-by: Anush Seetharaman Reported-by: Dan Williams Cc: Anush Seetharaman Cc: Dan Williams Signed-off-by: Lv Zheng --- drivers/acpi/a

[PATCH v3 4/4] ACPI: Fix memory mapping leaks in current sysfs dumpable ACPI tables support

2017-04-27 Thread Lv Zheng
acpidump execution, potentially causing problem on server platforms. With the new APIs, it is possible to release such useless table mappings. Signed-off-by: Lv Zheng --- drivers/acpi/sysfs.c | 41 +++-- 1 file changed, 31 insertions(+), 10 deletions(-) diff

[PATCH v3 1/4] ACPICA: Tables: Fix regression introduced by a too early mechanism enabling

2017-04-27 Thread Lv Zheng
by Lv Zheng. Fixes: 174cc7187e6f ("ACPICA: Tables: Back port acpi_get_table_with_size() and early_acpi_os_unmap_memory() from Linux kernel") Cc: Anush Seetharaman Cc: Dan Williams Reported-by: Anush Seetharaman Reported-by: Dan Williams Signed-off-by: Lv Zheng --- drivers/acpi/acpic

[PATCH v3 2/4] ACPICA: Tables: Add mechanism to allow to balance late stage acpi_get_table() independently

2017-04-27 Thread Lv Zheng
to each others. Cc: Dan Williams Signed-off-by: Lv Zheng --- drivers/acpi/acpica/tbutils.c | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/drivers/acpi/acpica/tbutils.c b/drivers/acpi/acpica/tbutils.c index 7abe665..b517bd0 100644 --- a/drivers/acpi/acpica

[PATCH v3 3/4] ACPI: sysfs: Fix acpi_get_table() leak

2017-04-27 Thread Lv Zheng
table ->validation_count is decremented after each read. Reported-by: Anush Seetharaman Signed-off-by: Dan Williams Signed-off-by: Lv Zheng --- drivers/acpi/sysfs.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/acpi/sysfs.c b/drivers/acpi/sysfs.c index 1b5e

[PATCH v2 1/4] ACPICA: Tables: Fix regression introduced by a too early mechanism enabling

2017-04-27 Thread Lv Zheng
by Lv Zheng. Fixes: 174cc7187e6f ("ACPICA: Tables: Back port acpi_get_table_with_size() and early_acpi_os_unmap_memory() from Linux kernel") Cc: Dan Williams Reported-by: Anush Seetharaman Reported-by: Dan Williams Signed-off-by: Lv Zheng --- drivers/acpi/acpica/tbutils.c | 4 1

[PATCH v2 2/2] ACPI: Fix memory mapping leaks in current sysfs dumpable ACPI tables support.

2017-04-27 Thread Lv Zheng
original sysfs dumpable ACPI table implementation forces tables to be mapped after a read operation and never unmaps them again whatever there are no users in the kernel interested in these tables. With new balanced table handling APIs, tables are unmapped after the read operation. Signed-off-by: Lv

[PATCH v2 1/2] ACPICA: Tables: Fix regression introduced by a too early mechanism enabling

2017-04-27 Thread Lv Zheng
orted by Dan Williams, fixed by Lv Zheng. Fixes: 174cc7187e6f ("ACPICA: Tables: Back port acpi_get_table_with_size() and early_acpi_os_unmap_memory() from Linux kernel") Reported-by: Dan Williams Signed-off-by: Lv Zheng --- drivers/acpi/acpica/tbutils.c | 4 +++- 1 file changed, 3 i

[RFC PATCH] ACPICA: Tables: Fix regression introduced by a too early mechanism enabling

2017-04-25 Thread Lv Zheng
moves the fatal error but leaves the error report to indicate the leak so that developers can notice the required engineering change. Reported by Dan Williams, fixed by Lv Zheng. Reported-by: Dan Williams Signed-off-by: Lv Zheng --- drivers/acpi/acpica/tbutils.c | 1 - 1 file changed, 1 del

[PATCH 1/4] ACPICA: Linuxize: Restore and fix intel compiler build

2017-02-07 Thread Lv Zheng
Tested-by: Stepan M Mishura Signed-off-by: Lv Zheng --- include/acpi/platform/acenv.h | 2 +- include/acpi/platform/acintel.h | 87 + 2 files changed, 88 insertions(+), 1 deletion(-) create mode 100644 include/acpi/platform/acintel.h diff --git a/in

[PATCH 4/4] ACPICA: Update version to 20170119

2017-02-07 Thread Lv Zheng
From: Bob Moore ACPICA commit 711a8c19d3c646fdc069c38912d9037c7fa5e718 Version 20170119. Link: https://github.com/acpica/acpica/commit/711a8c19 Signed-off-by: Bob Moore Signed-off-by: Lv Zheng --- include/acpi/acpixf.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a

[PATCH 3/4] ACPICA: Tools: Update common signon, remove compilation bit width

2017-02-07 Thread Lv Zheng
ica/acpica/commit/43e04e75 Signed-off-by: Bob Moore Signed-off-by: Lv Zheng --- drivers/acpi/acpica/acapps.h | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/acpi/acpica/acapps.h b/drivers/acpi/acpica/acapps.h index c32bbe4..b65f273 100644 --- a/drivers/acpi/acpic

[PATCH 2/4] ACPICA: Source tree: Update copyright notices to 2017

2017-02-07 Thread Lv Zheng
From: Bob Moore ACPICA commit 16577e5265923f4999b4d2c0addb2343b18135e1 Affects all files. Link: https://github.com/acpica/acpica/commit/16577e52 Signed-off-by: Bob Moore Signed-off-by: Lv Zheng --- drivers/acpi/acpica/acapps.h | 4 ++-- drivers/acpi/acpica

[PATCH 0/4] ACPICA 20170119 Release

2017-02-07 Thread Lv Zheng
0119 Release): 369 lines Bob Moore (3): ACPICA: Source tree: Update copyright notices to 2017 ACPICA: Tools: Update common signon, remove compilation bit width ACPICA: Update version to 20170119 Lv Zheng (1): ACPICA: Linuxize: Restore and fix intel compiler build drivers/acpi/acpica/acapps.h

[PATCH] ACPI / OSL: Fix rcu synchronization logic

2017-01-09 Thread Lv Zheng
acpi_os_map_generic_address(). So before it is invoked, there is no need to invoke synchronize_rcu_expedited(). Suggested-by: Huang Ying Signed-off-by: Lv Zheng Cc: Huang Ying Cc: Borislav Petkov --- drivers/acpi/osl.c |5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a

[PATCH] ACPI / EC: Remove old CLEAR_ON_RESUME quirk

2017-01-03 Thread Lv Zheng
CLEAR_ON_RESUME quirk to let the users to try the newer approach. More statements can be found at Link #1. Link: https://bugzilla.kernel.org/show_bug.cgi?id=191211 [#1] Signed-off-by: Lv Zheng --- drivers/acpi/ec.c | 53 - 1 file changed,

[PATCH 01/18] ACPICA: Debugger: Rename debugger OSL names

2016-12-28 Thread Lv Zheng
requested by ACPICA to use expected OSL names. Suggested by Bob Moore, Fixed by Lv Zheng. Linux is not affected by this patch. Link: https://github.com/acpica/acpica/commit/e76eb8b3 Signed-off-by: Lv Zheng Signed-off-by: Bob Moore --- drivers/acpi/acpica/dbxface.c | 4 ++-- include/acpi/acpiosxf.h

[PATCH 02/18] ACPICA: Hardware: Remove bit_offset masking support

2016-12-27 Thread Lv Zheng
(W1C, W0C); 2. Normally a mask value will be provided for region format GAS. So actually the callers are the only ones having the knowledge of masking the register values. Suggested by Bob Moore, Fixed by Lv Zheng. Link: https://github.com/acpica/acpica/commit/bc7c5291 Signed-off-by: Lv Zheng Signed

[PATCH 08/18] ACPICA: Linux-specific header: Add support for s390x compilation.

2016-12-27 Thread Lv Zheng
From: Colin Ian King ACPICA commit ecac9504e32d3b501c8cb021afb253b4a83fc82f Adds s390x as a 64-bit architecture. Link: https://github.com/acpica/acpica/commit/ecac9504 Signed-off-by: Colin Ian King Signed-off-by: Bob Moore Signed-off-by: Lv Zheng --- include/acpi/platform/aclinux.h | 3

[PATCH 06/18] ACPICA: Macro header: Fix some typos in comments. No functional change

2016-12-27 Thread Lv Zheng
From: Bob Moore ACPICA commit efc97d1d209947d6990ec81a192c6b2589d3e368 Link: https://github.com/acpica/acpica/commit/efc97d1 Signed-off-by: Bob Moore Signed-off-by: Lv Zheng --- drivers/acpi/acpica/acmacros.h | 14 -- 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a

[PATCH 05/18] ACPICA: Hardware: Sort access bit width algorithm

2016-12-27 Thread Lv Zheng
ACPICA commit 365b321a31cb701957c055cae2d2161577147252 GAS can be in register or register region format, so we need to improve our "register" format detection code in order not to regress. Such detection may be still experimental, and is generated according to the current known facts

[PATCH 04/18] ACPICA: Utilities: Add power of two rounding support

2016-12-27 Thread Lv Zheng
. This support may not be performance friendly, so the APIs might be overridden by the hosts implementations with ACPI_USE_NATIVE_BIT_FINDER defined. Lv Zheng. Link: https://github.com/acpica/acpica/commit/cbb02946 Signed-off-by: Lv Zheng Signed-off-by: Bob Moore --- drivers/acpi/acpica/acmacros.h

[PATCH 16/18] ACPICA: Fix a problem with recent extra support for control method invocations

2016-12-27 Thread Lv Zheng
://github.com/acpica/acpica/commit/b7dae343 Signed-off-by: Bob Moore Signed-off-by: Lv Zheng --- drivers/acpi/acpica/psargs.c | 25 - 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/drivers/acpi/acpica/psargs.c b/drivers/acpi/acpica/psargs.c index 4e1065e

[PATCH 09/18] ACPICA: MSVC: Fix MSVC6 build issues

2016-12-27 Thread Lv Zheng
/fa068003 Signed-off-by: Lv Zheng Signed-off-by: Bob Moore --- include/acpi/platform/acenv.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/acpi/platform/acenv.h b/include/acpi/platform/acenv.h index 34cce72..cf93b66 100644 --- a/include/acpi/platform/acenv.h +++ b

[PATCH 07/18] ACPICA: Hardware: Add sleep register hooks

2016-12-27 Thread Lv Zheng
OSL to reduce the divergences. Lv Zheng. Link: https://github.com/acpica/acpica/commit/ba665dc8 Signed-off-by: Lv Zheng Signed-off-by: Bob Moore --- drivers/acpi/acpica/hwesleep.c | 35 ++ drivers/acpi/acpica/hwsleep.c | 11

[PATCH 00/18] ACPICA 20161222 Release

2016-12-27 Thread Lv Zheng
for s390x compilation. David E. Box (1): ACPICA: Disassembler: Add Switch/Case disassembly support Lv Zheng (8): ACPICA: Debugger: Rename debugger OSL names ACPICA: Hardware: Remove bit_offset masking support ACPICA: Hardware: Add access_width/bit_offset support in acpi_hw_write() ACPI

[PATCH 03/18] ACPICA: Hardware: Add access_width/bit_offset support in acpi_hw_write()

2016-12-27 Thread Lv Zheng
ACPICA commit 1ecab20bbe69a176dfb6da7210fe77aa6b3ad680 This patch adds access_width/bit_offset support in acpi_hw_write(). Lv Zheng. Link: https://github.com/acpica/acpica/commit/1ecab20b Signed-off-by: Lv Zheng Signed-off-by: Bob Moore --- drivers/acpi/acpica/hwregs.c | 62

[PATCH 18/18] ACPICA: Update version to 20161222

2016-12-27 Thread Lv Zheng
: Lv Zheng --- include/acpi/acpixf.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/acpi/acpixf.h b/include/acpi/acpixf.h index f5e10dd..12f4266 100644 --- a/include/acpi/acpixf.h +++ b/include/acpi/acpixf.h @@ -46,7 +46,7 @@ /* Current ACPICA subsystem version in

[PATCH 15/18] ACPICA: Parser: Allow method invocations as target operands

2016-12-27 Thread Lv Zheng
://github.com/acpica/acpica/commit/a6cca7a4 Signed-off-by: Bob Moore Signed-off-by: Lv Zheng --- drivers/acpi/acpica/psargs.c | 86 -- drivers/acpi/acpica/psloop.c | 4 ++ drivers/acpi/acpica/psobject.c | 10 - drivers/acpi/acpica/pstree.c | 10

[PATCH 17/18] ACPICA: Parser: Update parse info table for some operators

2016-12-27 Thread Lv Zheng
From: Bob Moore ACPICA commit b90e39948954ff400cff1a3f8effddb67f15460b Operand for deref_of should not have been a term_arg, should be super_name. Rename NAME_OR_REF to SIMPLENAME. Link: https://github.com/acpica/acpica/commit/b90e3994 Signed-off-by: Bob Moore Signed-off-by: Lv Zheng

[PATCH 13/18] ACPICA: Resources: Not a valid resource if buffer length too long

2016-12-27 Thread Lv Zheng
resource descriptor. Link: https://github.com/acpica/acpica/commit/9f76de2d Link: https://github.com/acpica/acpica/commit/b2e89d72 Link: https://github.com/acpica/acpica/commit/23b5bbe6 Signed-off-by: Bob Moore Signed-off-by: Lv Zheng --- drivers/acpi/acpica/utresrc.c | 17 - 1 file

[PATCH 12/18] ACPICA: Utilities: Update debug output

2016-12-27 Thread Lv Zheng
From: Bob Moore ACPICA commit 082b5b3ee31f74735e166858eeda025288604a5a Enhancement of miscellaneous debug output. Link: https://github.com/acpica/acpica/commit/082b5b3e Signed-off-by: Bob Moore Signed-off-by: Lv Zheng --- drivers/acpi/acpica/utdecode.c | 4 ++-- drivers/acpi/acpica

[PATCH 10/18] ACPICA: EFI: Add efihello demo application

2016-12-27 Thread Lv Zheng
ACPICA commit 3fcc59f4755607dd066ac8ef869f0aa95e871b84 This patch adds a demo EFI application for stdin/stdout testing. This utility can be used to narrow down root causes of porting issues. Lv Zheng. Linux is not affected by this patch. Link: https://github.com/acpica/acpica/commit/3fcc59f4

[PATCH 11/18] ACPICA: Disassembler: Add Switch/Case disassembly support

2016-12-27 Thread Lv Zheng
nal Switch statement. Linux kernel is not affected by this patch. Link: https://github.com/acpica/acpica/commit/0f6cc80e Signed-off-by: David E. Box Signed-off-by: Bob Moore Signed-off-by: Lv Zheng --- drivers/acpi/acpica/aclocal.h | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) di

[PATCH] ACPI / OSL: Fix a regression by returning table size via acpi_get_table_with_size()

2016-12-08 Thread Lv Zheng
The returned size is still used by the drivers. Reported-by: Dan Williams Cc: Dan Williams Signed-off-by: Lv Zheng --- drivers/acpi/osl.c |8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/acpi/osl.c b/drivers/acpi/osl.c index 5bef0f65..adf1ec4 100644 --- a

  1   2   3   4   5   6   7   8   9   10   >