From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx0a-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 3zjTGr534SzF1J8 for ; Fri, 16 Feb 2018 21:03:00 +1100 (AEDT) Received: from pps.filterd (m0098419.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w1G9wn3q070693 for ; Fri, 16 Feb 2018 05:02:58 -0500 Received: from e06smtp13.uk.ibm.com (e06smtp13.uk.ibm.com [195.75.94.109]) by mx0b-001b2d01.pphosted.com with ESMTP id 2g5tn6625b-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Fri, 16 Feb 2018 05:02:57 -0500 Received: from localhost by e06smtp13.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 16 Feb 2018 10:02:56 -0000 From: Vaibhav Jain To: Frederic Barrat , Christophe Lombard , linuxppc-dev@lists.ozlabs.org, andrew.donnellan@au1.ibm.com Subject: Re: [PATCH V2] cxl: Fix timebase synchronization status on P9 In-Reply-To: References: <1518713524-1500-1-git-send-email-clombard@linux.vnet.ibm.com> Date: Fri, 16 Feb 2018 15:32:51 +0530 MIME-Version: 1.0 Content-Type: text/plain Message-Id: <87mv09z1ys.fsf@vajain21.in.ibm.com> List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Frederic Barrat 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 Linux Technology Center, IBM India Pvt. Ltd.