Received: by 10.223.185.116 with SMTP id b49csp4016927wrg; Tue, 6 Mar 2018 08:32:01 -0800 (PST) X-Google-Smtp-Source: AG47ELvw+YBrgEwifKNAlfwN6G746+hBrUUAQ16O3Ysa7KbfHcX1qw5jhFQPJWBNUw919N0kaftf X-Received: by 10.101.82.195 with SMTP id z3mr15793996pgp.308.1520353921312; Tue, 06 Mar 2018 08:32:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520353921; cv=none; d=google.com; s=arc-20160816; b=zNwavmN5LHyvk2H+RMz1IP/nUm+FLa1lZQgyGZeAMN/Chmxtkm6OUV31mCd5/qJiEu aGbs9KfYc5Ion4LTVrQ1FwdMj/4YXWAApkkan4w6H5MYa5Q580B2fzWbhScPSavsEHWJ NG8LMgdNq5O76mfbdN0U9FrHMGRMP7VljxIJcoI7pfEUf79sPfsRFd8Neem7i3MirVrd MincqUssWF+pi4sZl+eKY9rDps3YRxZ93S26fmz0Q2LanO6K4WT/15IsoYCZa1ASeUJu fLvhnl+2JfDWI55cCCYcRnw9AfX/BxwcAO5boU5XkyZgGRiAN01GS9LfBVANBETk54S7 awRg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=SSoEvgFx/9J1ocRfEYG56i976MRy3u50A91drCkwo8U=; b=gIN8W0uFlUs1vWWQbL7QTieDRaAYc3cmQC8GKFXVMu2nRZYsgLN1h9ZKUfpOseo5H6 nmXalYp2sem04BwSQKiNdf4epn8Ipe/EvASFJl4UfoaY8nxnESNuB4CZsYDt3CN0dfug tK6tmPnF3kMVlxk+/q48FzWAcuVCL9T0E/lJ8u5jJt1YR0sXVFlAJHrnnokAIh+vm/Bc ZokMHET4reE7fV6Hq6+Hqr1UznSkwGkPm0ihBxFYUmzvCsAAEewsGmItnea4NMmxDxv/ gE3kuU3SZC7SgnifVLHxkfctrsWQXujCv1z+OPTcoy8ndiQaHh54B81tgZmWJ37jrHbg uD0A== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@sirena.org.uk header.s=20170815-heliosphere header.b=IMijV7PB; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m13si10032487pgd.641.2018.03.06.08.31.43; Tue, 06 Mar 2018 08:32:01 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@sirena.org.uk header.s=20170815-heliosphere header.b=IMijV7PB; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753525AbeCFQan (ORCPT + 99 others); Tue, 6 Mar 2018 11:30:43 -0500 Received: from heliosphere.sirena.org.uk ([172.104.155.198]:34178 "EHLO heliosphere.sirena.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750817AbeCFQal (ORCPT ); Tue, 6 Mar 2018 11:30:41 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sirena.org.uk; s=20170815-heliosphere; h=In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=SSoEvgFx/9J1ocRfEYG56i976MRy3u50A91drCkwo8U=; b=IMijV7PB05xFVEWVWTJzDzUA+ qNgWl3VwfiQp27BFB1W/dUDGh7T1ieiNy7PK47ZBu0lPXgXCpvkOTfrIZ0wM7w+7p9fkPxTffjNU1 yP45HyFaBzbgefWzrWA8VDyGmuKZdFv6Cd1KM1wKKzb0DPlxhbRY6gMGUO9ojrrcSqm2k=; Received: from debutante.sirena.org.uk ([2001:470:1f1d:6b5::3] helo=debutante) by heliosphere.sirena.org.uk with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1etFU4-0007KG-1S; Tue, 06 Mar 2018 16:30:36 +0000 Received: from broonie by debutante with local (Exim 4.90_1) (envelope-from ) id 1etFU3-00011O-Ck; Tue, 06 Mar 2018 16:30:35 +0000 Date: Tue, 6 Mar 2018 16:30:35 +0000 From: Mark Brown To: Fabio Estevam Cc: Tony Lindgren , Maciej Purski , linux-omap@vger.kernel.org, linux-kernel , "moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE" Subject: Re: Regulator regression in next-20180305 Message-ID: <20180306163035.GE13586@sirena.org.uk> References: <20180305231246.GB5799@atomide.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="Yb+qhiCg54lqZFXW" Content-Disposition: inline In-Reply-To: X-Cookie: DYSLEXICS OF THE WORLD, UNTIE! User-Agent: Mutt/1.9.3 (2018-01-21) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --Yb+qhiCg54lqZFXW Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Mar 05, 2018 at 08:22:26PM -0300, Fabio Estevam wrote: > On Mon, Mar 5, 2018 at 8:12 PM, Tony Lindgren wrote: > > Looks like with next-20180305 there's a regulator regression > > where mmc0 won't show any cards or produces errors: > > mmcblk0: error -110 requesting status > > mmc1: new high speed SDIO card at address 0001 > > mmcblk0: error -110 requesting status > > mmcblk0: recovery failed! > > print_req_error: I/O error, dev mmcblk0, sector 0 > > Buffer I/O error on dev mmcblk0, logical block 0, async page read > > mmcblk0: error -110 requesting status > > mmcblk0: recovery failed! No other error messages? That seems like there's something going on that's very different to what Fabio was reporting... I'm guessing some voltage application didn't go through but it's hard to tell with so little data. dra7 does seem to have what Fabio had though so there's definitely some effect on the OMAP platforms. > I have also seen regulator issues due to this series: > https://lkml.org/lkml/2018/3/5/731 Looking at your stuff I'm having trouble figuring out what's going on - we're getting double locking of a parent regulator during enable according to your backtraces but it's not clear to me what took that lock already. regulator_enable() walks the supplies before it takes the lock on the regulator it's immediately being called on, not holding any locks on supplies while enabling. regulator_balance_voltage() then tries to lock the supplies again but lockdep says the lock is already held by regulator_enable(). It's also weird that this doesn't seem to be showing up on other boards in kernelci, the regulator setup on those i.MX boards looks to be quite simple so I'd expect a much wider impact. I'm wondering if your case is more pain from mutex_lock_nested(), both regulator_lock_coupled() and regulator_lock_supply() will end up using=20 indexes starting at 0 for the locking classes. That doesn't smell right though, but in case my straw clutching works: If we can't figure it out I'll just drop the series but I'd prefer to at least understand what's going on. diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c index e685f8b94acf..2c5b20a97f51 100644 --- a/drivers/regulator/core.c +++ b/drivers/regulator/core.c @@ -159,7 +159,7 @@ static void regulator_lock_supply(struct regulator_dev = *rdev) { int i; =20 - for (i =3D 0; rdev; rdev =3D rdev_get_supply(rdev), i++) + for (i =3D 1000; rdev; rdev =3D rdev_get_supply(rdev), i++) mutex_lock_nested(&rdev->mutex, i); } =20 --Yb+qhiCg54lqZFXW Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAlqewioACgkQJNaLcl1U h9Bx+wf/S3swz2uKSJ5y19NvOIHzMsSOtAoS4mvk/oMR9d1GyKZV1PFbkndwr3vP 4p96oKTEzKDQi0+rDCM1Rohf6rWrFzVL4uSUEqhIUNmJuBrUp5qlgPpaXYRDN1bP UXNQoji+imP+OTD+A98SJQfgfALSh4qaPsK/8S+fis5hK7NMlYZfiDDQAyrns4RV BiSgPoHiLNWIFxMCIF4Ecx+CtcaEBOUJYmUlbc22c7qDkrvGgycFQ2RhprUnWCJH fjCG4/8YDYAdiVxsNeOeyVK/6BmUTvETjCW3c1UZS5oNTsDt871Lng5QHhtVfr2A d1CPG/WcdEFgPH3ztRV2kMisAApWLA== =fsPY -----END PGP SIGNATURE----- --Yb+qhiCg54lqZFXW--