Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754911AbcCXPfo (ORCPT ); Thu, 24 Mar 2016 11:35:44 -0400 Received: from mx0a-001ae601.pphosted.com ([67.231.149.25]:42255 "EHLO mx0a-001ae601.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752911AbcCXPfa (ORCPT ); Thu, 24 Mar 2016 11:35:30 -0400 Authentication-Results: ppops.net; spf=none smtp.mail=ckeepax@opensource.wolfsonmicro.com Date: Thu, 24 Mar 2016 15:35:25 +0000 From: Charles Keepax To: Thomas Gleixner CC: Lee Jones , , Subject: Re: [PATCH RESEND] mfd: arizona: Fix lockdep recursion warning on set_irq_wake Message-ID: <20160324153525.GM1490@localhost.localdomain> References: <1457605009-7792-1-git-send-email-ckeepax@opensource.wolfsonmicro.com> <20160324123618.GB3496@x1> <20160324124438.GA8538@x1> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 suspectscore=0 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1601100000 definitions=main-1603240237 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1087 Lines: 27 On Thu, Mar 24, 2016 at 01:56:52PM +0100, Thomas Gleixner wrote: > 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. Apologies for missing that. Thanks guys I will have a look and respin the patch. Thanks, Charles