summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMahesh Salgaonkar <mahesh@linux.vnet.ibm.com>2018-04-16 23:03:43 +0530
committerStewart Smith <stewart@linux.ibm.com>2018-04-17 03:52:10 -0500
commit5e20a789d021dd14bb30439cd9b3beb3dfeed9b7 (patch)
treefe87a604921dad4cbfc61549d58c5431dd4d4d88
parent674f7696f7c1e51ab159d81a05a18c445f0c896d (diff)
downloadtalos-skiboot-5e20a789d021dd14bb30439cd9b3beb3dfeed9b7.tar.gz
talos-skiboot-5e20a789d021dd14bb30439cd9b3beb3dfeed9b7.zip
opal/hmi: Initialize the hmi event with old value of HMER.
Do this before we check for TFAC errors. Otherwise the event at host console shows no error reported in HMER register. Without this patch the console event show HMER with all zeros [ 216.753417] Severe Hypervisor Maintenance interrupt [Recovered] [ 216.753498] Error detail: Timer facility experienced an error [ 216.753509] HMER: 0000000000000000 [ 216.753518] TFMR: 3c12000870e04000 After this patch it shows old HMER values on host console: [ 2237.652533] Severe Hypervisor Maintenance interrupt [Recovered] [ 2237.652651] Error detail: Timer facility experienced an error [ 2237.652766] HMER: 0840000000000000 [ 2237.652837] TFMR: 3c12000870e04000 Signed-off-by: Mahesh Salgaonkar <mahesh@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
-rw-r--r--core/hmi.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/core/hmi.c b/core/hmi.c
index f5151298..95ab96cd 100644
--- a/core/hmi.c
+++ b/core/hmi.c
@@ -1131,8 +1131,14 @@ static int handle_hmi_exception(uint64_t hmer, struct OpalHMIEvent *hmi_evt,
int recover = 1;
uint64_t handled = 0;
+ prlog(PR_DEBUG, "Received HMI interrupt: HMER = 0x%016llx\n", hmer);
+ /* Initialize the hmi event with old value of HMER */
+ if (hmi_evt)
+ hmi_evt->hmer = hmer;
+
/* Handle Timer/TOD errors separately */
if (hmer & (SPR_HMER_TFAC_ERROR | SPR_HMER_TFMR_PARITY_ERROR)) {
+ hmi_print_debug("Timer Facility Error", hmer);
handled = hmer & (SPR_HMER_TFAC_ERROR | SPR_HMER_TFMR_PARITY_ERROR);
mtspr(SPR_HMER, ~handled);
recover = handle_tfac_errors(hmer, hmi_evt, out_flags);
@@ -1145,9 +1151,6 @@ static int handle_hmi_exception(uint64_t hmer, struct OpalHMIEvent *hmi_evt,
* looking at TFMR register. TFMR will tell us correct state of
* TB register.
*/
- prlog(PR_DEBUG, "Received HMI interrupt: HMER = 0x%016llx\n", hmer);
- if (hmi_evt)
- hmi_evt->hmer = hmer;
if (hmer & SPR_HMER_PROC_RECV_DONE) {
uint32_t chip_id = pir_to_chip_id(cpu->pir);
uint32_t core_id = pir_to_core_id(cpu->pir);
OpenPOWER on IntegriCloud