From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1761862AbcISIOZ (ORCPT ); Mon, 19 Sep 2016 04:14:25 -0400 Received: from bombadil.infradead.org ([198.137.202.9]:55513 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751914AbcISIOV (ORCPT ); Mon, 19 Sep 2016 04:14:21 -0400 Date: Mon, 19 Sep 2016 10:14:13 +0200 From: Peter Zijlstra To: Peter Rosin Cc: Bartosz Golaszewski , Wolfram Sang , Linus Walleij , Alexandre Courbot , Andy Shevchenko , Vignesh R , Yong Li , Geert Uytterhoeven , Ingo Molnar , linux-i2c , linux-gpio , LKML Subject: Re: [PATCH v2 0/4] gpio: fix an incorrect lockdep warning Message-ID: <20160919081413.GR5016@twins.programming.kicks-ass.net> References: <1474041765-17818-1-git-send-email-bgolaszewski@baylibre.com> <20160916172621.GA1426@katana> <20160916175842.GD1426@katana> <587cdb60-d7fe-3ab2-b635-02c5072e102e@axentia.se> <2f7d572c-59e0-f584-9748-48a1a45a1a50@axentia.se> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <2f7d572c-59e0-f584-9748-48a1a45a1a50@axentia.se> User-Agent: Mutt/1.5.23.1 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Sep 19, 2016 at 10:01:49AM +0200, Peter Rosin wrote: > Or, do what the i2c-mux code is doing and use an rt_mutex instead > of an ordinary mutex. That way you are very sure to not get any > lockdep splat ... at all. Ok, sorry, that was not a serious > suggestion, but it would be a tad bit simpler to implement... So I find it weird that people use rt_mutex as a locking primitive, since its only that one lock that then does PI and all the other locks that are related still create inversions. In any case, since people have started doing this, adding lockdep support for rt_mutex is on the todo _somewhere_, so don't expect that to avoid splats forever.