Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752689AbbF2Ofa (ORCPT ); Mon, 29 Jun 2015 10:35:30 -0400 Received: from mga11.intel.com ([192.55.52.93]:26052 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751100AbbF2OfW (ORCPT ); Mon, 29 Jun 2015 10:35:22 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.13,699,1427785200"; d="scan'208";a="515972881" Message-ID: <559157A8.2050206@linux.intel.com> Date: Mon, 29 Jun 2015 07:35:20 -0700 From: Arjan van de Ven User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: Mark Brown , Nicolas Boichat CC: Lars-Peter Clausen , 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 Subject: Re: [RFC PATCH 1/2] regmap: add configurable lock class key for lockdep References: <1435224904-35517-1-git-send-email-drinkcat@chromium.org> <558C0067.2000401@linux.intel.com> <558C1824.8020204@metafoo.de> <20150625153325.GR14071@sirena.org.uk> <558C229D.4090409@metafoo.de> <20150625160817.GT14071@sirena.org.uk> <5591414D.6080802@metafoo.de> <20150629142215.GE11162@sirena.org.uk> In-Reply-To: <20150629142215.GE11162@sirena.org.uk> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1106 Lines: 27 On 6/29/2015 7:22 AM, Mark Brown wrote: > On Mon, Jun 29, 2015 at 10:03:09PM +0800, Nicolas Boichat wrote: > >> regmap instances are kalloc'ed, so they cannot contain the >> lock_class_key, which needs to be statically allocated (in .data). >> Another option would be to preallocate a bunch of lock_class_key in >> regmap.c, and pick from that, but that's terribly hacky... > > Honestly this is all starting to sound like we're having to jump through > too many hoops for lockep (and other APIs are too from the sounds of it) > so we should be looking at lockdep here. lockdep assumes that there is a known lock hierarchy, at least known to the developer. seems like for regmap there isn't (I would be interested to know how you avoid ABBA deadlocks btw, can you have 2 devices, one with a hierarchy one way, and another with the hierarchy the other way?) -- 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/