mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Punit Agrawal <punit.agrawal@arm.com>
To: Borislav Petkov <bp@suse.de>
Cc: lorenzo.pieralisi@arm.com, sudeep.holla@arm.com,
	linux-kernel@vger.kernel.org,
	"Rafael J . Wysocki" <rjw@rjwysocki.net>,
	James Morse <james.morse@arm.com>,
	linux-acpi@vger.kernel.org
Subject: Re: [PATCH v2] ACPI / APEI: Suppress message if HEST not present
Date: Tue, 29 Aug 2017 10:03:51 +0100	[thread overview]
Message-ID: <87ziaihhjc.fsf@e105922-lin.cambridge.arm.com> (raw)
In-Reply-To: <20170816112753.12085-1-punit.agrawal@arm.com> (Punit Agrawal's message of "Wed, 16 Aug 2017 12:27:53 +0100")

Punit Agrawal <punit.agrawal@arm.com> writes:

> 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>
> ---
>  drivers/acpi/apei/ghes.c |  4 ++--
>  drivers/acpi/apei/hest.c | 13 +++++++------
>  include/acpi/apei.h      |  8 +++++++-
>  3 files changed, 16 insertions(+), 9 deletions(-)
>
> diff --git a/drivers/acpi/apei/ghes.c b/drivers/acpi/apei/ghes.c
> index d661d452b238..f8685bcbeff2 100644
> --- a/drivers/acpi/apei/ghes.c
> +++ b/drivers/acpi/apei/ghes.c
> @@ -1262,10 +1262,10 @@ static int __init ghes_init(void)
>  {
>  	int rc;
>  
> -	if (acpi_disabled)
> +	if (acpi_disabled || hest_disable == HEST_NOT_FOUND)
>  		return -ENODEV;
>  
> -	if (hest_disable) {
> +	if (hest_disable == HEST_DISABLED) {
>  		pr_info(GHES_PFX "HEST is not enabled!\n");
>  		return -EINVAL;
>  	}
> 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;

Ping!

Looks like this one has slipped through the cracks? Any objections
Boris?

Thanks,
Punit

  reply	other threads:[~2017-08-29  9:03 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-16 11:27 Punit Agrawal
2017-08-29  9:03 ` Punit Agrawal [this message]
2017-08-29 12:38 ` Borislav Petkov
2017-08-29 13:17   ` Punit Agrawal

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=87ziaihhjc.fsf@e105922-lin.cambridge.arm.com \
    --to=punit.agrawal@arm.com \
    --cc=bp@suse.de \
    --cc=james.morse@arm.com \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lorenzo.pieralisi@arm.com \
    --cc=rjw@rjwysocki.net \
    --cc=sudeep.holla@arm.com \
    /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

all inboxes | Powered by JetHome®