Skip to content

Commit

Permalink
opal/hmi: Generate one event per core for processor recovery.
Browse files Browse the repository at this point in the history
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@linux.vnet.ibm.com>
Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
  • Loading branch information
maheshsal authored and stewartsmith committed Apr 24, 2018
1 parent 115c9f9 commit 376b5e3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions core/hmi.c
Original file line number Diff line number Diff line change
Expand Up @@ -1212,15 +1212,15 @@ 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);
}
}
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);
Expand All @@ -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);
Expand Down

0 comments on commit 376b5e3

Please sign in to comment.