* [PATCH v3] powerpc/mce: log the error for all unrecoverable errors
@ 2023-02-01 9:59 Ganesh Goudar
2023-02-15 12:40 ` Michael Ellerman
0 siblings, 1 reply; 2+ messages in thread
From: Ganesh Goudar @ 2023-02-01 9:59 UTC (permalink / raw)
To: linuxppc-dev, mpe; +Cc: Ganesh Goudar, Mahesh Salgaonkar
For all unrecoverable errors we are missing to log the
error, Since machine_check_log_err() is not getting called
for unrecoverable errors. machine_check_log_err() is called
from deferred handler, To run deferred handlers we have to do
irq work raise from the exception handler.
For recoverable errors exception vector code takes care of
running deferred handlers.
For unrecoverable errors raise irq work in save_mce_event(),
So that we log the error from MCE deferred handler.
Log without this change
MCE: CPU27: machine check (Severe) Real address Load/Store (foreign/control memory) [Not recovered]
MCE: CPU27: PID: 10580 Comm: inject-ra-err NIP: [0000000010000df4]
MCE: CPU27: Initiator CPU
MCE: CPU27: Unknown
Log with this change
MCE: CPU24: machine check (Severe) Real address Load/Store (foreign/control memory) [Not recovered]
MCE: CPU24: PID: 1589811 Comm: inject-ra-err NIP: [0000000010000e48]
MCE: CPU24: Initiator CPU
MCE: CPU24: Unknown
RTAS: event: 5, Type: Platform Error (224), Severity: 3
Signed-off-by: Ganesh Goudar <ganeshgr@linux.ibm.com>
Reviewed-by: Mahesh Salgaonkar <mahesh@linux.ibm.com>
---
V3: Rephrasing the commit message.
---
arch/powerpc/kernel/mce.c | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/arch/powerpc/kernel/mce.c b/arch/powerpc/kernel/mce.c
index 6c5d30fba766..219f28637a3e 100644
--- a/arch/powerpc/kernel/mce.c
+++ b/arch/powerpc/kernel/mce.c
@@ -131,6 +131,13 @@ void save_mce_event(struct pt_regs *regs, long handled,
if (mce->error_type == MCE_ERROR_TYPE_UE)
mce->u.ue_error.ignore_event = mce_err->ignore_event;
+ /*
+ * Raise irq work, So that we don't miss to log the error for
+ * unrecoverable errors.
+ */
+ if (mce->disposition == MCE_DISPOSITION_NOT_RECOVERED)
+ mce_irq_work_queue();
+
if (!addr)
return;
@@ -233,9 +240,6 @@ static void machine_check_ue_event(struct machine_check_event *evt)
}
memcpy(&local_paca->mce_info->mce_ue_event_queue[index],
evt, sizeof(*evt));
-
- /* Queue work to process this event later. */
- mce_irq_work_queue();
}
/*
--
2.39.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH v3] powerpc/mce: log the error for all unrecoverable errors
2023-02-01 9:59 [PATCH v3] powerpc/mce: log the error for all unrecoverable errors Ganesh Goudar
@ 2023-02-15 12:40 ` Michael Ellerman
0 siblings, 0 replies; 2+ messages in thread
From: Michael Ellerman @ 2023-02-15 12:40 UTC (permalink / raw)
To: linuxppc-dev, Ganesh Goudar, mpe; +Cc: Mahesh Salgaonkar
On Wed, 1 Feb 2023 15:29:33 +0530, Ganesh Goudar wrote:
> For all unrecoverable errors we are missing to log the
> error, Since machine_check_log_err() is not getting called
> for unrecoverable errors. machine_check_log_err() is called
> from deferred handler, To run deferred handlers we have to do
> irq work raise from the exception handler.
>
> For recoverable errors exception vector code takes care of
> running deferred handlers.
>
> [...]
Applied to powerpc/next.
[1/1] powerpc/mce: log the error for all unrecoverable errors
https://git.kernel.org/powerpc/c/2115732e548304e52ca1bbdb714f45f4a2461653
cheers
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-02-15 12:46 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-02-01 9:59 [PATCH v3] powerpc/mce: log the error for all unrecoverable errors Ganesh Goudar
2023-02-15 12:40 ` Michael Ellerman
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).