[Acked] [PATCH Wily SRU v2] cxl: Fix PSL timebase synchronization detection
Andy Whitcroft
apw at canonical.com
Tue Mar 1 14:04:08 UTC 2016
On Mon, Feb 29, 2016 at 09:38:10AM -0700, tim.gardner at canonical.com wrote:
> From: Frederic Barrat <fbarrat at linux.vnet.ibm.com>
>
> BugLink: http://bugs.launchpad.net/bugs/1532914
>
> The PSL timebase synchronization is seemingly failing for
> configuration not including VIRT_CPU_ACCOUNTING_NATIVE. The driver
> shows the following trace in dmesg:
> PSL: Timebase sync: giving up!
>
> The PSL timebase register is actually syncing correctly, but the cxl
> driver is not detecting it. Fix is to use the proper timebase-to-time
> conversion.
>
> Signed-off-by: Frederic Barrat <fbarrat at linux.vnet.ibm.com>
> Cc: <stable at vger.kernel.org> # 4.3+
> Acked-by: Michael Neuling <mikey at neuling.org>
> Reviewed-by: Matthew R. Ochs <mrochs at linux.vnet.ibm.com>
> Acked-by: Ian Munsie <imunsie at au1.ibm.com>
> Reviewed-by: Andrew Donnellan <andrew.donnellan at au1.ibm.com>
> Reviewed-by: Vaibhav Jain <vaibhav at linux.vnet.ibm.com>
> Signed-off-by: Michael Ellerman <mpe at ellerman.id.au>
> (cherry picked from git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git commit 923adb1646d5ba739d2a1e63ee20d60574d9da8e)
Patch looks ok, but this is an odd form. We normally do something more
like:
(cherry picked from commit NNNN git://)
there are scripts which need to read these sadly.
> Signed-off-by: Tim Gardner <tim.gardner at canonical.com>
> ---
> drivers/misc/cxl/pci.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/misc/cxl/pci.c b/drivers/misc/cxl/pci.c
> index 4c1903f..0c6c17a1 100644
> --- a/drivers/misc/cxl/pci.c
> +++ b/drivers/misc/cxl/pci.c
> @@ -415,7 +415,7 @@ static int cxl_setup_psl_timebase(struct cxl *adapter, struct pci_dev *dev)
> delta = mftb() - psl_tb;
> if (delta < 0)
> delta = -delta;
> - } while (cputime_to_usecs(delta) > 16);
> + } while (tb_to_ns(delta) > 16000);
>
> return 0;
> }
Looks sane. I am assuming v2 is adding provenance and not a code
change, as I cannot see a difference.
Acked-by: Andy Whitcroft <apw at canonical.com>
-apw
More information about the kernel-team
mailing list