Skip to content

Commit

Permalink
opal/hmi: Initialize the hmi event with old value of TFMR.
Browse files Browse the repository at this point in the history
Do this before we fix TFAC errors. Otherwise the event at host console
shows no thread error reported in TFMR register.

Without this patch the console event show TFMR with no thread error:
(DEC parity error TFMR[59] injection)

[   53.737572] Severe Hypervisor Maintenance interrupt [Recovered]
[   53.737596]  Error detail: Timer facility experienced an error
[   53.737611] 	HMER: 0840000000000000
[   53.737621] 	TFMR: 3212000870e04000

After this patch it shows old TFMR value on host console:

[ 2302.267271] Severe Hypervisor Maintenance interrupt [Recovered]
[ 2302.267305]  Error detail: Timer facility experienced an error
[ 2302.267320] 	HMER: 0840000000000000
[ 2302.267330] 	TFMR: 3212000870e14010

Fixes: 674f769 ("opal/hmi: Rework HMI handling of TFAC errors")
Cc: skiboot-stable@lists.ozlabs.org
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 16, 2019
1 parent ff960a7 commit 5f339b4
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion core/hmi.c
Original file line number Diff line number Diff line change
Expand Up @@ -1100,6 +1100,9 @@ static int handle_tfac_errors(struct OpalHMIEvent *hmi_evt, uint64_t *out_flags)
int recover = -1;
uint64_t tfmr = mfspr(SPR_TFMR);

/* Initialize the hmi event with old value of TFMR */
hmi_evt->tfmr = tfmr;

/* A TFMR parity/corrupt error makes us ignore all the local stuff.*/
if (tfmr & SPR_TFMR_TFMR_CORRUPT) {
/* Mark TB as invalid for now as we don't trust TFMR, we'll fix
Expand Down Expand Up @@ -1160,7 +1163,6 @@ static int handle_tfac_errors(struct OpalHMIEvent *hmi_evt, uint64_t *out_flags)
if (recover != -1 && hmi_evt) {
hmi_evt->severity = OpalHMI_SEV_ERROR_SYNC;
hmi_evt->type = OpalHMI_ERROR_TFAC;
hmi_evt->tfmr = tfmr;
queue_hmi_event(hmi_evt, recover, out_flags);
}

Expand Down

0 comments on commit 5f339b4

Please sign in to comment.