[Skiboot] [PATCH v2 05/15] opal/hmi: Don't bother passing HMER to pre-recovery cleanup
Mahesh J Salgaonkar
mahesh at linux.vnet.ibm.com
Tue Apr 17 03:33:24 AEST 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 68583bb1d..c2b44b9d1 100644
--- a/core/hmi.c
+++ b/core/hmi.c
@@ -909,17 +909,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
@@ -1021,16 +1017,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
@@ -1112,12 +1104,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)
@@ -1149,7 +1141,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