summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorMahesh Salgaonkar <mahesh@linux.vnet.ibm.com>2019-03-04 22:36:42 +0530
committerStewart Smith <stewart@linux.ibm.com>2019-03-05 15:28:06 +1100
commit497734984231f7c76576a5b0b1762cdaeac6c67a (patch)
treedad4314991db1c2117e46d7fab075355f76b4079 /core
parentca349b836d026e6442c873663a9fd72687a4298a (diff)
downloadtalos-skiboot-497734984231f7c76576a5b0b1762cdaeac6c67a.tar.gz
talos-skiboot-497734984231f7c76576a5b0b1762cdaeac6c67a.zip
opal/hmi: set a flag to inform OS that TOD/TB has failed.
Set a flag to indicate OS about TOD/TB failure as part of new opal_handle_hmi2 handler. This flag then can be used by OS to make sure functions depending on TB value (e.g. udelay()) are aware of TB not ticking. Signed-off-by: Mahesh Salgaonkar <mahesh@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
Diffstat (limited to 'core')
-rw-r--r--core/hmi.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/core/hmi.c b/core/hmi.c
index 7094b4ca..fbb182c3 100644
--- a/core/hmi.c
+++ b/core/hmi.c
@@ -1223,10 +1223,12 @@ static int handle_tfac_errors(struct OpalHMIEvent *hmi_evt, uint64_t *out_flags)
/* Set the TB state looking at TFMR register before we head out. */
this_cpu()->tb_invalid = !(mfspr(SPR_TFMR) & SPR_TFMR_TB_VALID);
- if (this_cpu()->tb_invalid)
+ if (this_cpu()->tb_invalid) {
+ *out_flags |= OPAL_HMI_FLAGS_TOD_TB_FAIL;
prlog(PR_WARNING, "Failed to get TB in running state! "
"CPU=%x, TFMR=%016lx\n", this_cpu()->pir,
mfspr(SPR_TFMR));
+ }
return recover;
}
OpenPOWER on IntegriCloud