* [GIT PULL] ACPI fix for v4.18-rc7 @ 2018-07-26 14:13 Rafael J. Wysocki 2018-07-27 18:37 ` Linus Torvalds 0 siblings, 1 reply; 7+ messages in thread From: Rafael J. Wysocki @ 2018-07-26 14:13 UTC (permalink / raw) To: Linus Torvalds; +Cc: ACPI Devel Maling List, Linux Kernel Mailing List Hi Linus, Please pull from the tag git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git \ acpi-4.18-rc7 with top-most commit 73c2a01c52b657f4a0ead6c95f64c5279efbd000 ACPICA: AML Parser: ignore dispatcher error status during table load on top of commit d72e90f33aa4709ebecc5005562f52335e106a60 Linux 4.18-rc6 to receive an ACPI fix for 4.18-rc7. This fixes a recent ACPICA regression causing the AML parser to get confused and fail in some situations involving incorrect AML in an ACPI table (Erik Schmauss). Thanks! --------------- Schmauss, Erik (1): ACPICA: AML Parser: ignore dispatcher error status during table load --------------- drivers/acpi/acpica/psloop.c | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [GIT PULL] ACPI fix for v4.18-rc7 2018-07-26 14:13 [GIT PULL] ACPI fix for v4.18-rc7 Rafael J. Wysocki @ 2018-07-27 18:37 ` Linus Torvalds 2018-07-27 21:51 ` Schmauss, Erik 0 siblings, 1 reply; 7+ messages in thread From: Linus Torvalds @ 2018-07-27 18:37 UTC (permalink / raw) To: Rafael J. Wysocki; +Cc: Linux ACPI, Linux Kernel Mailing List My XPS13 laptop is unhappy with something recent. As of yesterday, I get this at bootup: ACPI: Added _OSI(Module Device) ACPI: Added _OSI(Processor Device) ACPI: Added _OSI(3.0 _SCP Extensions) ACPI: Added _OSI(Processor Aggregator Device) ACPI: Added _OSI(Linux-Dell-Video) ACPI Error: Result stack is empty! State=(____ptrval____) (20180531/dswstate-65) ACPI Error: AE_AML_NO_RETURN_VALUE, Missing or null operand (20180531/dsutils-612) ACPI Error: AE_AML_NO_RETURN_VALUE, While creating Arg 0 (20180531/dsutils-727) ACPI Error: Result stack is empty! State=(____ptrval____) (20180531/dswstate-65) ACPI Error: AE_AML_NO_RETURN_VALUE, Missing or null operand (20180531/dsutils-612) ACPI Error: AE_AML_NO_RETURN_VALUE, While creating Arg 0 (20180531/dsutils-727) ACPI Error: Result stack is empty! State=(____ptrval____) (20180531/dswstate-65) ACPI Error: AE_AML_NO_RETURN_VALUE, Missing or null operand (20180531/dsutils-612) ACPI Error: AE_AML_NO_RETURN_VALUE, While creating Arg 0 (20180531/dsutils-727) ACPI Error: Result stack is empty! State=(____ptrval____) (20180531/dswstate-65) ACPI Error: AE_AML_NO_RETURN_VALUE, Missing or null operand (20180531/dsutils-612) ACPI Error: AE_AML_NO_RETURN_VALUE, While creating Arg 0 (20180531/dsutils-727) ACPI Error: Result stack is empty! State=(____ptrval____) (20180531/dswstate-65) ACPI Error: AE_AML_NO_RETURN_VALUE, Missing or null operand (20180531/dsutils-612) ACPI Error: AE_AML_NO_RETURN_VALUE, While creating Arg 0 (20180531/dsutils-727) ACPI Error: Result stack is empty! State=(____ptrval____) (20180531/dswstate-65) ACPI Error: AE_AML_NO_RETURN_VALUE, Missing or null operand (20180531/dsutils-612) ACPI Error: AE_AML_NO_RETURN_VALUE, While creating Arg 0 (20180531/dsutils-727) ACPI Error: Result stack is empty! State=(____ptrval____) (20180531/dswstate-65) ACPI Error: AE_AML_NO_RETURN_VALUE, Missing or null operand (20180531/dsutils-612) ACPI Error: AE_AML_NO_RETURN_VALUE, While creating Arg 0 (20180531/dsutils-727) ACPI Error: Result stack is empty! State=(____ptrval____) (20180531/dswstate-65) ACPI Error: AE_AML_NO_RETURN_VALUE, Missing or null operand (20180531/dsutils-612) ACPI Error: AE_AML_NO_RETURN_VALUE, While creating Arg 0 (20180531/dsutils-727) ACPI Error: Result stack is empty! State=(____ptrval____) (20180531/dswstate-65) ACPI Error: AE_AML_NO_RETURN_VALUE, Missing or null operand (20180531/dsutils-612) ACPI Error: AE_AML_NO_RETURN_VALUE, While creating Arg 0 (20180531/dsutils-727) ACPI Error: Result stack is empty! State=(____ptrval____) (20180531/dswstate-65) ACPI Error: AE_AML_NO_RETURN_VALUE, Missing or null operand (20180531/dsutils-612) ACPI Error: AE_AML_NO_RETURN_VALUE, While creating Arg 0 (20180531/dsutils-727) ACPI Error: Result stack is empty! State=(____ptrval____) (20180531/dswstate-65) ACPI Error: AE_AML_NO_RETURN_VALUE, Missing or null operand (20180531/dsutils-612) ACPI Error: AE_AML_NO_RETURN_VALUE, While creating Arg 0 (20180531/dsutils-727) ACPI: 9 ACPI AML tables successfully acquired and loaded It does *not* happen in Linux version 4.18.0-rc6-00110-g6e77b267723c but it *does* happen in Linux version 4.18.0-rc6-00152-gcd3f77d74ac3 and while I didn't bisect it, I'm assuming it's due to 73c2a01c52b6 ("ACPICA: AML Parser: ignore dispatcher error status during table load") Ideas? Note only the errors are new. On older kernels, I just get: ACPI: Added _OSI(Module Device) ACPI: Added _OSI(Processor Device) ACPI: Added _OSI(3.0 _SCP Extensions) ACPI: Added _OSI(Processor Aggregator Device) ACPI: Added _OSI(Linux-Dell-Video) ACPI: 9 ACPI AML tables successfully acquired and loaded without the big slew of errors. Linus ^ permalink raw reply [flat|nested] 7+ messages in thread
* RE: [GIT PULL] ACPI fix for v4.18-rc7 2018-07-27 18:37 ` Linus Torvalds @ 2018-07-27 21:51 ` Schmauss, Erik 2018-07-28 0:02 ` Schmauss, Erik 0 siblings, 1 reply; 7+ messages in thread From: Schmauss, Erik @ 2018-07-27 21:51 UTC (permalink / raw) To: Linus Torvalds, Rafael J. Wysocki; +Cc: Linux ACPI, Linux Kernel Mailing List > -----Original Message----- > From: linux-acpi-owner@vger.kernel.org [mailto:linux-acpi- > owner@vger.kernel.org] On Behalf Of Linus Torvalds > Sent: Friday, July 27, 2018 11:38 AM > To: Rafael J. Wysocki <rafael@kernel.org> > Cc: Linux ACPI <linux-acpi@vger.kernel.org>; Linux Kernel Mailing List <linux- > kernel@vger.kernel.org> > Subject: Re: [GIT PULL] ACPI fix for v4.18-rc7 > > My XPS13 laptop is unhappy with something recent. > > As of yesterday, I get this at bootup: > > ACPI: Added _OSI(Module Device) > ACPI: Added _OSI(Processor Device) > ACPI: Added _OSI(3.0 _SCP Extensions) > ACPI: Added _OSI(Processor Aggregator Device) > ACPI: Added _OSI(Linux-Dell-Video) > ACPI Error: Result stack is empty! State=(____ptrval____) > (20180531/dswstate-65) > ACPI Error: AE_AML_NO_RETURN_VALUE, Missing or null operand > (20180531/dsutils-612) > ACPI Error: AE_AML_NO_RETURN_VALUE, While creating Arg 0 > (20180531/dsutils-727) > ACPI Error: Result stack is empty! State=(____ptrval____) > (20180531/dswstate-65) > ACPI Error: AE_AML_NO_RETURN_VALUE, Missing or null operand > (20180531/dsutils-612) > ACPI Error: AE_AML_NO_RETURN_VALUE, While creating Arg 0 > (20180531/dsutils-727) > ACPI Error: Result stack is empty! State=(____ptrval____) > (20180531/dswstate-65) > ACPI Error: AE_AML_NO_RETURN_VALUE, Missing or null operand > (20180531/dsutils-612) > ACPI Error: AE_AML_NO_RETURN_VALUE, While creating Arg 0 > (20180531/dsutils-727) > ACPI Error: Result stack is empty! State=(____ptrval____) > (20180531/dswstate-65) > ACPI Error: AE_AML_NO_RETURN_VALUE, Missing or null operand > (20180531/dsutils-612) > ACPI Error: AE_AML_NO_RETURN_VALUE, While creating Arg 0 > (20180531/dsutils-727) > ACPI Error: Result stack is empty! State=(____ptrval____) > (20180531/dswstate-65) > ACPI Error: AE_AML_NO_RETURN_VALUE, Missing or null operand > (20180531/dsutils-612) > ACPI Error: AE_AML_NO_RETURN_VALUE, While creating Arg 0 > (20180531/dsutils-727) > ACPI Error: Result stack is empty! State=(____ptrval____) > (20180531/dswstate-65) > ACPI Error: AE_AML_NO_RETURN_VALUE, Missing or null operand > (20180531/dsutils-612) > ACPI Error: AE_AML_NO_RETURN_VALUE, While creating Arg 0 > (20180531/dsutils-727) > ACPI Error: Result stack is empty! State=(____ptrval____) > (20180531/dswstate-65) > ACPI Error: AE_AML_NO_RETURN_VALUE, Missing or null operand > (20180531/dsutils-612) > ACPI Error: AE_AML_NO_RETURN_VALUE, While creating Arg 0 > (20180531/dsutils-727) > ACPI Error: Result stack is empty! State=(____ptrval____) > (20180531/dswstate-65) > ACPI Error: AE_AML_NO_RETURN_VALUE, Missing or null operand > (20180531/dsutils-612) > ACPI Error: AE_AML_NO_RETURN_VALUE, While creating Arg 0 > (20180531/dsutils-727) > ACPI Error: Result stack is empty! State=(____ptrval____) > (20180531/dswstate-65) > ACPI Error: AE_AML_NO_RETURN_VALUE, Missing or null operand > (20180531/dsutils-612) > ACPI Error: AE_AML_NO_RETURN_VALUE, While creating Arg 0 > (20180531/dsutils-727) > ACPI Error: Result stack is empty! State=(____ptrval____) > (20180531/dswstate-65) > ACPI Error: AE_AML_NO_RETURN_VALUE, Missing or null operand > (20180531/dsutils-612) > ACPI Error: AE_AML_NO_RETURN_VALUE, While creating Arg 0 > (20180531/dsutils-727) > ACPI Error: Result stack is empty! State=(____ptrval____) > (20180531/dswstate-65) > ACPI Error: AE_AML_NO_RETURN_VALUE, Missing or null operand > (20180531/dsutils-612) > ACPI Error: AE_AML_NO_RETURN_VALUE, While creating Arg 0 > (20180531/dsutils-727) > ACPI: 9 ACPI AML tables successfully acquired and loaded > > It does *not* happen in > > Linux version 4.18.0-rc6-00110-g6e77b267723c > > but it *does* happen in > > Linux version 4.18.0-rc6-00152-gcd3f77d74ac3 > > and while I didn't bisect it, I'm assuming it's due to 73c2a01c52b6 > ("ACPICA: AML Parser: ignore dispatcher error status during table > load") > > Ideas? Sorry about the breakage. I found the cause this failure and I'm working on a fix right now. Erik > > Note only the errors are new. On older kernels, I just get: > > ACPI: Added _OSI(Module Device) > ACPI: Added _OSI(Processor Device) > ACPI: Added _OSI(3.0 _SCP Extensions) > ACPI: Added _OSI(Processor Aggregator Device) > ACPI: Added _OSI(Linux-Dell-Video) > ACPI: 9 ACPI AML tables successfully acquired and loaded > > without the big slew of errors. > > Linus > -- > To unsubscribe from this list: send the line "unsubscribe linux-acpi" in the body of > a message to majordomo@vger.kernel.org More majordomo info at > http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 7+ messages in thread
* RE: [GIT PULL] ACPI fix for v4.18-rc7 2018-07-27 21:51 ` Schmauss, Erik @ 2018-07-28 0:02 ` Schmauss, Erik 2018-07-28 1:30 ` Linus Torvalds 2018-07-28 16:59 ` Oleksandr Natalenko 0 siblings, 2 replies; 7+ messages in thread From: Schmauss, Erik @ 2018-07-28 0:02 UTC (permalink / raw) To: Schmauss, Erik, Linus Torvalds, Rafael J. Wysocki Cc: Linux ACPI, Linux Kernel Mailing List > -----Original Message----- > From: linux-acpi-owner@vger.kernel.org [mailto:linux-acpi- > owner@vger.kernel.org] On Behalf Of Schmauss, Erik > Sent: Friday, July 27, 2018 2:51 PM > To: Linus Torvalds <torvalds@linux-foundation.org>; Rafael J. Wysocki > <rafael@kernel.org> > Cc: Linux ACPI <linux-acpi@vger.kernel.org>; Linux Kernel Mailing List <linux- > kernel@vger.kernel.org> > Subject: RE: [GIT PULL] ACPI fix for v4.18-rc7 > > > > > -----Original Message----- > > From: linux-acpi-owner@vger.kernel.org [mailto:linux-acpi- > > owner@vger.kernel.org] On Behalf Of Linus Torvalds > > Sent: Friday, July 27, 2018 11:38 AM > > To: Rafael J. Wysocki <rafael@kernel.org> > > Cc: Linux ACPI <linux-acpi@vger.kernel.org>; Linux Kernel Mailing List > > <linux- kernel@vger.kernel.org> > > Subject: Re: [GIT PULL] ACPI fix for v4.18-rc7 > > > > My XPS13 laptop is unhappy with something recent. > > > > As of yesterday, I get this at bootup: > > > > ACPI: Added _OSI(Module Device) > > ACPI: Added _OSI(Processor Device) > > ACPI: Added _OSI(3.0 _SCP Extensions) > > ACPI: Added _OSI(Processor Aggregator Device) > > ACPI: Added _OSI(Linux-Dell-Video) > > ACPI Error: Result stack is empty! State=(____ptrval____) > > (20180531/dswstate-65) > > ACPI Error: AE_AML_NO_RETURN_VALUE, Missing or null operand > > (20180531/dsutils-612) > > ACPI Error: AE_AML_NO_RETURN_VALUE, While creating Arg 0 > > (20180531/dsutils-727) > > ACPI Error: Result stack is empty! State=(____ptrval____) > > (20180531/dswstate-65) > > ACPI Error: AE_AML_NO_RETURN_VALUE, Missing or null operand > > (20180531/dsutils-612) > > ACPI Error: AE_AML_NO_RETURN_VALUE, While creating Arg 0 > > (20180531/dsutils-727) > > ACPI Error: Result stack is empty! State=(____ptrval____) > > (20180531/dswstate-65) > > ACPI Error: AE_AML_NO_RETURN_VALUE, Missing or null operand > > (20180531/dsutils-612) > > ACPI Error: AE_AML_NO_RETURN_VALUE, While creating Arg 0 > > (20180531/dsutils-727) > > ACPI Error: Result stack is empty! State=(____ptrval____) > > (20180531/dswstate-65) > > ACPI Error: AE_AML_NO_RETURN_VALUE, Missing or null operand > > (20180531/dsutils-612) > > ACPI Error: AE_AML_NO_RETURN_VALUE, While creating Arg 0 > > (20180531/dsutils-727) > > ACPI Error: Result stack is empty! State=(____ptrval____) > > (20180531/dswstate-65) > > ACPI Error: AE_AML_NO_RETURN_VALUE, Missing or null operand > > (20180531/dsutils-612) > > ACPI Error: AE_AML_NO_RETURN_VALUE, While creating Arg 0 > > (20180531/dsutils-727) > > ACPI Error: Result stack is empty! State=(____ptrval____) > > (20180531/dswstate-65) > > ACPI Error: AE_AML_NO_RETURN_VALUE, Missing or null operand > > (20180531/dsutils-612) > > ACPI Error: AE_AML_NO_RETURN_VALUE, While creating Arg 0 > > (20180531/dsutils-727) > > ACPI Error: Result stack is empty! State=(____ptrval____) > > (20180531/dswstate-65) > > ACPI Error: AE_AML_NO_RETURN_VALUE, Missing or null operand > > (20180531/dsutils-612) > > ACPI Error: AE_AML_NO_RETURN_VALUE, While creating Arg 0 > > (20180531/dsutils-727) > > ACPI Error: Result stack is empty! State=(____ptrval____) > > (20180531/dswstate-65) > > ACPI Error: AE_AML_NO_RETURN_VALUE, Missing or null operand > > (20180531/dsutils-612) > > ACPI Error: AE_AML_NO_RETURN_VALUE, While creating Arg 0 > > (20180531/dsutils-727) > > ACPI Error: Result stack is empty! State=(____ptrval____) > > (20180531/dswstate-65) > > ACPI Error: AE_AML_NO_RETURN_VALUE, Missing or null operand > > (20180531/dsutils-612) > > ACPI Error: AE_AML_NO_RETURN_VALUE, While creating Arg 0 > > (20180531/dsutils-727) > > ACPI Error: Result stack is empty! State=(____ptrval____) > > (20180531/dswstate-65) > > ACPI Error: AE_AML_NO_RETURN_VALUE, Missing or null operand > > (20180531/dsutils-612) > > ACPI Error: AE_AML_NO_RETURN_VALUE, While creating Arg 0 > > (20180531/dsutils-727) > > ACPI Error: Result stack is empty! State=(____ptrval____) > > (20180531/dswstate-65) > > ACPI Error: AE_AML_NO_RETURN_VALUE, Missing or null operand > > (20180531/dsutils-612) > > ACPI Error: AE_AML_NO_RETURN_VALUE, While creating Arg 0 > > (20180531/dsutils-727) > > ACPI: 9 ACPI AML tables successfully acquired and loaded > > > > It does *not* happen in > > > > Linux version 4.18.0-rc6-00110-g6e77b267723c > > > > but it *does* happen in > > > > Linux version 4.18.0-rc6-00152-gcd3f77d74ac3 > > > > and while I didn't bisect it, I'm assuming it's due to 73c2a01c52b6 > > ("ACPICA: AML Parser: ignore dispatcher error status during table > > load") > > > > Ideas? > > Sorry about the breakage. I found the cause this failure and I'm working on a fix > right now. > > Erik Hi, The patch below should be able to fix this. From a828a091828599154d8f6e8bfee1495a3df5cf34 Mon Sep 17 00:00:00 2001 From: Erik Schmauss <erik.schmauss@intel.com> Date: Fri, 27 Jul 2018 15:37:35 -0700 From: Erik Schmauss <erik.schmauss@intel.com> Subject: [PATCH 1] ACPICA: AML Parser: ignore control method status in module-level code Previous change in the AML parser code blindly set all non-successful dispatcher statuses to AE_OK. This approach is incorrect because successful control method invocations from module-level return AE_CTRL_TRANSFER. Overwriting AE_OK to this status causes the AML parser to think that there was no return value from the control method invocation. fixes: 73c2a01c52b6 (ACPICA: AML Parser: ignore dispatcher error status during table load) Reported-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Erik Schmauss <erik.schmauss@intel.com> --- psloop.c | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff -Nurp linux.before_name/drivers/acpi/acpica/psloop.c linux.after_name/drivers/acpi/acpica/psloop.c --- linux.before_name/drivers/acpi/acpica/psloop.c 2018-07-27 15:53:31.073522915 -0700 +++ linux.after_name/drivers/acpi/acpica/psloop.c 2018-07-27 15:53:25.320522527 -0700 @@ -714,15 +714,20 @@ acpi_status acpi_ps_parse_loop(struct ac } else if ((walk_state-> parse_flags & ACPI_PARSE_MODULE_LEVEL) + && status != AE_CTRL_TRANSFER && ACPI_FAILURE(status)) { /* - * ACPI_PARSE_MODULE_LEVEL means that we are loading a table by - * executing it as a control method. However, if we encounter - * an error while loading the table, we need to keep trying to - * load the table rather than aborting the table load. Set the - * status to AE_OK to proceed with the table load. If we get a - * failure at this point, it means that the dispatcher got an - * error while processing Op (most likely an AML operand error. + * ACPI_PARSE_MODULE_LEVEL flag means that we are currently + * loading a table by executing it as a control method. + * However, if we encounter an error while loading the table, + * we need to keep trying to load the table rather than + * aborting the table load (setting the status to AE_OK + * continues the table load). If we get a failure at this + * point, it means that the dispatcher got an error while + * processing Op (most likely an AML operand error) or a + * control method was called from module level and the + * dispatcher returned AE_CTRL_TRANSFER. In the latter case, + * leave the status alone, there's nothing wrong with it. */ status = AE_OK; } > > > > > Note only the errors are new. On older kernels, I just get: > > > > ACPI: Added _OSI(Module Device) > > ACPI: Added _OSI(Processor Device) > > ACPI: Added _OSI(3.0 _SCP Extensions) > > ACPI: Added _OSI(Processor Aggregator Device) > > ACPI: Added _OSI(Linux-Dell-Video) > > ACPI: 9 ACPI AML tables successfully acquired and loaded > > > > without the big slew of errors. > > > > Linus > > -- > > To unsubscribe from this list: send the line "unsubscribe linux-acpi" > > in the body of a message to majordomo@vger.kernel.org More majordomo > > info at http://vger.kernel.org/majordomo-info.html > \x13 칻\x1c & ~ & \x18 +- ݶ\x17 w ˛ m b Zr ^n r z \x1a h & \x1e G h \x03( 階 ݢj" \x1a ^[m z ޖ f > h ~ m ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [GIT PULL] ACPI fix for v4.18-rc7 2018-07-28 0:02 ` Schmauss, Erik @ 2018-07-28 1:30 ` Linus Torvalds 2018-07-28 3:20 ` Len Brown 2018-07-28 16:59 ` Oleksandr Natalenko 1 sibling, 1 reply; 7+ messages in thread From: Linus Torvalds @ 2018-07-28 1:30 UTC (permalink / raw) To: erik.schmauss; +Cc: Rafael J. Wysocki, Linux ACPI, Linux Kernel Mailing List On Fri, Jul 27, 2018 at 5:02 PM Schmauss, Erik <erik.schmauss@intel.com> wrote: > > The patch below should be able to fix this. Yes, the error messages seem gone with this. I see another ACPI warning, but that one has always been there: acpi INT33D5:00: intel-hid: created platform device ACPI Warning: \_SB.IETM._ART: Return Package type mismatch at index 0 - found Integer, expected Reference (20180531/nspredef-263) ACPI: Invalid package element [0]: got number, expecting [R] _ART package 0 is invalid, ignored and doesn't seem to cause any problems. Just mentioning it in case somebody goes "yeah.." Linus ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [GIT PULL] ACPI fix for v4.18-rc7 2018-07-28 1:30 ` Linus Torvalds @ 2018-07-28 3:20 ` Len Brown 0 siblings, 0 replies; 7+ messages in thread From: Len Brown @ 2018-07-28 3:20 UTC (permalink / raw) To: Linus Torvalds Cc: erik.schmauss, Rafael J. Wysocki, linux acpi, linux-kernel, Srinivas Pandruvada > ACPI Warning: \_SB.IETM._ART: Return Package type mismatch .. _ART is the AML method for "Active Cooling Relationship Table". iIt tells the system how fans are related to temperature sensors. It is likely that Windows uses DPTF on this platform, and since DPTF is not using _ART, Linux may be pointing out a vestigial _ART. Anyway, if your system doesn't handle being hot very well -- this error message is related to that capability. cheers, -Len ^ permalink raw reply [flat|nested] 7+ messages in thread
* RE: [GIT PULL] ACPI fix for v4.18-rc7 2018-07-28 0:02 ` Schmauss, Erik 2018-07-28 1:30 ` Linus Torvalds @ 2018-07-28 16:59 ` Oleksandr Natalenko 1 sibling, 0 replies; 7+ messages in thread From: Oleksandr Natalenko @ 2018-07-28 16:59 UTC (permalink / raw) To: erik.schmauss; +Cc: linux-acpi, linux-kernel, rafael, torvalds Hi. > From a828a091828599154d8f6e8bfee1495a3df5cf34 Mon Sep 17 00:00:00 2001 > From: Erik Schmauss <erik.schmauss@intel.com> > Date: Fri, 27 Jul 2018 15:37:35 -0700 > From: Erik Schmauss <erik.schmauss@intel.com> > Subject: [PATCH 1] ACPICA: AML Parser: ignore control method status in > module-level code > > Previous change in the AML parser code blindly set all non-successful > dispatcher statuses to AE_OK. This approach is incorrect because > successful control method invocations from module-level return > AE_CTRL_TRANSFER. Overwriting AE_OK to this status causes the AML > parser to think that there was no return value from the control > method invocation. > > fixes: 73c2a01c52b6 (ACPICA: AML Parser: ignore dispatcher error status > during table load) > > Reported-by: Linus Torvalds <torvalds@linux-foundation.org> > Signed-off-by: Erik Schmauss <erik.schmauss@intel.com> > --- > psloop.c | 19 ++++++++++++------- > 1 file changed, 12 insertions(+), 7 deletions(-) > > diff -Nurp linux.before_name/drivers/acpi/acpica/psloop.c > linux.after_name/drivers/acpi/acpica/psloop.c > --- linux.before_name/drivers/acpi/acpica/psloop.c 2018-07-27 > 15:53:31.073522915 -0700 > +++ linux.after_name/drivers/acpi/acpica/psloop.c 2018-07-27 > 15:53:25.320522527 -0700 > @@ -714,15 +714,20 @@ acpi_status acpi_ps_parse_loop(struct ac > } else > if ((walk_state-> > parse_flags & ACPI_PARSE_MODULE_LEVEL) > + && status != AE_CTRL_TRANSFER > && ACPI_FAILURE(status)) { > /* > - * ACPI_PARSE_MODULE_LEVEL means that we are loading a table by > - * executing it as a control method. However, if we encounter > - * an error while loading the table, we need to keep trying to > - * load the table rather than aborting the table load. Set the > - * status to AE_OK to proceed with the table load. If we get a > - * failure at this point, it means that the dispatcher got an > - * error while processing Op (most likely an AML operand error. > + * ACPI_PARSE_MODULE_LEVEL flag means that we are currently > + * loading a table by executing it as a control method. > + * However, if we encounter an error while loading the table, > + * we need to keep trying to load the table rather than > + * aborting the table load (setting the status to AE_OK > + * continues the table load). If we get a failure at this > + * point, it means that the dispatcher got an error while > + * processing Op (most likely an AML operand error) or a > + * control method was called from module level and the > + * dispatcher returned AE_CTRL_TRANSFER. In the latter case, > + * leave the status alone, there's nothing wrong with it. > */ > status = AE_OK; > } Faced the same on my Dell Vostro 3360 with v4.17.11 update, and confirming that this patch fixes the issue for me too. Thus, Tested-by: Oleksandr Natalenko <oleksandr@natalenko.name> Also, please Cc Greg once you do a submission, so v4.17 stable branch will be fixed too. Thanks. -- Oleksandr Natalenko (post-factum) ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2018-07-28 16:59 UTC | newest] Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2018-07-26 14:13 [GIT PULL] ACPI fix for v4.18-rc7 Rafael J. Wysocki 2018-07-27 18:37 ` Linus Torvalds 2018-07-27 21:51 ` Schmauss, Erik 2018-07-28 0:02 ` Schmauss, Erik 2018-07-28 1:30 ` Linus Torvalds 2018-07-28 3:20 ` Len Brown 2018-07-28 16:59 ` Oleksandr Natalenko
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).