Re: [6/8] ACPICA: AML parser: attempt to continue loading table after error

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wednesday, June 27, 2018 12:45:21 AM CEST Guenter Roeck wrote:
> On Fri, Jun 01, 2018 at 12:06:43PM -0700, Schmauss, Erik wrote:
> > This change alters the parser so that the table load does not abort
> > upon an error.
> > 
> > Notable changes:
> > 
> > If there is an error while parsing an element of the termlist, we
> > will skip parsing the current termlist element and continue parsing
> > to the next opcode in the termlist.
> > 
> > If we get an error while parsing the conditional of If/Else/While or
> > the device name of Scope, we will skip the body of the statement all
> > together and pop the parser_state.
> > 
> > If we get an error while parsing the base offset and length of an
> > operation region declaration, we will remove the operation region
> > from the namespace.
> > 
> > Signed-off-by: Erik Schmauss <erik.schmauss@xxxxxxxxx>
> > ---
> 
> ...
> > diff --git a/drivers/acpi/acpica/uterror.c b/drivers/acpi/acpica/uterror.c
> > index 12d4a0f6b8d2..5a64ddaed8a3 100644
> > --- a/drivers/acpi/acpica/uterror.c
> > +++ b/drivers/acpi/acpica/uterror.c
> > @@ -182,20 +182,20 @@ acpi_ut_prefixed_namespace_error(const char *module_name,
> >  	switch (lookup_status) {
> >  	case AE_ALREADY_EXISTS:
> >  
> > -		acpi_os_printf(ACPI_MSG_BIOS_ERROR);
> > +		acpi_os_printf("\n" ACPI_MSG_BIOS_ERROR);
> 
> This and other similar changes in the same patch mess up the log [1]
> and result in output such as
> 
> ^A3ACPI BIOS Error (bug): Could not resolve [\_PR.CPU0._CST], AE_NOT_FOUND (20180313/psargs-330)
> 
> Note the "^A3" at the beginning of the line. This matches KERN_ERR,
> which is no longer recognized. ACPI_MSG_BIOS_ERROR starts with KERN_ERR
> and must come first.

Thanks Guenter, let's fix this up.

Does the patch below help?

---
 drivers/acpi/acpica/uterror.c |    7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

Index: linux-pm/drivers/acpi/acpica/uterror.c
===================================================================
--- linux-pm.orig/drivers/acpi/acpica/uterror.c
+++ linux-pm/drivers/acpi/acpica/uterror.c
@@ -174,6 +174,7 @@ acpi_ut_prefixed_namespace_error(const c
 	char *full_path;
 	const char *message;
 
+	acpi_os_printf("\n");
 	/*
 	 * Main cases:
 	 * 1) Object creation, object must not already exist
@@ -182,19 +183,19 @@ acpi_ut_prefixed_namespace_error(const c
 	switch (lookup_status) {
 	case AE_ALREADY_EXISTS:
 
-		acpi_os_printf("\n" ACPI_MSG_BIOS_ERROR);
+		acpi_os_printf(ACPI_MSG_BIOS_ERROR);
 		message = "Failure creating";
 		break;
 
 	case AE_NOT_FOUND:
 
-		acpi_os_printf("\n" ACPI_MSG_BIOS_ERROR);
+		acpi_os_printf(ACPI_MSG_BIOS_ERROR);
 		message = "Could not resolve";
 		break;
 
 	default:
 
-		acpi_os_printf("\n" ACPI_MSG_ERROR);
+		acpi_os_printf(ACPI_MSG_ERROR);
 		message = "Failure resolving";
 		break;
 	}

--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux IBM ACPI]     [Linux Power Management]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux