linux-acpi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Oleksandr Natalenko <oleksandr@natalenko.name>
To: erik.schmauss@intel.com
Cc: linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org,
	rafael@kernel.org, torvalds@linux-foundation.org
Subject: RE: [GIT PULL] ACPI fix for v4.18-rc7
Date: Sat, 28 Jul 2018 18:59:12 +0200	[thread overview]
Message-ID: <db31a9d497ce2ef0f4b51eeb76729278@natalenko.name> (raw)
In-Reply-To: <CF6A88132359CE47947DB4C6E1709ED53BB4FB62@ORSMSX110.amr.corp.intel.com>

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)

      parent reply	other threads:[~2018-07-28 16:59 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=db31a9d497ce2ef0f4b51eeb76729278@natalenko.name \
    --to=oleksandr@natalenko.name \
    --cc=erik.schmauss@intel.com \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rafael@kernel.org \
    --cc=torvalds@linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).