[Skiboot] [PATCH 2/2] opal/hmi: Generate one event per core for processor recovery.

Mahesh J Salgaonkar mahesh at linux.vnet.ibm.com
Mon Apr 23 16:15:28 AEST 2018


From: Mahesh Salgaonkar <mahesh at linux.vnet.ibm.com>

Processor recovery is per core error. All threads on that core receive
HMI. All threads don't need to generate HMI event for same error.
Let thread 0 only generate the event.

Signed-off-by: Mahesh Salgaonkar <mahesh at linux.vnet.ibm.com>
---
 core/hmi.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/core/hmi.c b/core/hmi.c
index 70ccc23f2..bd0fc13b8 100644
--- a/core/hmi.c
+++ b/core/hmi.c
@@ -1212,7 +1212,7 @@ static int handle_hmi_exception(uint64_t hmer, struct OpalHMIEvent *hmi_evt,
 		}
 
 		handled |= SPR_HMER_PROC_RECV_DONE;
-		if (hmi_evt) {
+		if (cpu_is_thread0(cpu) && hmi_evt) {
 			hmi_evt->severity = OpalHMI_SEV_NO_ERROR;
 			hmi_evt->type = OpalHMI_ERROR_PROC_RECOV_DONE;
 			queue_hmi_event(hmi_evt, recover, out_flags);
@@ -1220,7 +1220,7 @@ static int handle_hmi_exception(uint64_t hmer, struct OpalHMIEvent *hmi_evt,
 	}
 	if (hmer & SPR_HMER_PROC_RECV_ERROR_MASKED) {
 		handled |= SPR_HMER_PROC_RECV_ERROR_MASKED;
-		if (hmi_evt) {
+		if (cpu_is_thread0(cpu) && hmi_evt) {
 			hmi_evt->severity = OpalHMI_SEV_NO_ERROR;
 			hmi_evt->type = OpalHMI_ERROR_PROC_RECOV_MASKED;
 			queue_hmi_event(hmi_evt, recover, out_flags);
@@ -1229,7 +1229,7 @@ static int handle_hmi_exception(uint64_t hmer, struct OpalHMIEvent *hmi_evt,
 	}
 	if (hmer & SPR_HMER_PROC_RECV_AGAIN) {
 		handled |= SPR_HMER_PROC_RECV_AGAIN;
-		if (hmi_evt) {
+		if (cpu_is_thread0(cpu) && hmi_evt) {
 			hmi_evt->severity = OpalHMI_SEV_NO_ERROR;
 			hmi_evt->type = OpalHMI_ERROR_PROC_RECOV_DONE_AGAIN;
 			queue_hmi_event(hmi_evt, recover, out_flags);



More information about the Skiboot mailing list