aboutsummaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorNicholas Piggin <npiggin@gmail.com>2021-12-17 12:24:39 +1000
committerCédric Le Goater <clg@kaod.org>2021-12-23 18:47:26 +0100
commit8267789f98178072792a180242f9fff4976a993e (patch)
tree3dc4c9277dbb00023b71249bdc591ca8c9c1ecaa /hw
parent1f4d12cf706de11eadc2e25da948340cefb595b3 (diff)
downloadskiboot-8267789f98178072792a180242f9fff4976a993e.zip
skiboot-8267789f98178072792a180242f9fff4976a993e.tar.gz
skiboot-8267789f98178072792a180242f9fff4976a993e.tar.bz2
chiptod: properly zero TB SPR when cleaning up for invalid TB
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 <npiggin@gmail.com> Reviewed-by: Cédric Le Goater <clg@kaod.org> Signed-off-by: Cédric Le Goater <clg@kaod.org>
Diffstat (limited to 'hw')
-rw-r--r--hw/chiptod.c3
1 files changed, 2 insertions, 1 deletions
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);
}
}