Re: [PATCH V2] cxl: Fix timebase synchronization status on P9
From: Vaibhav Jain <hidden>
Date: 2018-02-16 10:03:00
Frederic Barrat [off-list ref] 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 [off-list ref]
Linux Technology Center, IBM India Pvt. Ltd.