Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752466AbbFYP1A (ORCPT ); Thu, 25 Jun 2015 11:27:00 -0400 Received: from mezzanine.sirena.org.uk ([106.187.55.193]:55076 "EHLO mezzanine.sirena.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751902AbbFYP0x (ORCPT ); Thu, 25 Jun 2015 11:26:53 -0400 Date: Thu, 25 Jun 2015 15:49:48 +0100 From: Mark Brown To: Nicolas Boichat Cc: Mauro Carvalho Chehab , Antti Palosaari , Ingo Molnar , Arjan van de Ven , Lars-Peter Clausen , 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: <20150625144948.GO14071@sirena.org.uk> References: <1435224904-35517-1-git-send-email-drinkcat@chromium.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="6B7kCplWPsCd3Wyv" Content-Disposition: inline In-Reply-To: <1435224904-35517-1-git-send-email-drinkcat@chromium.org> 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: 2418 Lines: 53 --6B7kCplWPsCd3Wyv Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Thu, Jun 25, 2015 at 05:35:03PM +0800, Nicolas Boichat wrote: > I'm trying to revive Antti's patch [1], as we are hitting similar issue > with rt5677 driver. I only updated the commit message and documentation, > I kept both Signed-off-by and From lines, with a small note highlighting > my changes, let me know if that's not appropriate. This continues to have the same problems as the previous version of the patch where I can't really tell how users are supposed to figure out if they should use this or not. There will be cases where there is a clear use within the driver itself but as far as I can tell almost any driver might be bitten by this if some underlying driver on a given system happens to use a regmap so should be allocating a class. > One issue that was raised by Mark at the time is that a per-regmap_config > lock class might not be enough (Mark mentioned clocks as an example). The > current implementation should be good enough as long as the clock regmaps > do not access each other. If this is a problem, maybe we should consider > replacing lockdep_lock_class_key by a boolean use_own_lock_class that would > allocate/use a per regmap instance lock class, or have devm_regmap_init > take an extra parameter specifying the lock class. I think this is a problem and making this something that every regmap does by default was my original suggestion, there's also Arjan's suggestion of just using nested mutexes rather than classes. --6B7kCplWPsCd3Wyv Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBCAAGBQJVjBULAAoJECTWi3JdVIfQ13MH/3dSe3ZQF9GF8jH6+jT+2VuY j/1ZtPyBdrdf60emFcSbfTSwR8A+STvziNg83zsEGE7/v1/AKkdPSvFcUT9c2SXP 3QMirLtDexKWB/3ZNaFeKy+Xj/mh3ZfSg/W7UdsmHTQSOsQiUUo5C/DLv8xerR65 WMf8H2n9rGDXvEwR3j7cYbLcsIaG/FTG5Qah47f68/6v/1SUd+xZK+L8mAcQsio9 4wEBFnZle6+2L08eA9LKoKF9ZIiR+3cOeq9kU2ECU6QbcKzW5fD/Mlit15pUeSVr +UXJBwDxPCQm/x21I1wbkCl2fapMF8sS8FWRP7V9z8Yj6uHWjtp5iBKqDwsZ9pc= =yTqq -----END PGP SIGNATURE----- --6B7kCplWPsCd3Wyv-- -- 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/