[Skiboot] [PATCH v2 07/15] opal/hmi: Initialize the hmi event with old value of HMER.

Mahesh J Salgaonkar mahesh at linux.vnet.ibm.com
Tue Apr 17 03:33:43 AEST 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 f51512989..95ab96cde 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);



More information about the Skiboot mailing list