[Skiboot] [PATCH 05/14] opal/hmi: Don't bother passing HMER to pre-recovery cleanup

Mahesh J Salgaonkar mahesh at linux.vnet.ibm.com
Wed Mar 14 21:07:48 AEDT 2018


From: Benjamin Herrenschmidt <benh at kernel.crashing.org>

The test for TFAC error is now redundant so we remove it and
remove the HMER argument.

Signed-off-by: Benjamin Herrenschmidt <benh at kernel.crashing.org>
---
 core/hmi.c |   20 ++++++--------------
 1 file changed, 6 insertions(+), 14 deletions(-)

diff --git a/core/hmi.c b/core/hmi.c
index 2fc401d91..df8697b75 100644
--- a/core/hmi.c
+++ b/core/hmi.c
@@ -874,17 +874,13 @@ static int get_split_core_mode(void)
  *	- SPR_TFMR_TB_RESIDUE_ERR
  *	- SPR_TFMR_HDEC_PARITY_ERROR
  */
-static void pre_recovery_cleanup_p8(uint64_t hmer, uint64_t *out_flags)
+static void pre_recovery_cleanup_p8(uint64_t *out_flags)
 {
 	uint64_t tfmr;
 	uint32_t sibling_thread_mask;
 	int split_core_mode, subcore_id, thread_id, threads_per_core;
 	int i;
 
-	/* exit if it is not Time facility error. */
-	if (!(hmer & SPR_HMER_TFAC_ERROR))
-		return;
-
 	/*
 	 * Exit if it is not the error that leaves dirty data in timebase
 	 * or HDEC register. OR this may be the thread which came in very
@@ -986,16 +982,12 @@ static void pre_recovery_cleanup_p8(uint64_t hmer, uint64_t *out_flags)
  *	- SPR_TFMR_TB_RESIDUE_ERR
  *	- SPR_TFMR_HDEC_PARITY_ERROR
  */
-static void pre_recovery_cleanup_p9(uint64_t hmer, uint64_t *out_flags)
+static void pre_recovery_cleanup_p9(uint64_t *out_flags)
 {
 	uint64_t tfmr;
 	int threads_per_core = cpu_thread_count;
 	int i;
 
-	/* exit if it is not Time facility error. */
-	if (!(hmer & SPR_HMER_TFAC_ERROR))
-		return;
-
 	/*
 	 * Exit if it is not the error that leaves dirty data in timebase
 	 * or HDEC register. OR this may be the thread which came in very
@@ -1077,12 +1069,12 @@ static void pre_recovery_cleanup_p9(uint64_t hmer, uint64_t *out_flags)
 	wait_for_cleanup_complete();
 }
 
-static void pre_recovery_cleanup(uint64_t hmer, uint64_t *out_flags)
+static void pre_recovery_cleanup(uint64_t *out_flags)
 {
 	if (proc_gen == proc_gen_p9)
-		return pre_recovery_cleanup_p9(hmer, out_flags);
+		return pre_recovery_cleanup_p9(out_flags);
 	else
-		return pre_recovery_cleanup_p8(hmer, out_flags);
+		return pre_recovery_cleanup_p8(out_flags);
 }
 
 static void hmi_print_debug(const uint8_t *msg, uint64_t hmer)
@@ -1114,7 +1106,7 @@ static int handle_tfac_errors(uint64_t hmer, struct OpalHMIEvent *hmi_evt,
 	int recover = 1;
 	uint64_t tfmr;
 
-	pre_recovery_cleanup(hmer, out_flags);
+	pre_recovery_cleanup(out_flags);
 
 	lock(&hmi_lock);
 	this_cpu()->tb_invalid = !(mfspr(SPR_TFMR) & SPR_TFMR_TB_VALID);



More information about the Skiboot mailing list