[Skiboot] [PATCH] capp: Make error in capp timebase sync a non-fatal error

Vaibhav Jain vaibhav at linux.vnet.ibm.com
Fri Mar 2 22:12:19 AEDT 2018

Presently when we encounter an error while synchronizing capp timebase
with chip-tod at the end of enable_capi_mode() we return an
error. This has an to unintended consequences. First this will prevent
disabling of fast-reboot even though CAPP is already enabled by this
point. Secondly, failure during timebase sync is a non fatal error or
capp initialization as CAPP/PSL can continue working after this and an
AFU will only see an error when it tries to read the timebase value
from PSL.

So this patch updates enable_capi_mode() to not return an error in
case call to chiptod_capp_timebase_sync() fails. The function will now
just log an error and continue further with capp init sequence. This
make the current implementation align with the one in kernel 'cxl'
driver which also assumes the PSL timebase sync errors as non-fatal
init error.

Signed-off-by: Vaibhav Jain <vaibhav at linux.vnet.ibm.com>
 hw/phb4.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/hw/phb4.c b/hw/phb4.c
index 98595c61..8835e3de 100644
--- a/hw/phb4.c
+++ b/hw/phb4.c
@@ -4019,10 +4019,8 @@ static int64_t enable_capi_mode(struct phb4 *p, uint64_t pe_number,
 	if (!chiptod_capp_timebase_sync(p->chip_id, CAPP_TFMR,
-					PHB4_CAPP_REG_OFFSET(p))) {
 		PHBERR(p, "CAPP: Failed to sync timebase\n");
-		return OPAL_HARDWARE;
-	}
 	/* set callbacks to handle HMI events */
 	capi_ops.get_capp_info = &phb4_get_capp_info;

More information about the Skiboot mailing list