From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757613AbcCXM6b (ORCPT ); Thu, 24 Mar 2016 08:58:31 -0400 Received: from www.linutronix.de ([62.245.132.108]:33996 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752124AbcCXM6X (ORCPT ); Thu, 24 Mar 2016 08:58:23 -0400 Date: Thu, 24 Mar 2016 13:56:52 +0100 (CET) From: Thomas Gleixner To: Lee Jones cc: Charles Keepax , linux-kernel@vger.kernel.org, patches@opensource.wolfsonmicro.com Subject: Re: [PATCH RESEND] mfd: arizona: Fix lockdep recursion warning on set_irq_wake In-Reply-To: <20160324124438.GA8538@x1> Message-ID: References: <1457605009-7792-1-git-send-email-ckeepax@opensource.wolfsonmicro.com> <20160324123618.GB3496@x1> <20160324124438.GA8538@x1> User-Agent: Alpine 2.11 (DEB 23 2013-08-11) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Linutronix-Spam-Score: -1.0 X-Linutronix-Spam-Level: - X-Linutronix-Spam-Status: No , -1.0 points, 5.0 required, ALL_TRUSTED=-1,SHORTCIRCUIT=-0.0001 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 24 Mar 2016, Lee Jones wrote: > FAO Thomas > > > Lockdep explicitly sets all the irq_desc locks as a single lock-class, > > which causes a "possible recursive locking detected" warning when we > > attempt to propagate the IRQ wake to our parent IRQ in > > arizona_irq_set_wake. Although this appears to be a false positive > > because an IRQ is unlikely to be its own parent, this was clearly > > intentionally prohibited. > > > > To avoid this lockdep warning, take a cue from the regmap-irq system, > > and add bus lock callbacks on the IRQ chip and propagate the wake in > > the bus unlock which will happen after the desc lock has been released > > and thus avoid the issue. > > This looks like a hack to me. I'd like Thomas (Cc'ed) to look it over. irq_set_lockdep_class() exists for a reason. See kernel/irq/generic-chip.c or drivers/gpio/gpiolib.c for examples.