From 945dced9148fd98f6a84c113f9426af7b59b370b Mon Sep 17 00:00:00 2001 From: Nicholas Piggin Date: Fri, 17 Dec 2021 12:24:39 +1000 Subject: chiptod: properly zero TB SPR when cleaning up for invalid TB MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The existing sequence writes TBU twice and leaves TBL unchanged. This may not really matter if it's being resynced from the chiptod soon, but it's possible it could clear a parity error. Signed-off-by: Nicholas Piggin Signed-off-by: Cédric Le Goater --- hw/chiptod.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hw/chiptod.c b/hw/chiptod.c index 7c0a1ff..736bd03 100644 --- a/hw/chiptod.c +++ b/hw/chiptod.c @@ -1556,8 +1556,9 @@ void tfmr_cleanup_core_errors(uint64_t tfmr) * restored after the next rendez-vous */ if (!(tfmr & SPR_TFMR_TB_VALID)) { + mtspr(SPR_TBWL, 0); mtspr(SPR_TBWU, 0); - mtspr(SPR_TBWU, 0); + mtspr(SPR_TBWL, 0); } } -- cgit v1.1