Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752848AbbFYPdw (ORCPT ); Thu, 25 Jun 2015 11:33:52 -0400 Received: from mezzanine.sirena.org.uk ([106.187.55.193]:55095 "EHLO mezzanine.sirena.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752231AbbFYPdj (ORCPT ); Thu, 25 Jun 2015 11:33:39 -0400 Date: Thu, 25 Jun 2015 16:33:25 +0100 From: Mark Brown To: Lars-Peter Clausen Cc: Arjan van de Ven , Nicolas Boichat , Mauro Carvalho Chehab , Antti Palosaari , Ingo Molnar , Greg Kroah-Hartman , linux-kernel@vger.kernel.org, Bard Liao , Oder Chiou , Liam Girdwood , Jaroslav Kysela , Takashi Iwai , alsa-devel@alsa-project.org, Anatol Pomozov Message-ID: <20150625153325.GR14071@sirena.org.uk> References: <1435224904-35517-1-git-send-email-drinkcat@chromium.org> <558C0067.2000401@linux.intel.com> <558C1824.8020204@metafoo.de> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="KMy4IPbjBvHJdHUq" Content-Disposition: inline In-Reply-To: <558C1824.8020204@metafoo.de> X-Cookie: The end of labor is to gain leisure. User-Agent: Mutt/1.5.23 (2014-03-12) X-SA-Exim-Connect-IP: 94.175.94.161 X-SA-Exim-Mail-From: broonie@sirena.org.uk Subject: Re: [RFC PATCH 1/2] regmap: add configurable lock class key for lockdep X-SA-Exim-Version: 4.2.1 (built Mon, 26 Dec 2011 16:24:06 +0000) X-SA-Exim-Scanned: Yes (on mezzanine.sirena.org.uk) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1864 Lines: 47 --KMy4IPbjBvHJdHUq Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Thu, Jun 25, 2015 at 05:03:00PM +0200, Lars-Peter Clausen wrote: > On 06/25/2015 03:21 PM, Arjan van de Ven wrote: > >wouldn't it be better to use the mutex_lock_nested() and co to explicitly > >express your hierarchy? > That would require that the hierarchy is known in advance. The hierarchy > depends on the hardware topology. Different systems will have different > hierarchies where the relationship between locks can change and it will be > hard to find a hierarchy that works across all topologies. It depends on what you use as the key for the nested locking stuff. If you assign a key per regmap (casting the pointer to an integer, using an IDR or something). I don't know if that creates problems for the locking code, I'd not expect so but then I'd not have expected the problem in the first place. As far as I can tell we're likely to end up needing a key per regmap or something similar. --KMy4IPbjBvHJdHUq Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBCAAGBQJVjB9EAAoJECTWi3JdVIfQxt8H+QFdAj/+TyH/1KlE9WkHGYEK s83rDdR0R4n53CsKHMHixuF+9iDD3plUqy2Vq7PnRkxYh8T/WY7z28Zo4Ch74W7n DGRpDue1Ggr8k5TwjuE7g1bblBlTEDXhnhKsCns+cwsA/0JE4MiapF4FAPKzpQvp IM4dlyNcEPnSXkexN6yLBcRVYf0RaaULnsxdC5SXNuVx6R7hp+1nBI6TglvDdd+m seKrAAk69s3uIb+k34EJL0NCsC7hXC5e0fE35qShRCXOANRd6POo4RN9Kg2KkDVX w5n9yfwGAc1D+vRlCIw1Ec+ydyINW8/P7pd8vhBD3AdpgS4uPA6tKg0jJMDrRPM= =Ep0B -----END PGP SIGNATURE----- --KMy4IPbjBvHJdHUq-- -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/