Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1437758 > unrolled thread
| Started by | Wolfram Sang <wsa@the-dreams.de> |
|---|---|
| First post | 2016-07-06 16:20 +0200 |
| Last post | 2016-07-08 03:30 +0200 |
| Articles | 10 — 4 participants |
Back to article view | Back to linux.kernel
Regression between rc2 and rc6: ACPI EC problems Wolfram Sang <wsa@the-dreams.de> - 2016-07-06 16:20 +0200
Re: Regression between rc2 and rc6: ACPI EC problems "Rafael J. Wysocki" <rjw@rjwysocki.net> - 2016-07-06 23:30 +0200
RE: Regression between rc2 and rc6: ACPI EC problems "Zheng, Lv" <lv.zheng@intel.com> - 2016-07-07 02:30 +0200
Re: Regression between rc2 and rc6: ACPI EC problems "Rafael J. Wysocki" <rjw@rjwysocki.net> - 2016-07-07 02:40 +0200
RE: Regression between rc2 and rc6: ACPI EC problems "Zheng, Lv" <lv.zheng@intel.com> - 2016-07-07 02:40 +0200
RE: Regression between rc2 and rc6: ACPI EC problems "Zheng, Lv" <lv.zheng@intel.com> - 2016-07-07 02:40 +0200
RE: Regression between rc2 and rc6: ACPI EC problems "Zheng, Lv" <lv.zheng@intel.com> - 2016-07-07 02:40 +0200
[RFC PATCH] ACPI / EC: Fix an order issue in ec_remove_handlers() Lv Zheng <lv.zheng@intel.com> - 2016-07-07 04:00 +0200
RE: [RFC PATCH] ACPI / EC: Fix an order issue in ec_remove_handlers() "Zheng, Lv" <lv.zheng@intel.com> - 2016-07-07 06:40 +0200
[PATCH v3] ACPI / EC: Fix an order issue in ec_remove_handlers() Lv Zheng <lv.zheng@intel.com> - 2016-07-08 03:30 +0200
| From | Wolfram Sang <wsa@the-dreams.de> |
|---|---|
| Date | 2016-07-06 16:20 +0200 |
| Subject | Regression between rc2 and rc6: ACPI EC problems |
| Message-ID | <rRVQd-1PF-15@gated-at.bofh.it> |
[Multipart message — attachments visible in raw view] — view raw
Hi, when upgrading from v4.7-rc2 to rc6 on my Dell Mini 9, battery and temperature status info got bogus. Here is the major change between the boot logs: ACPI : EC: EC stopped ACPI Exception: AE_BAD_PARAMETER, Returned by Handler for [EmbeddedControl] (20160422/evregion-300) ACPI Error: Method parse/execution failed [\_SB.PCI0.LPCB.EC0._REG] (Node f5d09870), AE_BAD_PARAMETER (20160422/psparse-542) ACPI Exception: AE_BAD_PARAMETER, from region _REG, [EmbeddedControl] (20160422/evregion-397) ACPI Exception: AE_BAD_PARAMETER, Returned by Handler for [EmbeddedControl] (20160422/evregion-300) ACPI Error: Method parse/execution failed [\_SB.PCI0.LPCB.EC0._REG] (Node f5d09870), AE_BAD_PARAMETER (20160422/psparse-542) ACPI Exception: AE_BAD_PARAMETER, from region _REG, [EmbeddedControl] (20160422/evregion-397) ACPI : EC: GPE = 0x19, I/O: command/status = 0x66, data = 0x62 ACPI : EC: EC started The only config changes between the kernels were enabling MMC block devices and DM_CRYPT. Not likely to cause the above, I'd think. Does that ring a bell for someone? This little machine has only an SSD without TRIM, so bisecting is not really an option. I can provide more info and test patches, though. Thanks, Wolfram
[toc] | [next] | [standalone]
| From | "Rafael J. Wysocki" <rjw@rjwysocki.net> |
|---|---|
| Date | 2016-07-06 23:30 +0200 |
| Message-ID | <rS2ym-64W-15@gated-at.bofh.it> |
| In reply to | #1437758 |
[Multipart message — attachments visible in raw view] — view raw
On Wednesday, July 06, 2016 11:14:11 PM Wolfram Sang wrote: > Hi, > > when upgrading from v4.7-rc2 to rc6 on my Dell Mini 9, battery and > temperature status info got bogus. Here is the major change between the > boot logs: > > ACPI : EC: EC stopped > ACPI Exception: AE_BAD_PARAMETER, Returned by Handler for [EmbeddedControl] (20160422/evregion-300) > ACPI Error: Method parse/execution failed [\_SB.PCI0.LPCB.EC0._REG] (Node f5d09870), AE_BAD_PARAMETER (20160422/psparse-542) > ACPI Exception: AE_BAD_PARAMETER, from region _REG, [EmbeddedControl] (20160422/evregion-397) > ACPI Exception: AE_BAD_PARAMETER, Returned by Handler for [EmbeddedControl] (20160422/evregion-300) > ACPI Error: Method parse/execution failed [\_SB.PCI0.LPCB.EC0._REG] (Node f5d09870), AE_BAD_PARAMETER (20160422/psparse-542) > ACPI Exception: AE_BAD_PARAMETER, from region _REG, [EmbeddedControl] (20160422/evregion-397) > ACPI : EC: GPE = 0x19, I/O: command/status = 0x66, data = 0x62 > ACPI : EC: EC started > > The only config changes between the kernels were enabling MMC block > devices and DM_CRYPT. Not likely to cause the above, I'd think. > > Does that ring a bell for someone? This little machine has only an SSD > without TRIM, so bisecting is not really an option. I can provide more > info and test patches, though. There is one commit related directly to EC between -rc2 and -rc6: dcf15cbded65 ACPI / EC: Fix a boot EC regresion by restoring boot EC support for the DSDT EC There also are two ACPICA commits in that frame that may be related to it 2f38b1b16d92 ACPICA: Namespace: Fix deadlock triggered by MLC support in dynamic table loading da4e792550a8 Revert "ACPICA: ACPI 2.0, Hardware: Add access_width/bit_offset support for acpi_hw_write()" but one of them is a revert, so can you please check dcf15cbded65 and 2f38b1b16d92? Thanks, Rafael
[toc] | [prev] | [next] | [standalone]
| From | "Zheng, Lv" <lv.zheng@intel.com> |
|---|---|
| Date | 2016-07-07 02:30 +0200 |
| Message-ID | <rS5mx-7SX-1@gated-at.bofh.it> |
| In reply to | #1437948 |
Hi, Rafael > From: Rafael J. Wysocki [mailto:rjw@rjwysocki.net] > Sent: Thursday, July 7, 2016 5:29 AM > Subject: Re: Regression between rc2 and rc6: ACPI EC problems > > On Wednesday, July 06, 2016 11:14:11 PM Wolfram Sang wrote: > > Hi, > > > > when upgrading from v4.7-rc2 to rc6 on my Dell Mini 9, battery and > > temperature status info got bogus. Here is the major change between > the > > boot logs: > > > > ACPI : EC: EC stopped > > ACPI Exception: AE_BAD_PARAMETER, Returned by Handler for > [EmbeddedControl] (20160422/evregion-300) > > ACPI Error: Method parse/execution failed [\_SB.PCI0.LPCB.EC0._REG] > (Node f5d09870), AE_BAD_PARAMETER (20160422/psparse-542) > > ACPI Exception: AE_BAD_PARAMETER, from region _REG, > [EmbeddedControl] (20160422/evregion-397) > > ACPI Exception: AE_BAD_PARAMETER, Returned by Handler for > [EmbeddedControl] (20160422/evregion-300) > > ACPI Error: Method parse/execution failed [\_SB.PCI0.LPCB.EC0._REG] > (Node f5d09870), AE_BAD_PARAMETER (20160422/psparse-542) > > ACPI Exception: AE_BAD_PARAMETER, from region _REG, > [EmbeddedControl] (20160422/evregion-397) > > ACPI : EC: GPE = 0x19, I/O: command/status = 0x66, data = 0x62 > > ACPI : EC: EC started [Lv Zheng] This is a known order issue that ACPICA executes _REG(DISCONENCT) after removing the opregion handler. But this issue is not a function failure, it only generates error garbage in the kernel log. So we didn't fix it in a hurry. There is another order issue detected in the same Bugzilla entry that: _REG(CONNECT/DISCONNECT) shouldn't be invoked for SystemMemory/SystemIo and PCI_Config that under a PCI root bus containing _BBN method. Which is also proven by the Windows behavior and spec definitions. I was planning to fix the both issues in the ACPICA upstream. The bug is here for your reference: https://bugzilla.kernel.org/show_bug.cgi?id=102421 For now, since this is just a non-function-failure error report, we can ignore it. Because sometimes, when there are several problems related, we have to make a choice to fix one of them first. Thanks and best regards -Lv > > > > The only config changes between the kernels were enabling MMC block > > devices and DM_CRYPT. Not likely to cause the above, I'd think. > > > > Does that ring a bell for someone? This little machine has only an SSD > > without TRIM, so bisecting is not really an option. I can provide more > > info and test patches, though. > > There is one commit related directly to EC between -rc2 and -rc6: > > dcf15cbded65 ACPI / EC: Fix a boot EC regresion by restoring boot EC > support for the DSDT EC > > There also are two ACPICA commits in that frame that may be related to it > > 2f38b1b16d92 ACPICA: Namespace: Fix deadlock triggered by MLC > support in dynamic table loading > da4e792550a8 Revert "ACPICA: ACPI 2.0, Hardware: Add > access_width/bit_offset support for acpi_hw_write()" > > but one of them is a revert, so can you please check dcf15cbded65 and > 2f38b1b16d92? > > Thanks, > Rafael
[toc] | [prev] | [next] | [standalone]
| From | "Rafael J. Wysocki" <rjw@rjwysocki.net> |
|---|---|
| Date | 2016-07-07 02:40 +0200 |
| Message-ID | <rS5wd-7Xe-3@gated-at.bofh.it> |
| In reply to | #1438024 |
On Thursday, July 07, 2016 12:26:49 AM Zheng, Lv wrote: > Hi, Rafael > > > From: Rafael J. Wysocki [mailto:rjw@rjwysocki.net] > > Sent: Thursday, July 7, 2016 5:29 AM > > Subject: Re: Regression between rc2 and rc6: ACPI EC problems > > > > On Wednesday, July 06, 2016 11:14:11 PM Wolfram Sang wrote: > > > Hi, > > > > > > when upgrading from v4.7-rc2 to rc6 on my Dell Mini 9, battery and > > > temperature status info got bogus. Here is the major change between > > the > > > boot logs: > > > > > > ACPI : EC: EC stopped > > > ACPI Exception: AE_BAD_PARAMETER, Returned by Handler for > > [EmbeddedControl] (20160422/evregion-300) > > > ACPI Error: Method parse/execution failed [\_SB.PCI0.LPCB.EC0._REG] > > (Node f5d09870), AE_BAD_PARAMETER (20160422/psparse-542) > > > ACPI Exception: AE_BAD_PARAMETER, from region _REG, > > [EmbeddedControl] (20160422/evregion-397) > > > ACPI Exception: AE_BAD_PARAMETER, Returned by Handler for > > [EmbeddedControl] (20160422/evregion-300) > > > ACPI Error: Method parse/execution failed [\_SB.PCI0.LPCB.EC0._REG] > > (Node f5d09870), AE_BAD_PARAMETER (20160422/psparse-542) > > > ACPI Exception: AE_BAD_PARAMETER, from region _REG, > > [EmbeddedControl] (20160422/evregion-397) > > > ACPI : EC: GPE = 0x19, I/O: command/status = 0x66, data = 0x62 > > > ACPI : EC: EC started > [Lv Zheng] > This is a known order issue that ACPICA executes _REG(DISCONENCT) after removing the opregion handler. > But this issue is not a function failure, it only generates error garbage in the kernel log. > So we didn't fix it in a hurry. > > There is another order issue detected in the same Bugzilla entry that: > _REG(CONNECT/DISCONNECT) shouldn't be invoked for SystemMemory/SystemIo and PCI_Config that under a PCI root bus containing _BBN method. > Which is also proven by the Windows behavior and spec definitions. > > I was planning to fix the both issues in the ACPICA upstream. > The bug is here for your reference: > https://bugzilla.kernel.org/show_bug.cgi?id=102421 > > For now, since this is just a non-function-failure error report, we can ignore it. > Because sometimes, when there are several problems related, we have to make a choice to fix one of them first. Well, please look at the report again. It says: "when upgrading from v4.7-rc2 to rc6 on my Dell Mini 9, battery and temperature status info got bogus". So, it very much *is* a functional issue and I'm not going to ignore it. Thanks, Rafael
[toc] | [prev] | [next] | [standalone]
| From | "Zheng, Lv" <lv.zheng@intel.com> |
|---|---|
| Date | 2016-07-07 02:40 +0200 |
| Message-ID | <rS5wd-7Xe-9@gated-at.bofh.it> |
| In reply to | #1438030 |
Hi, Rafael > From: linux-acpi-owner@vger.kernel.org [mailto:linux-acpi- > owner@vger.kernel.org] On Behalf Of Rafael J. Wysocki > Subject: Re: Regression between rc2 and rc6: ACPI EC problems > > On Thursday, July 07, 2016 12:26:49 AM Zheng, Lv wrote: > > Hi, Rafael > > > > > From: Rafael J. Wysocki [mailto:rjw@rjwysocki.net] > > > Sent: Thursday, July 7, 2016 5:29 AM > > > Subject: Re: Regression between rc2 and rc6: ACPI EC problems > > > > > > On Wednesday, July 06, 2016 11:14:11 PM Wolfram Sang wrote: > > > > Hi, > > > > > > > > when upgrading from v4.7-rc2 to rc6 on my Dell Mini 9, battery and > > > > temperature status info got bogus. Here is the major change > between > > > the > > > > boot logs: > > > > > > > > ACPI : EC: EC stopped > > > > ACPI Exception: AE_BAD_PARAMETER, Returned by Handler for > > > [EmbeddedControl] (20160422/evregion-300) > > > > ACPI Error: Method parse/execution failed [\_SB.PCI0.LPCB.EC0._REG] > > > (Node f5d09870), AE_BAD_PARAMETER (20160422/psparse-542) > > > > ACPI Exception: AE_BAD_PARAMETER, from region _REG, > > > [EmbeddedControl] (20160422/evregion-397) > > > > ACPI Exception: AE_BAD_PARAMETER, Returned by Handler for > > > [EmbeddedControl] (20160422/evregion-300) > > > > ACPI Error: Method parse/execution failed [\_SB.PCI0.LPCB.EC0._REG] > > > (Node f5d09870), AE_BAD_PARAMETER (20160422/psparse-542) > > > > ACPI Exception: AE_BAD_PARAMETER, from region _REG, > > > [EmbeddedControl] (20160422/evregion-397) > > > > ACPI : EC: GPE = 0x19, I/O: command/status = 0x66, data = 0x62 > > > > ACPI : EC: EC started > > [Lv Zheng] > > This is a known order issue that ACPICA executes _REG(DISCONENCT) > after removing the opregion handler. > > But this issue is not a function failure, it only generates error garbage in > the kernel log. > > So we didn't fix it in a hurry. > > > > There is another order issue detected in the same Bugzilla entry that: > > _REG(CONNECT/DISCONNECT) shouldn't be invoked for > SystemMemory/SystemIo and PCI_Config that under a PCI root bus > containing _BBN method. > > Which is also proven by the Windows behavior and spec definitions. > > > > I was planning to fix the both issues in the ACPICA upstream. > > The bug is here for your reference: > > https://bugzilla.kernel.org/show_bug.cgi?id=102421 > > > > For now, since this is just a non-function-failure error report, we can > ignore it. > > Because sometimes, when there are several problems related, we have > to make a choice to fix one of them first. > > Well, please look at the report again. It says: > > "when upgrading from v4.7-rc2 to rc6 on my Dell Mini 9, battery and > temperature status info got bogus". > > So, it very much *is* a functional issue and I'm not going to ignore it. [Lv Zheng] What does the bogus mean here? Anyway, I'll post a fix for this first. I'll do this right now. Thanks and best regards -Lv
[toc] | [prev] | [next] | [standalone]
| From | "Zheng, Lv" <lv.zheng@intel.com> |
|---|---|
| Date | 2016-07-07 02:40 +0200 |
| Message-ID | <rS5wd-7Xe-7@gated-at.bofh.it> |
| In reply to | #1437758 |
Hi, Wolfram > From: linux-acpi-owner@vger.kernel.org [mailto:linux-acpi- > owner@vger.kernel.org] On Behalf Of Wolfram Sang > Subject: Regression between rc2 and rc6: ACPI EC problems > > Hi, > > when upgrading from v4.7-rc2 to rc6 on my Dell Mini 9, battery and > temperature status info got bogus. Here is the major change between the > boot logs: > > ACPI : EC: EC stopped > ACPI Exception: AE_BAD_PARAMETER, Returned by Handler for > [EmbeddedControl] (20160422/evregion-300) > ACPI Error: Method parse/execution failed [\_SB.PCI0.LPCB.EC0._REG] > (Node f5d09870), AE_BAD_PARAMETER (20160422/psparse-542) > ACPI Exception: AE_BAD_PARAMETER, from region _REG, > [EmbeddedControl] (20160422/evregion-397) > ACPI Exception: AE_BAD_PARAMETER, Returned by Handler for > [EmbeddedControl] (20160422/evregion-300) > ACPI Error: Method parse/execution failed [\_SB.PCI0.LPCB.EC0._REG] > (Node f5d09870), AE_BAD_PARAMETER (20160422/psparse-542) > ACPI Exception: AE_BAD_PARAMETER, from region _REG, > [EmbeddedControl] (20160422/evregion-397) > ACPI : EC: GPE = 0x19, I/O: command/status = 0x66, data = 0x62 > ACPI : EC: EC started > > The only config changes between the kernels were enabling MMC block > devices and DM_CRYPT. Not likely to cause the above, I'd think. > > Does that ring a bell for someone? This little machine has only an SSD > without TRIM, so bisecting is not really an option. I can provide more > info and test patches, though. [Lv Zheng] Please just ignore this for several release cycles. We need strategy to fix the ACPI initialization order issues. This is already a noted non-function-failure issue. We just need to fix the functional ones prior than this. Thanks and best regards -Lv
[toc] | [prev] | [next] | [standalone]
| From | "Zheng, Lv" <lv.zheng@intel.com> |
|---|---|
| Date | 2016-07-07 02:40 +0200 |
| Message-ID | <rS5wd-7Xe-11@gated-at.bofh.it> |
| In reply to | #1437758 |
Hi, Walfram You can register onto the kernel Bugzilla and monitor this bug for further updates: https://bugzilla.kernel.org/show_bug.cgi?id=102421 Thanks and best regards -Lv > From: linux-acpi-owner@vger.kernel.org [mailto:linux-acpi- > owner@vger.kernel.org] On Behalf Of Wolfram Sang > Subject: Regression between rc2 and rc6: ACPI EC problems > > Hi, > > when upgrading from v4.7-rc2 to rc6 on my Dell Mini 9, battery and > temperature status info got bogus. Here is the major change between the > boot logs: > > ACPI : EC: EC stopped > ACPI Exception: AE_BAD_PARAMETER, Returned by Handler for > [EmbeddedControl] (20160422/evregion-300) > ACPI Error: Method parse/execution failed [\_SB.PCI0.LPCB.EC0._REG] > (Node f5d09870), AE_BAD_PARAMETER (20160422/psparse-542) > ACPI Exception: AE_BAD_PARAMETER, from region _REG, > [EmbeddedControl] (20160422/evregion-397) > ACPI Exception: AE_BAD_PARAMETER, Returned by Handler for > [EmbeddedControl] (20160422/evregion-300) > ACPI Error: Method parse/execution failed [\_SB.PCI0.LPCB.EC0._REG] > (Node f5d09870), AE_BAD_PARAMETER (20160422/psparse-542) > ACPI Exception: AE_BAD_PARAMETER, from region _REG, > [EmbeddedControl] (20160422/evregion-397) > ACPI : EC: GPE = 0x19, I/O: command/status = 0x66, data = 0x62 > ACPI : EC: EC started > > The only config changes between the kernels were enabling MMC block > devices and DM_CRYPT. Not likely to cause the above, I'd think. > > Does that ring a bell for someone? This little machine has only an SSD > without TRIM, so bisecting is not really an option. I can provide more > info and test patches, though. > > Thanks, > > Wolfram
[toc] | [prev] | [next] | [standalone]
| From | Lv Zheng <lv.zheng@intel.com> |
|---|---|
| Date | 2016-07-07 04:00 +0200 |
| Subject | [RFC PATCH] ACPI / EC: Fix an order issue in ec_remove_handlers() |
| Message-ID | <rS6LD-dY-9@gated-at.bofh.it> |
| In reply to | #1437758 |
There is an order issue in ec_remove_handlers() that the functions invoked
in it are not invoked in the reversed order of their appearance in
ec_install_handlers(). This existing issue has been triggered by the
following commit:
Commit: dcf15cbded656a12335bc4151f3f75f10080a375
Subject: ACPI / EC: Fix a boot EC regresion by restoring boot EC
The commit invokes ec_remove_handlers() during runtime, thus uncovers this
issue. This patch fixes this regression.
Fixes: dcf15cbded65 ("ACPI / EC: Fix a boot EC regresion by restoring boot EC")
Link: https://bugzilla.kernel.org/show_bug.cgi?id=102421
Reported-by: Wolfram Sang <wsa@the-dreams.de>
Reported-by: Nicholas <nkudriavtsev@gmail.com>
Cc: Wolfram Sang <wsa@the-dreams.de>
Cc: Nicholas <nkudriavtsev@gmail.com>
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
---
drivers/acpi/ec.c | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/drivers/acpi/ec.c b/drivers/acpi/ec.c
index b1050a0..9ff3d4b 100644
--- a/drivers/acpi/ec.c
+++ b/drivers/acpi/ec.c
@@ -1331,7 +1331,12 @@ static int ec_install_handlers(struct acpi_ec *ec)
static void ec_remove_handlers(struct acpi_ec *ec)
{
- acpi_ec_stop(ec, false);
+ if (test_bit(EC_FLAGS_GPE_HANDLER_INSTALLED, &ec->flags)) {
+ if (ACPI_FAILURE(acpi_remove_gpe_handler(NULL, ec->gpe,
+ &acpi_ec_gpe_handler)))
+ pr_err("failed to remove gpe handler\n");
+ clear_bit(EC_FLAGS_GPE_HANDLER_INSTALLED, &ec->flags);
+ }
if (test_bit(EC_FLAGS_EC_HANDLER_INSTALLED, &ec->flags)) {
if (ACPI_FAILURE(acpi_remove_address_space_handler(ec->handle,
@@ -1340,12 +1345,7 @@ static void ec_remove_handlers(struct acpi_ec *ec)
clear_bit(EC_FLAGS_EC_HANDLER_INSTALLED, &ec->flags);
}
- if (test_bit(EC_FLAGS_GPE_HANDLER_INSTALLED, &ec->flags)) {
- if (ACPI_FAILURE(acpi_remove_gpe_handler(NULL, ec->gpe,
- &acpi_ec_gpe_handler)))
- pr_err("failed to remove gpe handler\n");
- clear_bit(EC_FLAGS_GPE_HANDLER_INSTALLED, &ec->flags);
- }
+ acpi_ec_stop(ec, false);
}
static struct acpi_ec *acpi_ec_alloc(void)
--
1.7.10
[toc] | [prev] | [next] | [standalone]
| From | "Zheng, Lv" <lv.zheng@intel.com> |
|---|---|
| Date | 2016-07-07 06:40 +0200 |
| Subject | RE: [RFC PATCH] ACPI / EC: Fix an order issue in ec_remove_handlers() |
| Message-ID | <rS9gu-21W-3@gated-at.bofh.it> |
| In reply to | #1438125 |
This one and the previous one contain problems.
A patch marked as [UPDATE RFC v2] is the correct fix.
Sorry for the noise.
Thanks and best regards
-Lv
> From: Zheng, Lv
> Subject: [RFC PATCH] ACPI / EC: Fix an order issue in ec_remove_handlers()
>
> There is an order issue in ec_remove_handlers() that the functions invoked
> in it are not invoked in the reversed order of their appearance in
> ec_install_handlers(). This existing issue has been triggered by the
> following commit:
> Commit: dcf15cbded656a12335bc4151f3f75f10080a375
> Subject: ACPI / EC: Fix a boot EC regresion by restoring boot EC
> The commit invokes ec_remove_handlers() during runtime, thus uncovers
> this
> issue. This patch fixes this regression.
>
> Fixes: dcf15cbded65 ("ACPI / EC: Fix a boot EC regresion by restoring boot
> EC")
> Link: https://bugzilla.kernel.org/show_bug.cgi?id=102421
> Reported-by: Wolfram Sang <wsa@the-dreams.de>
> Reported-by: Nicholas <nkudriavtsev@gmail.com>
> Cc: Wolfram Sang <wsa@the-dreams.de>
> Cc: Nicholas <nkudriavtsev@gmail.com>
> Signed-off-by: Lv Zheng <lv.zheng@intel.com>
> ---
> drivers/acpi/ec.c | 14 +++++++-------
> 1 file changed, 7 insertions(+), 7 deletions(-)
>
> Index: linux-acpica/drivers/acpi/ec.c
> ==========================================================
> =========
> --- linux-acpica.orig/drivers/acpi/ec.c
> +++ linux-acpica/drivers/acpi/ec.c
> @@ -1331,8 +1331,6 @@ static int ec_install_handlers(struct ac
>
> static void ec_remove_handlers(struct acpi_ec *ec)
> {
> - acpi_ec_stop(ec, false);
> -
> if (test_bit(EC_FLAGS_EC_HANDLER_INSTALLED, &ec->flags)) {
> if (ACPI_FAILURE(acpi_remove_address_space_handler(ec-
> >handle,
> ACPI_ADR_SPACE_EC,
> &acpi_ec_space_handler)))
> @@ -1340,6 +1338,17 @@ static void ec_remove_handlers(struct ac
> clear_bit(EC_FLAGS_EC_HANDLER_INSTALLED, &ec->flags);
> }
>
> + /*
> + * Disabling EC (transactions) after removing the operation region
> + * handler. This order is required because _REG(DISCONNECT) may
> + * access the EmbeddedControl operation regions.
> + *
> + * Flushing transactions before removing the GPE handler. This is
> + * required by the current ACPICA GPE design. ACPICA GPE will
> block
> + * a GPE if there is no way to handle it.
> + */
> + acpi_ec_stop(ec, false);
> +
> if (test_bit(EC_FLAGS_GPE_HANDLER_INSTALLED, &ec->flags)) {
> if (ACPI_FAILURE(acpi_remove_gpe_handler(NULL, ec->gpe,
> &acpi_ec_gpe_handler)))
[toc] | [prev] | [next] | [standalone]
| From | Lv Zheng <lv.zheng@intel.com> |
|---|---|
| Date | 2016-07-08 03:30 +0200 |
| Subject | [PATCH v3] ACPI / EC: Fix an order issue in ec_remove_handlers() |
| Message-ID | <rSsM9-6jn-7@gated-at.bofh.it> |
| In reply to | #1437758 |
There is an order issue in ec_remove_handlers() that the functions invoked
in it are not able to handle the current restrictions (see comments below).
If ec_remove_handlers() is invoked during runtime after _REG(CONNECT) is
invoked, this issue will be uncovered.
Link: https://bugzilla.kernel.org/show_bug.cgi?id=102421
Reported-and-tested-by: Wolfram Sang <wsa@the-dreams.de>
Reported-by: Nicholas <nkudriavtsev@gmail.com>
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
---
drivers/acpi/ec.c | 15 +++++++++++++--
1 file changed, 13 insertions(+), 2 deletions(-)
diff --git a/drivers/acpi/ec.c b/drivers/acpi/ec.c
index b1050a0..84073a6 100644
--- a/drivers/acpi/ec.c
+++ b/drivers/acpi/ec.c
@@ -1331,8 +1331,6 @@ static int ec_install_handlers(struct acpi_ec *ec)
static void ec_remove_handlers(struct acpi_ec *ec)
{
- acpi_ec_stop(ec, false);
-
if (test_bit(EC_FLAGS_EC_HANDLER_INSTALLED, &ec->flags)) {
if (ACPI_FAILURE(acpi_remove_address_space_handler(ec->handle,
ACPI_ADR_SPACE_EC, &acpi_ec_space_handler)))
@@ -1340,6 +1338,19 @@ static void ec_remove_handlers(struct acpi_ec *ec)
clear_bit(EC_FLAGS_EC_HANDLER_INSTALLED, &ec->flags);
}
+ /*
+ * Stops handling the EC transactions after removing the operation
+ * region handler. This is required because _REG(DISCONNECT)
+ * invoked during the removal can result in new EC transactions.
+ *
+ * Flushes the EC requests and thus disables the GPE before
+ * removing the GPE handler. This is required by the current ACPICA
+ * GPE core. ACPICA GPE core will automatically disable a GPE when
+ * it is indicated but there is no way to handle it. So the drivers
+ * must disable the GPEs prior than removing the GPE handlers.
+ */
+ acpi_ec_stop(ec, false);
+
if (test_bit(EC_FLAGS_GPE_HANDLER_INSTALLED, &ec->flags)) {
if (ACPI_FAILURE(acpi_remove_gpe_handler(NULL, ec->gpe,
&acpi_ec_gpe_handler)))
--
1.7.10
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web