[Skiboot] [PATCH] xive: Cleanup TM area on CPU calling

Benjamin Herrenschmidt benh at kernel.crashing.org
Mon Jan 16 15:40:14 AEDT 2017


In case HostBoot leaves some gunk behind

Signed-off-by: Benjamin Herrenschmidt <benh at kernel.crashing.org>
---
 hw/xive.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/hw/xive.c b/hw/xive.c
index 36f0e84..41aee34 100644
--- a/hw/xive.c
+++ b/hw/xive.c
@@ -2679,6 +2679,14 @@ void xive_cpu_callin(struct cpu_thread *cpu)
 	/* Set CPPR to 0 */
 	out_8(xs->tm_ring1 + TM_QW3_HV_PHYS + TM_CPPR, 0);
 
+	/* Pull everything */
+	in_be32(xs->tm_ring1 + TM_SPC_PULL_USR_CTX);
+	in_be32(xs->tm_ring1 + TM_SPC_PULL_OS_CTX);
+	in_be32(xs->tm_ring1 + TM_SPC_PULL_POOL_CTX);
+
+	/* Clear VT and LSI bit */
+	out_8(xs->tm_ring1 + TM_QW3_HV_PHYS + 8, 0);
+
 	/* Set VT to 1 */
 	out_8(xs->tm_ring1 + TM_QW3_HV_PHYS + TM_WORD2, 0x80);
 



More information about the Skiboot mailing list