[PATCH 06/13] powerpc/mce: Do not process notifier-handled UE events
Santosh Sivaraj
santosh at fossix.org
Fri Jun 21 14:55:48 AEST 2019
From: Reza Arbab <arbab at linux.ibm.com>
Signed-off-by: Reza Arbab <arbab at linux.ibm.com>
---
arch/powerpc/include/asm/mce.h | 3 ++-
arch/powerpc/kernel/mce.c | 9 +++++++++
2 files changed, 11 insertions(+), 1 deletion(-)
diff --git a/arch/powerpc/include/asm/mce.h b/arch/powerpc/include/asm/mce.h
index 948bef579086..240dd1fdfe35 100644
--- a/arch/powerpc/include/asm/mce.h
+++ b/arch/powerpc/include/asm/mce.h
@@ -122,7 +122,8 @@ struct machine_check_event {
enum MCE_UeErrorType ue_error_type:8;
u8 effective_address_provided;
u8 physical_address_provided;
- u8 reserved_1[5];
+ u8 process_event;
+ u8 reserved_1[4];
u64 effective_address;
u64 physical_address;
u8 reserved_2[8];
diff --git a/arch/powerpc/kernel/mce.c b/arch/powerpc/kernel/mce.c
index 912efe58e0b1..2616f1f71734 100644
--- a/arch/powerpc/kernel/mce.c
+++ b/arch/powerpc/kernel/mce.c
@@ -157,6 +157,8 @@ void save_mce_event(struct pt_regs *regs, long handled,
mce->u.ue_error.physical_address_provided = true;
mce->u.ue_error.physical_address = phys_addr;
}
+
+ mce->u.ue_error.process_event = true;
}
return;
}
@@ -241,6 +243,10 @@ void machine_check_queue_event(void)
if (!get_mce_event(&evt, MCE_EVENT_RELEASE))
return;
+ if (evt.error_type == MCE_ERROR_TYPE_UE &&
+ !evt.u.ue_error.process_event)
+ return;
+
index = __this_cpu_inc_return(mce_queue_count) - 1;
/* If queue is full, just return for now. */
if (index >= MAX_MC_EVT) {
@@ -660,6 +666,9 @@ long machine_check_notify(struct pt_regs *regs)
rc = blocking_notifier_call_chain(&mce_notifier_list, 0, evt);
if (rc & NOTIFY_STOP_MASK) {
+ if (evt->error_type == MCE_ERROR_TYPE_UE)
+ evt->u.ue_error.process_event = false;
+
evt->disposition = MCE_DISPOSITION_RECOVERED;
regs->msr |= MSR_RI;
--
2.20.1
More information about the Linuxppc-dev
mailing list