[PATCH V2] cxl: Fix timebase synchronization status on P9

Vaibhav Jain vaibhav at linux.vnet.ibm.com
Fri Feb 16 21:03:12 AEDT 2018


Frederic Barrat <fbarrat at linux.vnet.ibm.com> writes:

> I'm also wondering if it wouldn't be simpler to always update the 
> timebase_synced flag dynamically, even on p8. That way we wouldn't need 
> to have the p8 specific code to check for synchronization in 
> cxl_setup_psl_timebase(). p8 and p9 code would be the same.

I am wondering if we can have an implementation like this:

static ssize_t psl_timebase_synced_show(struct device *device,
{
  	struct cxl *adapter = to_cxl_adapter(device);
        
        /* if not already synced than force a resync */
        if (!adapter->psl_timebase_synced)
                /* Choose appropriate PSL implementation */
                adapter->native->sl_ops->psl_sync_timebase(adapter);

   	return scnprintf(buf, PAGE_SIZE, "%i\n", adapter->psl_timebase_synced);
}

In case of PSL9 if timebase request from PSL->CAPP fails then PSL will
send an error interrupt. This can be used to set the
'psl_timebase_synced' flag back to false if timebase ever fails.

-- 
Vaibhav Jain <vaibhav at linux.vnet.ibm.com>
Linux Technology Center, IBM India Pvt. Ltd.



More information about the Linuxppc-dev mailing list