Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1722489 > unrolled thread

[PATCH v3] ACPI / APEI: Suppress message if HEST not present

Started byPunit Agrawal <punit.agrawal@arm.com>
First post2017-08-29 15:30 +0200
Last post2017-08-30 15:00 +0200
Articles 5 — 3 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH v3] ACPI / APEI: Suppress message if HEST not present Punit Agrawal <punit.agrawal@arm.com> - 2017-08-29 15:30 +0200
    Re: [PATCH v3] ACPI / APEI: Suppress message if HEST not present Borislav Petkov <bp@suse.de> - 2017-08-29 17:40 +0200
      Re: [PATCH v3] ACPI / APEI: Suppress message if HEST not present Punit Agrawal <punit.agrawal@arm.com> - 2017-08-30 12:40 +0200
        Re: [PATCH v3] ACPI / APEI: Suppress message if HEST not present "Rafael J. Wysocki" <rjw@rjwysocki.net> - 2017-08-30 14:10 +0200
          Re: [PATCH v3] ACPI / APEI: Suppress message if HEST not present Punit Agrawal <punit.agrawal@arm.com> - 2017-08-30 15:00 +0200

#1722489 — [PATCH v3] ACPI / APEI: Suppress message if HEST not present

FromPunit Agrawal <punit.agrawal@arm.com>
Date2017-08-29 15:30 +0200
Subject[PATCH v3] ACPI / APEI: Suppress message if HEST not present
Message-ID<ujOKC-3av-3@gated-at.bofh.it>
According to the ACPI specification, firmware is not required to provide
the Hardware Error Source Table (HEST). When HEST is not present, the
following superfluous message is printed to the kernel boot log -

[    3.460067] GHES: HEST is not enabled!

Extend hest_disable variable to track whether the firmware provides this
table and if it is not present skip any log output. The existing
behaviour is preserved in all other cases.

Suggested-by: Borislav Petkov <bp@suse.de>
Signed-off-by: Punit Agrawal <punit.agrawal@arm.com>
Cc: Borislav Petkov <bp@suse.de>
Cc: James Morse <james.morse@arm.com>
---

Changes in v3:
* Grouped hest_disable status checking into a switch/case for clarity

 drivers/acpi/apei/ghes.c |  7 ++++++-
 drivers/acpi/apei/hest.c | 13 +++++++------
 include/acpi/apei.h      |  8 +++++++-
 3 files changed, 20 insertions(+), 8 deletions(-)

diff --git a/drivers/acpi/apei/ghes.c b/drivers/acpi/apei/ghes.c
index d661d452b238..f5efa8dea7b5 100644
--- a/drivers/acpi/apei/ghes.c
+++ b/drivers/acpi/apei/ghes.c
@@ -1265,9 +1265,14 @@ static int __init ghes_init(void)
 	if (acpi_disabled)
 		return -ENODEV;
 
-	if (hest_disable) {
+	switch (hest_disable) {
+	case HEST_NOT_FOUND:
+		return -ENODEV;
+	case HEST_DISABLED:
 		pr_info(GHES_PFX "HEST is not enabled!\n");
 		return -EINVAL;
+	default:
+		break;
 	}
 
 	if (ghes_disable) {
diff --git a/drivers/acpi/apei/hest.c b/drivers/acpi/apei/hest.c
index 456b488eb1df..9cb74115a43d 100644
--- a/drivers/acpi/apei/hest.c
+++ b/drivers/acpi/apei/hest.c
@@ -37,7 +37,7 @@
 
 #define HEST_PFX "HEST: "
 
-bool hest_disable;
+int hest_disable;
 EXPORT_SYMBOL_GPL(hest_disable);
 
 /* HEST table parsing */
@@ -213,7 +213,7 @@ static int __init hest_ghes_dev_register(unsigned int ghes_count)
 
 static int __init setup_hest_disable(char *str)
 {
-	hest_disable = 1;
+	hest_disable = HEST_DISABLED;
 	return 0;
 }
 
@@ -232,9 +232,10 @@ void __init acpi_hest_init(void)
 
 	status = acpi_get_table(ACPI_SIG_HEST, 0,
 				(struct acpi_table_header **)&hest_tab);
-	if (status == AE_NOT_FOUND)
-		goto err;
-	else if (ACPI_FAILURE(status)) {
+	if (status == AE_NOT_FOUND) {
+		hest_disable = HEST_NOT_FOUND;
+		return;
+	} else if (ACPI_FAILURE(status)) {
 		const char *msg = acpi_format_exception(status);
 		pr_err(HEST_PFX "Failed to get table, %s\n", msg);
 		rc = -EINVAL;
@@ -257,5 +258,5 @@ void __init acpi_hest_init(void)
 	pr_info(HEST_PFX "Table parsing has been initialized.\n");
 	return;
 err:
-	hest_disable = 1;
+	hest_disable = HEST_DISABLED;
 }
diff --git a/include/acpi/apei.h b/include/acpi/apei.h
index 76284bb560a6..c46694abea28 100644
--- a/include/acpi/apei.h
+++ b/include/acpi/apei.h
@@ -16,7 +16,13 @@
 
 #ifdef __KERNEL__
 
-extern bool hest_disable;
+enum hest_status {
+	HEST_ENABLED,
+	HEST_DISABLED,
+	HEST_NOT_FOUND,
+};
+
+extern int hest_disable;
 extern int erst_disable;
 #ifdef CONFIG_ACPI_APEI_GHES
 extern bool ghes_disable;
-- 
2.13.2

[toc] | [next] | [standalone]


#1722569

FromBorislav Petkov <bp@suse.de>
Date2017-08-29 17:40 +0200
Message-ID<ujQMq-4mN-29@gated-at.bofh.it>
In reply to#1722489
On Tue, Aug 29, 2017 at 02:20:20PM +0100, Punit Agrawal wrote:
> According to the ACPI specification, firmware is not required to provide
> the Hardware Error Source Table (HEST). When HEST is not present, the
> following superfluous message is printed to the kernel boot log -
> 
> [    3.460067] GHES: HEST is not enabled!
> 
> Extend hest_disable variable to track whether the firmware provides this
> table and if it is not present skip any log output. The existing
> behaviour is preserved in all other cases.
> 
> Suggested-by: Borislav Petkov <bp@suse.de>
> Signed-off-by: Punit Agrawal <punit.agrawal@arm.com>
> Cc: Borislav Petkov <bp@suse.de>
> Cc: James Morse <james.morse@arm.com>
> ---
> 
> Changes in v3:
> * Grouped hest_disable status checking into a switch/case for clarity
> 
>  drivers/acpi/apei/ghes.c |  7 ++++++-
>  drivers/acpi/apei/hest.c | 13 +++++++------
>  include/acpi/apei.h      |  8 +++++++-
>  3 files changed, 20 insertions(+), 8 deletions(-)

Reviewed-by: Borislav Petkov <bp@suse.de>

-- 
Regards/Gruss,
    Boris.

SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard, Graham Norton, HRB 21284 (AG Nürnberg)
-- 

[toc] | [prev] | [next] | [standalone]


#1723193

FromPunit Agrawal <punit.agrawal@arm.com>
Date2017-08-30 12:40 +0200
Message-ID<uk8zE-79l-17@gated-at.bofh.it>
In reply to#1722569
Borislav Petkov <bp@suse.de> writes:

> On Tue, Aug 29, 2017 at 02:20:20PM +0100, Punit Agrawal wrote:
>> According to the ACPI specification, firmware is not required to provide
>> the Hardware Error Source Table (HEST). When HEST is not present, the
>> following superfluous message is printed to the kernel boot log -
>> 
>> [    3.460067] GHES: HEST is not enabled!
>> 
>> Extend hest_disable variable to track whether the firmware provides this
>> table and if it is not present skip any log output. The existing
>> behaviour is preserved in all other cases.
>> 
>> Suggested-by: Borislav Petkov <bp@suse.de>
>> Signed-off-by: Punit Agrawal <punit.agrawal@arm.com>
>> Cc: Borislav Petkov <bp@suse.de>
>> Cc: James Morse <james.morse@arm.com>
>> ---
>> 
>> Changes in v3:
>> * Grouped hest_disable status checking into a switch/case for clarity
>> 
>>  drivers/acpi/apei/ghes.c |  7 ++++++-
>>  drivers/acpi/apei/hest.c | 13 +++++++------
>>  include/acpi/apei.h      |  8 +++++++-
>>  3 files changed, 20 insertions(+), 8 deletions(-)
>
> Reviewed-by: Borislav Petkov <bp@suse.de>

Thanks!

Hopefully Rafael can pick the patch for the upcoming merge window.

>
> -- 
> Regards/Gruss,
>     Boris.
>
> SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard, Graham Norton, HRB 21284 (AG Nürnberg)

[toc] | [prev] | [next] | [standalone]


#1723240

From"Rafael J. Wysocki" <rjw@rjwysocki.net>
Date2017-08-30 14:10 +0200
Message-ID<uk9YJ-87p-11@gated-at.bofh.it>
In reply to#1723193
On Wednesday, August 30, 2017 12:34:55 PM CEST Punit Agrawal wrote:
> Borislav Petkov <bp@suse.de> writes:
> 
> > On Tue, Aug 29, 2017 at 02:20:20PM +0100, Punit Agrawal wrote:
> >> According to the ACPI specification, firmware is not required to provide
> >> the Hardware Error Source Table (HEST). When HEST is not present, the
> >> following superfluous message is printed to the kernel boot log -
> >> 
> >> [    3.460067] GHES: HEST is not enabled!
> >> 
> >> Extend hest_disable variable to track whether the firmware provides this
> >> table and if it is not present skip any log output. The existing
> >> behaviour is preserved in all other cases.
> >> 
> >> Suggested-by: Borislav Petkov <bp@suse.de>
> >> Signed-off-by: Punit Agrawal <punit.agrawal@arm.com>
> >> Cc: Borislav Petkov <bp@suse.de>
> >> Cc: James Morse <james.morse@arm.com>
> >> ---
> >> 
> >> Changes in v3:
> >> * Grouped hest_disable status checking into a switch/case for clarity
> >> 
> >>  drivers/acpi/apei/ghes.c |  7 ++++++-
> >>  drivers/acpi/apei/hest.c | 13 +++++++------
> >>  include/acpi/apei.h      |  8 +++++++-
> >>  3 files changed, 20 insertions(+), 8 deletions(-)
> >
> > Reviewed-by: Borislav Petkov <bp@suse.de>
> 
> Thanks!
> 
> Hopefully Rafael can pick the patch for the upcoming merge window.

Applied already, should show up in linux-next tomorrow.

Thanks,
Rafael

[toc] | [prev] | [next] | [standalone]


#1723281

FromPunit Agrawal <punit.agrawal@arm.com>
Date2017-08-30 15:00 +0200
Message-ID<ukaL7-8rd-9@gated-at.bofh.it>
In reply to#1723240
"Rafael J. Wysocki" <rjw@rjwysocki.net> writes:

> On Wednesday, August 30, 2017 12:34:55 PM CEST Punit Agrawal wrote:
>> Borislav Petkov <bp@suse.de> writes:
>> 
>> > On Tue, Aug 29, 2017 at 02:20:20PM +0100, Punit Agrawal wrote:
>> >> According to the ACPI specification, firmware is not required to provide
>> >> the Hardware Error Source Table (HEST). When HEST is not present, the
>> >> following superfluous message is printed to the kernel boot log -
>> >> 
>> >> [    3.460067] GHES: HEST is not enabled!
>> >> 
>> >> Extend hest_disable variable to track whether the firmware provides this
>> >> table and if it is not present skip any log output. The existing
>> >> behaviour is preserved in all other cases.
>> >> 
>> >> Suggested-by: Borislav Petkov <bp@suse.de>
>> >> Signed-off-by: Punit Agrawal <punit.agrawal@arm.com>
>> >> Cc: Borislav Petkov <bp@suse.de>
>> >> Cc: James Morse <james.morse@arm.com>
>> >> ---
>> >> 
>> >> Changes in v3:
>> >> * Grouped hest_disable status checking into a switch/case for clarity
>> >> 
>> >>  drivers/acpi/apei/ghes.c |  7 ++++++-
>> >>  drivers/acpi/apei/hest.c | 13 +++++++------
>> >>  include/acpi/apei.h      |  8 +++++++-
>> >>  3 files changed, 20 insertions(+), 8 deletions(-)
>> >
>> > Reviewed-by: Borislav Petkov <bp@suse.de>
>> 
>> Thanks!
>> 
>> Hopefully Rafael can pick the patch for the upcoming merge window.
>
> Applied already, should show up in linux-next tomorrow.

Neat! Thanks for picking up the patch.

>
> Thanks,
> Rafael
>
> --
> 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

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web