* [v2] x86/mce: Always save severity in machine_check_poll
@ 2017-06-21 19:46 ` Yazen Ghannam
0 siblings, 0 replies; 5+ messages in thread
From: Yazen Ghannam @ 2017-06-21 19:46 UTC (permalink / raw)
To: linux-edac; +Cc: Borislav Petkov, Tony Luck, x86, linux-kernel, Yazen Ghannam
From: Yazen Ghannam <yazen.ghannam@amd.com>
The severity gives a hint as to how to handle the error. The notifier
blocks can then use the severity to decide on an action. It's not necessary
for machine_check_poll() to filter errors for the notifier chain, since
each block will check its own set of conditions before handling an error.
Also, there isn't any urgency for machine_check_poll() to make decisions
based on severity like in do_machine_check().
If we can assume that a severity is set then we can use them in more
notifier blocks. For example, the CEC block can check for a "KEEP" severity
rather than checking bits in the status. This isn't possible now since the
severity is not set except for "DEFFRRED/UCNA" errors with a valid address.
Save the severity since we have it, and let the notifier blocks decide if
they want to do anything.
Signed-off-by: Yazen Ghannam <yazen.ghannam@amd.com>
---
Link:
https://lkml.kernel.org/r/1497286446-59533-1-git-send-email-Yazen.Ghannam@amd.com
v1->v2:
* Expand commit message.
arch/x86/kernel/cpu/mcheck/mce.c | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/arch/x86/kernel/cpu/mcheck/mce.c b/arch/x86/kernel/cpu/mcheck/mce.c
index b58b77808ce4..6dde0497efc7 100644
--- a/arch/x86/kernel/cpu/mcheck/mce.c
+++ b/arch/x86/kernel/cpu/mcheck/mce.c
@@ -673,7 +673,6 @@ bool machine_check_poll(enum mcp_flags flags, mce_banks_t *b)
{
bool error_seen = false;
struct mce m;
- int severity;
int i;
this_cpu_inc(mce_poll_count);
@@ -710,11 +709,7 @@ bool machine_check_poll(enum mcp_flags flags, mce_banks_t *b)
mce_read_aux(&m, i);
- severity = mce_severity(&m, mca_cfg.tolerant, NULL, false);
-
- if (severity == MCE_DEFERRED_SEVERITY && mce_is_memory_error(&m))
- if (m.status & MCI_STATUS_ADDRV)
- m.severity = severity;
+ m.severity = mce_severity(&m, mca_cfg.tolerant, NULL, false);
/*
* Don't get the IP here because it's unlikely to
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH v2] x86/mce: Always save severity in machine_check_poll
@ 2017-06-21 19:46 ` Yazen Ghannam
0 siblings, 0 replies; 5+ messages in thread
From: Yazen Ghannam @ 2017-06-21 19:46 UTC (permalink / raw)
To: linux-edac; +Cc: Borislav Petkov, Tony Luck, x86, linux-kernel, Yazen Ghannam
From: Yazen Ghannam <yazen.ghannam@amd.com>
The severity gives a hint as to how to handle the error. The notifier
blocks can then use the severity to decide on an action. It's not necessary
for machine_check_poll() to filter errors for the notifier chain, since
each block will check its own set of conditions before handling an error.
Also, there isn't any urgency for machine_check_poll() to make decisions
based on severity like in do_machine_check().
If we can assume that a severity is set then we can use them in more
notifier blocks. For example, the CEC block can check for a "KEEP" severity
rather than checking bits in the status. This isn't possible now since the
severity is not set except for "DEFFRRED/UCNA" errors with a valid address.
Save the severity since we have it, and let the notifier blocks decide if
they want to do anything.
Signed-off-by: Yazen Ghannam <yazen.ghannam@amd.com>
---
Link:
https://lkml.kernel.org/r/1497286446-59533-1-git-send-email-Yazen.Ghannam@amd.com
v1->v2:
* Expand commit message.
arch/x86/kernel/cpu/mcheck/mce.c | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/arch/x86/kernel/cpu/mcheck/mce.c b/arch/x86/kernel/cpu/mcheck/mce.c
index b58b77808ce4..6dde0497efc7 100644
--- a/arch/x86/kernel/cpu/mcheck/mce.c
+++ b/arch/x86/kernel/cpu/mcheck/mce.c
@@ -673,7 +673,6 @@ bool machine_check_poll(enum mcp_flags flags, mce_banks_t *b)
{
bool error_seen = false;
struct mce m;
- int severity;
int i;
this_cpu_inc(mce_poll_count);
@@ -710,11 +709,7 @@ bool machine_check_poll(enum mcp_flags flags, mce_banks_t *b)
mce_read_aux(&m, i);
- severity = mce_severity(&m, mca_cfg.tolerant, NULL, false);
-
- if (severity == MCE_DEFERRED_SEVERITY && mce_is_memory_error(&m))
- if (m.status & MCI_STATUS_ADDRV)
- m.severity = severity;
+ m.severity = mce_severity(&m, mca_cfg.tolerant, NULL, false);
/*
* Don't get the IP here because it's unlikely to
--
2.7.4
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [v2] x86/mce: Always save severity in machine_check_poll
2017-06-21 19:46 ` [PATCH v2] " Yazen Ghannam
@ 2017-06-22 8:48 ` Borislav Petkov
-1 siblings, 0 replies; 5+ messages in thread
From: Borislav Petkov @ 2017-06-22 8:48 UTC (permalink / raw)
To: Yazen Ghannam; +Cc: linux-edac, Tony Luck, x86, linux-kernel
On Wed, Jun 21, 2017 at 02:46:42PM -0500, Yazen Ghannam wrote:
> From: Yazen Ghannam <yazen.ghannam@amd.com>
>
> The severity gives a hint as to how to handle the error. The notifier
> blocks can then use the severity to decide on an action. It's not necessary
> for machine_check_poll() to filter errors for the notifier chain, since
> each block will check its own set of conditions before handling an error.
> Also, there isn't any urgency for machine_check_poll() to make decisions
> based on severity like in do_machine_check().
>
> If we can assume that a severity is set then we can use them in more
> notifier blocks. For example, the CEC block can check for a "KEEP" severity
Hmm, I'm not sure about this. If we did this, we would have to *make*
CECCs be always KEEP severity. And they are now but doing that would
make that mapping CECC->KEEP imprecise and unnecessary but required....
Yeah, we can talk about that when we have to cross that bridge.
So I've left the example but made the above s/can/could/ :)
> rather than checking bits in the status. This isn't possible now since the
> severity is not set except for "DEFFRRED/UCNA" errors with a valid address.
>
> Save the severity since we have it, and let the notifier blocks decide if
> they want to do anything.
>
> Signed-off-by: Yazen Ghannam <yazen.ghannam@amd.com>
> ---
> Link:
> https://lkml.kernel.org/r/1497286446-59533-1-git-send-email-Yazen.Ghannam@amd.com
>
> v1->v2:
> * Expand commit message.
>
> arch/x86/kernel/cpu/mcheck/mce.c | 7 +------
> 1 file changed, 1 insertion(+), 6 deletions(-)
Applied, thanks.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v2] x86/mce: Always save severity in machine_check_poll
@ 2017-06-22 8:48 ` Borislav Petkov
0 siblings, 0 replies; 5+ messages in thread
From: Borislav Petkov @ 2017-06-22 8:48 UTC (permalink / raw)
To: Yazen Ghannam; +Cc: linux-edac, Tony Luck, x86, linux-kernel
On Wed, Jun 21, 2017 at 02:46:42PM -0500, Yazen Ghannam wrote:
> From: Yazen Ghannam <yazen.ghannam@amd.com>
>
> The severity gives a hint as to how to handle the error. The notifier
> blocks can then use the severity to decide on an action. It's not necessary
> for machine_check_poll() to filter errors for the notifier chain, since
> each block will check its own set of conditions before handling an error.
> Also, there isn't any urgency for machine_check_poll() to make decisions
> based on severity like in do_machine_check().
>
> If we can assume that a severity is set then we can use them in more
> notifier blocks. For example, the CEC block can check for a "KEEP" severity
Hmm, I'm not sure about this. If we did this, we would have to *make*
CECCs be always KEEP severity. And they are now but doing that would
make that mapping CECC->KEEP imprecise and unnecessary but required....
Yeah, we can talk about that when we have to cross that bridge.
So I've left the example but made the above s/can/could/ :)
> rather than checking bits in the status. This isn't possible now since the
> severity is not set except for "DEFFRRED/UCNA" errors with a valid address.
>
> Save the severity since we have it, and let the notifier blocks decide if
> they want to do anything.
>
> Signed-off-by: Yazen Ghannam <yazen.ghannam@amd.com>
> ---
> Link:
> https://lkml.kernel.org/r/1497286446-59533-1-git-send-email-Yazen.Ghannam@amd.com
>
> v1->v2:
> * Expand commit message.
>
> arch/x86/kernel/cpu/mcheck/mce.c | 7 +------
> 1 file changed, 1 insertion(+), 6 deletions(-)
Applied, thanks.
--
Regards/Gruss,
Boris.
Good mailing practices for 400: avoid top-posting and trim the reply.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [tip:ras/core] x86/mce: Always save severity in machine_check_poll()
2017-06-21 19:46 ` [PATCH v2] " Yazen Ghannam
(?)
@ 2017-06-26 14:03 ` tip-bot for Yazen Ghannam
-1 siblings, 0 replies; 5+ messages in thread
From: tip-bot for Yazen Ghannam @ 2017-06-26 14:03 UTC (permalink / raw)
To: linux-tip-commits; +Cc: hpa, tglx, yazen.ghannam, bp, mingo, linux-kernel
Commit-ID: e2de64ec52659870b4fdef5bf08f265ce5fe1ccc
Gitweb: http://git.kernel.org/tip/e2de64ec52659870b4fdef5bf08f265ce5fe1ccc
Author: Yazen Ghannam <yazen.ghannam@amd.com>
AuthorDate: Mon, 26 Jun 2017 14:35:31 +0200
Committer: Thomas Gleixner <tglx@linutronix.de>
CommitDate: Mon, 26 Jun 2017 15:58:56 +0200
x86/mce: Always save severity in machine_check_poll()
The MCE severity gives a hint as to how to handle the error. The
notifier blocks can then use the severity to decide on an action.
It's not necessary for machine_check_poll() to filter errors for
the notifier chain, since each block will check its own set of
conditions before handling an error.
Also, there isn't any urgency for machine_check_poll() to make decisions
based on severity like in do_machine_check().
If we can assume that a severity is set then we can use it in more
notifier blocks. For example, the CEC block could check for a "KEEP"
severity rather than checking bits in the status. This isn't possible
now since the severity is not set except for "DEFFRRED/UCNA" errors with
a valid address.
Save the severity since we have it, and let the notifier blocks decide
if they want to do anything.
Signed-off-by: Yazen Ghannam <yazen.ghannam@amd.com>
Signed-off-by: Borislav Petkov <bp@suse.de>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/1498074402-98633-1-git-send-email-Yazen.Ghannam@amd.com
---
arch/x86/kernel/cpu/mcheck/mce.c | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/arch/x86/kernel/cpu/mcheck/mce.c b/arch/x86/kernel/cpu/mcheck/mce.c
index b58b778..6dde049 100644
--- a/arch/x86/kernel/cpu/mcheck/mce.c
+++ b/arch/x86/kernel/cpu/mcheck/mce.c
@@ -673,7 +673,6 @@ bool machine_check_poll(enum mcp_flags flags, mce_banks_t *b)
{
bool error_seen = false;
struct mce m;
- int severity;
int i;
this_cpu_inc(mce_poll_count);
@@ -710,11 +709,7 @@ bool machine_check_poll(enum mcp_flags flags, mce_banks_t *b)
mce_read_aux(&m, i);
- severity = mce_severity(&m, mca_cfg.tolerant, NULL, false);
-
- if (severity == MCE_DEFERRED_SEVERITY && mce_is_memory_error(&m))
- if (m.status & MCI_STATUS_ADDRV)
- m.severity = severity;
+ m.severity = mce_severity(&m, mca_cfg.tolerant, NULL, false);
/*
* Don't get the IP here because it's unlikely to
^ permalink raw reply related [flat|nested] 5+ messages in thread
end of thread, other threads:[~2017-06-26 14:05 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-06-21 19:46 [v2] x86/mce: Always save severity in machine_check_poll Yazen Ghannam
2017-06-21 19:46 ` [PATCH v2] " Yazen Ghannam
2017-06-26 14:03 ` [tip:ras/core] x86/mce: Always save severity in machine_check_poll() tip-bot for Yazen Ghannam
-- strict thread matches above, loose matches on Subject: below --
2017-06-22 8:48 [v2] x86/mce: Always save severity in machine_check_poll Borislav Petkov
2017-06-22 8:48 ` [PATCH v2] " Borislav Petkov
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.