From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1B06CC433E0 for ; Fri, 22 May 2020 12:34:33 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id F071A206C3 for ; Fri, 22 May 2020 12:34:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729729AbgEVMec (ORCPT ); Fri, 22 May 2020 08:34:32 -0400 Received: from mga14.intel.com ([192.55.52.115]:13814 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728495AbgEVMec (ORCPT ); Fri, 22 May 2020 08:34:32 -0400 IronPort-SDR: Oe1m4sbpjZDoODj/9r1ak+ASjqO2TZLU0JtUcoAQllzC4fd4bORjNRseYu0RJuZaKcFkjXgow/ tSZAK53/yXAQ== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 May 2020 05:34:30 -0700 IronPort-SDR: whq9lJbDeCB6C/JwWqiv1Tp+i4S6K+d96mtgVT7fTnrcVC1bP62MThrNxmR9SkVKGz5T7AeVCA vXS+M7GHyzUQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.73,421,1583222400"; d="scan'208";a="265417271" Received: from smile.fi.intel.com (HELO smile) ([10.237.68.40]) by orsmga003.jf.intel.com with ESMTP; 22 May 2020 05:34:25 -0700 Received: from andy by smile with local (Exim 4.93) (envelope-from ) id 1jc6sd-008EJi-Ae; Fri, 22 May 2020 15:34:27 +0300 Date: Fri, 22 May 2020 15:34:27 +0300 From: Andy Shevchenko To: Mark Brown Cc: Serge Semin , Serge Semin , Linus Walleij , Vinod Koul , Feng Tang , Grant Likely , Alan Cox , Georgy Vlasov , Ramil Zaripov , Alexey Malahov , Thomas Bogendoerfer , Paul Burton , Ralf Baechle , Arnd Bergmann , Rob Herring , linux-mips@vger.kernel.org, devicetree@vger.kernel.org, Wan Ahmad Zainie , Thomas Gleixner , Jarkko Nikula , "wuxu.wu" , Clement Leger , Linus Walleij , linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v4 01/16] spi: dw: Add Tx/Rx finish wait methods to the MID DMA Message-ID: <20200522123427.GD1634618@smile.fi.intel.com> References: <20200522000806.7381-1-Sergey.Semin@baikalelectronics.ru> <20200522000806.7381-2-Sergey.Semin@baikalelectronics.ru> <20200522111340.GX1634618@smile.fi.intel.com> <20200522115235.rt3ay7lveimrgooa@mobilestation> <20200522121221.GA1634618@smile.fi.intel.com> <20200522121820.GG5801@sirena.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200522121820.GG5801@sirena.org.uk> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, May 22, 2020 at 01:18:20PM +0100, Mark Brown wrote: > On Fri, May 22, 2020 at 03:12:21PM +0300, Andy Shevchenko wrote: > > On Fri, May 22, 2020 at 02:52:35PM +0300, Serge Semin wrote: > > > > Please, see it's implementation. It does atomic delay when the delay value > > > is less than 10us. But selectively gets to the usleep_range() if value is > > > greater than that. > > > Oh, than it means we may do a very long busy loop here which is not good at > > all. If we have 10Hz clock, it might take seconds of doing nothing! > > Realistically it seems unlikely that the clock will be even as slow as > double digit kHz though, and if we do I'd not be surprised to see other > problems kicking in. It's definitely good to handle such things if we > can but so long as everything is OK for realistic use cases I'm not sure > it should be a blocker. Perhaps some kind of warning? Funny that using spi_delay_exec() will issue such a warning as a side effect of its implementation. -- With Best Regards, Andy Shevchenko