From: Mauro Carvalho Chehab <mchehab@infradead.org>
To: Thomas Tai <thomas.tai@oracle.com>
Cc: mchehab@kernel.org, linux-edac@vger.kernel.org
Subject: [1/2] rasdaemon: fix PCIe AER error type
Date: Tue, 14 Aug 2018 13:15:11 -0300 [thread overview]
Message-ID: <20180814131511.4f3e53b2@coco.lan> (raw)
Em Mon, 14 May 2018 10:33:47 -0400
Thomas Tai <thomas.tai@oracle.com> escreveu:
> The error types between PCIe AER and CPU Machine Check are
> different. when handling aer_event, the PCIe AER error
> type should be used. Add an enum to match the kernel
> PCIe AER and use it to decode the error type.
Both patches applied, thanks!
>
> Signed-off-by: Thomas Tai <thomas.tai@oracle.com>
> ---
> ras-aer-handler.c | 15 +++++++--------
> ras-events.h | 7 +++++++
> 2 files changed, 14 insertions(+), 8 deletions(-)
>
> diff --git a/ras-aer-handler.c b/ras-aer-handler.c
> index 2093875..65e321d 100644
> --- a/ras-aer-handler.c
> +++ b/ras-aer-handler.c
> @@ -96,18 +96,17 @@ int ras_aer_event_handler(struct trace_seq *s,
> if (pevent_get_field_val(s, event, "severity", record, &val, 1) < 0)
> return -1;
> switch (val) {
> - case HW_EVENT_ERR_CORRECTED:
> - ev.error_type = "Corrected";
> + case HW_EVENT_AER_UNCORRECTED_NON_FATAL:
> + ev.error_type = "Uncorrected (Non-Fatal)";
> break;
> - case HW_EVENT_ERR_UNCORRECTED:
> - ev.error_type = "Uncorrected";
> + case HW_EVENT_AER_UNCORRECTED_FATAL:
> + ev.error_type = "Uncorrected (Fatal)";
> break;
> - case HW_EVENT_ERR_FATAL:
> - ev.error_type = "Fatal";
> + case HW_EVENT_AER_CORRECTED:
> + ev.error_type = "Corrected";
> break;
> default:
> - case HW_EVENT_ERR_INFO:
> - ev.error_type = "Info";
> + ev.error_type = "Unknown severity";
> }
> trace_seq_puts(s, ev.error_type);
>
> diff --git a/ras-events.h b/ras-events.h
> index e7734b2..1a78390 100644
> --- a/ras-events.h
> +++ b/ras-events.h
> @@ -68,6 +68,13 @@ enum hw_event_mc_err_type {
> HW_EVENT_ERR_INFO,
> };
>
> +/* Should match the code at Kernel's /drivers/pci/pcie/aer/aerdrv_errprint.c */
> +enum hw_event_aer_err_type {
> + HW_EVENT_AER_UNCORRECTED_NON_FATAL,
> + HW_EVENT_AER_UNCORRECTED_FATAL,
> + HW_EVENT_AER_CORRECTED,
> +};
> +
> /* Should match the code at Kernel's include/acpi/ghes.h */
> enum ghes_severity {
> GHES_SEV_NO,
Thanks,
Mauro
next reply other threads:[~2018-08-14 16:15 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-08-14 16:15 Mauro Carvalho Chehab [this message]
-- strict thread matches above, loose matches on Subject: below --
2018-08-14 16:50 [1/2] rasdaemon: fix PCIe AER error type Thomas Tai
2018-05-14 14:33 Thomas Tai
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=20180814131511.4f3e53b2@coco.lan \
--to=mchehab@infradead.org \
--cc=linux-edac@vger.kernel.org \
--cc=mchehab@kernel.org \
--cc=thomas.tai@oracle.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;
as well as URLs for NNTP newsgroup(s).