From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752721AbdDIVzC (ORCPT ); Sun, 9 Apr 2017 17:55:02 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:43818 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751307AbdDIVzA (ORCPT ); Sun, 9 Apr 2017 17:55:00 -0400 Subject: Re: [PATCH v4 19/23] drivers/fsi: Add GPIO based FSI master From: Benjamin Herrenschmidt Reply-To: benh@au1.ibm.com To: Christopher Bostic , Joel Stanley Cc: Rob Herring , Mark Rutland , Russell King , rostedt@goodmis.org, mingo@redhat.com, Greg KH , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Linux Kernel Mailing List , Andrew Jeffery , Alistair Popple , "Edward A . James" , Jeremy Kerr Date: Mon, 10 Apr 2017 07:53:55 +1000 In-Reply-To: <1491774092.4166.195.camel@kernel.crashing.org> References: <20170329174340.89109-1-cbostic@linux.vnet.ibm.com> <20170329174340.89109-20-cbostic@linux.vnet.ibm.com> <0e1bcf3a-e8d7-9f50-bdf7-2a1e7466665b@linux.vnet.ibm.com> <1490907014.3177.207.camel@kernel.crashing.org> <93b21624-11fc-b71b-aa78-6cb4371c87ae@linux.vnet.ibm.com> <1491344360.4166.68.camel@kernel.crashing.org> <5344146a-f450-7959-4688-a83ee022574b@linux.vnet.ibm.com> <1491774092.4166.195.camel@kernel.crashing.org> Organization: IBM Australia Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.22.6 (3.22.6-1.fc25) Mime-Version: 1.0 Content-Transfer-Encoding: 8bit X-TM-AS-MML: disable x-cbid: 17040921-0052-0000-0000-0000022C8598 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 17040921-0053-0000-0000-000008061000 Message-Id: <1491774835.4166.197.camel@au1.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2017-04-09_14:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=0 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1702020001 definitions=main-1704090197 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 2017-04-10 at 07:41 +1000, Benjamin Herrenschmidt wrote: > On Sun, 2017-04-09 at 16:22 -0500, Christopher Bostic wrote: > > A 3 microsecond delay is required, however, to prevent occasional > > issues  > > during heavy FSI bus load stress testing. > > A 1 nanosecond delay using ndelay(1) had been specified prior to > > this  > > but after looking more closely at real time performance it turned > > out to  > > actually be roughly 1-2 microseconds.   This appears to be the > > minimum  > > resolution using the delay() linux libraries on the > > AST2400/2500.    > > Given this, increasing delay to 3 microseconds doesn't impact  > > performance much considering I can now remove the sample input > > delay  > > based on your recommendations to re-order the two clock delays. > > This is huge delays. We should consider a AST2xxx specific variant of > the backend that uses nops or similar lab-calibrated constructs > instead. Otherwise we are stuck in the kHz range, this is a >200Mhz > bus > :) > > I don't understand why 3us delay would thus be necessary. > > Where about did you observe issues ? Could it be that you don't wait > long enough in the transitions from write to read ? FYI. pdbg in userspace operates without any delays in practice, the overhead between the various load/store instructions seems sufficient. The only delay that's needed is when going through the FSI2PIB (to do SCOMs) where it seems like back-2-back accesses can be problematic. Cheers, Ben