aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>2018-04-16 23:03:31 +0530
committerStewart Smith <stewart@linux.ibm.com>2018-04-17 03:52:10 -0500
commit674f7696f7c1e51ab159d81a05a18c445f0c896d (patch)
treee55261a42ca2c5ebd2955ac8f0aa79f7dd2afee4 /include
parent099801d775ee273a9b500d921f4d47f96499c766 (diff)
downloadskiboot-674f7696f7c1e51ab159d81a05a18c445f0c896d.zip
skiboot-674f7696f7c1e51ab159d81a05a18c445f0c896d.tar.gz
skiboot-674f7696f7c1e51ab159d81a05a18c445f0c896d.tar.bz2
opal/hmi: Rework HMI handling of TFAC errors
This patch reworks the HMI handling for TFAC errors by introducing 4 rendez-vous points improve the thread synchronization while handling timebase errors that requires all thread to clear dirty data from TB/HDEC register before clearing the errors. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Mahesh Salgaonkar <mahesh@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
Diffstat (limited to 'include')
-rw-r--r--include/chiptod.h6
-rw-r--r--include/cpu.h3
2 files changed, 6 insertions, 3 deletions
diff --git a/include/chiptod.h b/include/chiptod.h
index fd5cd96..7708d48 100644
--- a/include/chiptod.h
+++ b/include/chiptod.h
@@ -29,7 +29,11 @@ enum chiptod_topology {
extern void chiptod_init(void);
extern bool chiptod_wakeup_resync(void);
-extern int chiptod_recover_tb_errors(void);
+extern int chiptod_recover_tb_errors(uint64_t tfmr, bool *out_resynced);
+extern bool tfmr_recover_local_errors(uint64_t tfmr);
+extern bool recover_corrupt_tfmr(void);
+extern void tfmr_cleanup_core_errors(uint64_t tfmr);
+extern bool tfmr_clear_core_errors(uint64_t tfmr);
extern void chiptod_reset_tb(void);
extern bool chiptod_adjust_topology(enum chiptod_topology topo, bool enable);
extern bool chiptod_capp_timebase_sync(unsigned int chip_id, uint32_t tfmr_addr,
diff --git a/include/cpu.h b/include/cpu.h
index b7cd588..68f2463 100644
--- a/include/cpu.h
+++ b/include/cpu.h
@@ -97,9 +97,8 @@ struct cpu_thread {
*/
uint32_t core_hmi_state; /* primary only */
uint32_t *core_hmi_state_ptr;
- /* Mask to indicate thread id in core. */
- uint8_t thread_mask;
bool tb_invalid;
+ bool tb_resynced;
/* For use by XICS emulation on XIVE */
struct xive_cpu_state *xstate;