Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp733671ybz; Fri, 24 Apr 2020 08:23:36 -0700 (PDT) X-Google-Smtp-Source: APiQypJXkCR4DR7vPEh05aW3BIZao/xq8R0Whz1pNDf6CQVD1lkN0j79l0hObKVm34hl6loiKkAr X-Received: by 2002:a17:907:447f:: with SMTP id oo23mr7355868ejb.274.1587741816489; Fri, 24 Apr 2020 08:23:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587741816; cv=none; d=google.com; s=arc-20160816; b=erVXGylllh3IhWACkUi4xqE61rIhVBVFm2xsQFO33suYXA/ZzMSmJA8MRR07aFfEEK 0bDRP/QErGvmdXWEP3II8dU9cnY316ByYlekO0htmVekRxkqWztm6j+1S5IKo4oAf54U xlLroY9YeyG0lgUiigXG6AfM/BvKUeZNmiaiZCWQDPHh66JOHX/SlsmY3XGPcNy59/f7 eb/wrvfbY5yQuOTWpNpwKQS4dAN9DmMcdmsTaH0z/6TIS6QdL6+ygDROy5HsS6NUePW3 ZBG6WC+87qK0TNEENcTTZyovg4a3ntfykAwiZlXgbsCMC5UMPCkRuMrUd5807qKvuZeA EPHw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:dkim-signature:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=6EvpFp10VeCDVx1lp61rQp1uS7/tMoIZMqDEb+agf+I=; b=Em44v6/KF1Ka/pJlbjop2ajIPKloJMoXB0jMKAxZ8Qq8mSrKaoGH2qg6IjwBWg4Plb DHDy3c/hocYC0A23qApqQGbvgtDOvVqRb/D0f7wsWLRTDpdobTwM05OywF5RvaBQBtVC V0Q3pYPEHH+yyh44T14blYrrZPBVspJd6a5uNz2ATpoVU1Ja+48E1I5v71n537rfNinR t4sUElQ0iD5Dc5jzBkegOgFORHTAFTCL00V+jBGDHy/neTLp4pJC26fNMuOLh0qUHfAp COLtNZnCRvPMQ6rm/Y9sQtE+XEPEX8kYs6vx+ciOXr8j+gwFYe1pGC9YluaOvFTQgrny vRHA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nvidia.com header.s=n1 header.b=ah4+pULA; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nvidia.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id q4si3215614eji.14.2020.04.24.08.23.05; Fri, 24 Apr 2020 08:23:36 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@nvidia.com header.s=n1 header.b=ah4+pULA; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nvidia.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727114AbgDXPTb (ORCPT + 99 others); Fri, 24 Apr 2020 11:19:31 -0400 Received: from hqnvemgate26.nvidia.com ([216.228.121.65]:12145 "EHLO hqnvemgate26.nvidia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726900AbgDXPTa (ORCPT ); Fri, 24 Apr 2020 11:19:30 -0400 Received: from hqpgpgate101.nvidia.com (Not Verified[216.228.121.13]) by hqnvemgate26.nvidia.com (using TLS: TLSv1.2, DES-CBC3-SHA) id ; Fri, 24 Apr 2020 08:19:18 -0700 Received: from hqmail.nvidia.com ([172.20.161.6]) by hqpgpgate101.nvidia.com (PGP Universal service); Fri, 24 Apr 2020 08:19:30 -0700 X-PGP-Universal: processed; by hqpgpgate101.nvidia.com on Fri, 24 Apr 2020 08:19:30 -0700 Received: from DRHQMAIL107.nvidia.com (10.27.9.16) by HQMAIL109.nvidia.com (172.20.187.15) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Fri, 24 Apr 2020 15:19:30 +0000 Received: from [10.26.73.231] (10.124.1.5) by DRHQMAIL107.nvidia.com (10.27.9.16) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Fri, 24 Apr 2020 15:19:27 +0000 Subject: Re: [PATCH v2 1/2] i2c: tegra: Better handle case where CPU0 is busy for a long time To: Dmitry Osipenko , Thierry Reding , Laxman Dewangan , "Wolfram Sang" , Manikanta Maddireddy , Vidya Sagar CC: , , References: <20200324191217.1829-1-digetx@gmail.com> <20200324191217.1829-2-digetx@gmail.com> <1e259e22-c300-663a-e537-18d854e0f478@nvidia.com> <8cd085e1-f9fd-6ec0-9f7a-d5463f176a63@nvidia.com> <6f07e5c8-7916-7ea2-2fe7-d05f8f011471@nvidia.com> <77a31b2f-f525-ba9e-f1ae-2b474465bde4@gmail.com> <470b4de4-e98a-1bdc-049e-6259ad603507@nvidia.com> From: Jon Hunter Message-ID: <79f6560e-dbb5-0ae1-49f8-cf1cd95396ec@nvidia.com> Date: Fri, 24 Apr 2020 16:19:25 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0 MIME-Version: 1.0 In-Reply-To: X-Originating-IP: [10.124.1.5] X-ClientProxiedBy: HQMAIL111.nvidia.com (172.20.187.18) To DRHQMAIL107.nvidia.com (10.27.9.16) Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nvidia.com; s=n1; t=1587741558; bh=6EvpFp10VeCDVx1lp61rQp1uS7/tMoIZMqDEb+agf+I=; h=X-PGP-Universal:Subject:To:CC:References:From:Message-ID:Date: User-Agent:MIME-Version:In-Reply-To:X-Originating-IP: X-ClientProxiedBy:Content-Type:Content-Language: Content-Transfer-Encoding; b=ah4+pULA1j3bd4sv6xF57BpM40y/gqIdTIObBUAAVJHhrv1ei9bZQHEGKduTQCOEc vU1sPRZZkH2FbeBn9JodzAd7Xdx51ldXdm02fDKkNL4DZRxltcWEi9yYWlRMyncwYZ kcvRlT2TQgbUDYiG1BYgDqIdhqmeJwCeFn2ElQWFpE2CH4Zr0SVXGbMxcPAVp7Zf5D rFuU5pJwqkGzkH3tqYJMegxbtQmA3fTPNeOaQWViFNfeacO4DB3jxIsAE4FG+lKX/i VfkXqf1CLMpvZF4oncwWkSMbyo17t93XNfQOXdmj4b5XuljMg5SV2rszA0ZjE/Kw38 iU3QH1yKibVdA== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 24/04/2020 15:45, Dmitry Osipenko wrote: > 24.04.2020 10:10, Jon Hunter =D0=BF=D0=B8=D1=88=D0=B5=D1=82: > ... >>> Could you please clarify why pm_runtime_get_sync() can't be used by the >>> I2C driver's in NOIRQ phase? >> >> Yes take a look at commit 1e2ef05bb8cf ("PM: Limit race conditions >> between runtime PM and system sleep (v2)"). >=20 > I2C driver now uses irq-safe RPM since ede2299f7 ("i2c: tegra: Support > atomic transfers"), and thus, the RPM's workqueue shouldn't be a > problem. I guess RPM should work fine in this case, don't you think so? I was testing, and I did not see it using atomic transfers. I can confirm if the RPM callbacks are called or not, but I did not think so. However, let me confirm. >>> Yes, keeping PCI regulators always-enabled should be a good immediate >>> solution. >> >> I was thinking about that, and I am not sure it is. I don't think that >> the failure to send the I2C command should break suspend. >=20 > It shouldn't, but looks like it should be a separate problem. Maybe but all these other problems appear to have existed for sometime now. We need to fix all, but for the moment we need to figure out what's best for v5.7. >> So I confirmed that DMA is not the issue in this case. I tested this by >> ensuring that DMA is never used. However, it is a potential problem >> indeed. >> >>> Could you please try to apply this hunk and see if it makes any >>> difference (I'll probably make it as proper patch): >> >> Per my tests, I don't believe that it will as disabling DMA does not >> resolve the problem. >> >>> It also could be that there is more than the suspend ordering problem, >>> but for now it is hard to tell without having a detailed log which >>> includes I2C/DMA/RPM traces. >> >> I have taken a look and I don't see any issues with ordering. I2C is >> suspended after PCI. This did not change. >=20 > Do you see a "completion done after timeout" messages in the KMSG log of > the v5.6 kernel? >=20 > Could you please try this hunk? Although, I'll be surprised if it > changes anything. Yes I can test. Cheers Jon --=20 nvpublic