From: Frederic Barrat <fbarrat@linux.vnet.ibm.com>
To: Vaibhav Jain <vaibhav@linux.vnet.ibm.com>,
Christophe Lombard <clombard@linux.vnet.ibm.com>,
linuxppc-dev@lists.ozlabs.org, andrew.donnellan@au1.ibm.com
Subject: Re: [PATCH V2] cxl: Fix timebase synchronization status on P9
Date: Fri, 16 Feb 2018 12:20:21 +0100 [thread overview]
Message-ID: <ff50966e-acc2-1a1d-a03a-b45d32c87c63@linux.vnet.ibm.com> (raw)
In-Reply-To: <87mv09z1ys.fsf@vajain21.in.ibm.com>
Le 16/02/2018 à 11:02, Vaibhav Jain a écrit :
> Frederic Barrat <fbarrat@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.
I kind of like recomputing the status with every call. It takes care of
outdated status and could be helpful after a reset for example.
As to relying on the PSL error interrupt, I wouldn't sweat too much
about it. When we get one, the world stops spinning. So the timebase
status is the least of our worries. Or did they add something so that we
could find out that the PSL error interrupt is *only* due to a timebase
sync pb? Note that recomputing it with every read also works in that
case and is simpler.
Fred
next prev parent reply other threads:[~2018-02-16 11:20 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-15 16:52 [PATCH V2] cxl: Fix timebase synchronization status on P9 Christophe Lombard
2018-02-16 9:41 ` Frederic Barrat
2018-02-16 10:02 ` Vaibhav Jain
2018-02-16 11:20 ` Frederic Barrat [this message]
2018-02-16 10:03 ` Vaibhav Jain
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ff50966e-acc2-1a1d-a03a-b45d32c87c63@linux.vnet.ibm.com \
--to=fbarrat@linux.vnet.ibm.com \
--cc=andrew.donnellan@au1.ibm.com \
--cc=clombard@linux.vnet.ibm.com \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=vaibhav@linux.vnet.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).