[Skiboot] [PATCH 07/14] opal/hmi: Initialize the hmi event with old value of HMER.
Mahesh J Salgaonkar
mahesh at linux.vnet.ibm.com
Wed Mar 14 21:08:01 AEDT 2018
From: Mahesh Salgaonkar <mahesh at linux.vnet.ibm.com>
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 at linux.vnet.ibm.com>
---
core/hmi.c | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/core/hmi.c b/core/hmi.c
index cd9420ad2..729861622 100644
--- a/core/hmi.c
+++ b/core/hmi.c
@@ -1092,8 +1092,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);
@@ -1106,9 +1112,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);
More information about the Skiboot
mailing list