Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp1309283pxb; Fri, 6 Nov 2020 06:33:34 -0800 (PST) X-Google-Smtp-Source: ABdhPJwAnIr+pwqUu3wccvRRZf0Upcf+jLFTaB6XD8GZrCG3qpMoM+xXswH053yDfrscQ+f8NMvl X-Received: by 2002:a17:906:892:: with SMTP id n18mr2284450eje.1.1604673214716; Fri, 06 Nov 2020 06:33:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1604673214; cv=none; d=google.com; s=arc-20160816; b=avWKQ7bauO4CWaxRId3jooV38o9KSxKURVXdegccssTNZjctndblehiNNh9Lv6TrfI zDxFy0iVEuRfqBiIm++2lOI0eoXQTm2IzBl13ayJRGdmqsoGBmdu9BjV8FqCKwec4kRu SjwZ5t5DJQgRP7OvajgX8aYzo8WMzj0bjX7eft193UkFyjyPoG2VdOAqNLPESRyuVJ9D ey0poK9YRzCpF4kp4a5nN8fS9NGifEmXa4gnukvsqH7G4i8gk3aaI1wuk5r0Z64EZvHc 0Aps3QhPrt3tgx1chbSUCW/12Q67XPoV3jEvXnXP9h+C1hNotvuTq0eDnkuE480iVFjS 6QLg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=6jO1JvdLqeiH3264lCYhj7Gy4bF9zHfZntEVAZAvsks=; b=k7AJkIC+osrwvK64TDJhj2LZE76/AetjMXC5Vbb/jYF6lwj7Ytby3ubnG1NZY/JGoI NIvT/P07LlXY1g6e2VqSrb3YvqV6Tg9CQN8SG/1For9l0oE4Ym6Gxym75fJrEkUTSvUd cR5NioiQjOc2JVnNTZgNTa48btbHWnzoo0ky5CfrFUR4AlG2beIiaKNnDMlMY+sTAY5y AiNY6IY3OFfE1lmU7HkK1wpVSxPH/EnXHf/ioJnqghuqSZEe4FSBgeGYpPqLDPKjJTT3 EQRx/7ZrOM/UAgHHNRCVIeFkXzEw6ap0heCd04aAjekHgRDxCAwcVv/VzZOTIWFA/1zv cLmQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b=lRfYqwlH; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d20si941688ejb.226.2020.11.06.06.33.09; Fri, 06 Nov 2020 06:33:34 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b=lRfYqwlH; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726812AbgKFObd (ORCPT + 99 others); Fri, 6 Nov 2020 09:31:33 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44248 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726565AbgKFObc (ORCPT ); Fri, 6 Nov 2020 09:31:32 -0500 Received: from mail-ej1-x643.google.com (mail-ej1-x643.google.com [IPv6:2a00:1450:4864:20::643]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 15418C0613D2 for ; Fri, 6 Nov 2020 06:31:32 -0800 (PST) Received: by mail-ej1-x643.google.com with SMTP id o21so2221831ejb.3 for ; Fri, 06 Nov 2020 06:31:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=6jO1JvdLqeiH3264lCYhj7Gy4bF9zHfZntEVAZAvsks=; b=lRfYqwlHmkiO4L+mrhKBCy1RCydVF0Kae5XfTywnCxqgNk+I/3qMeYsauHG0w5FBmR PdLJSqAmuwKnGakZbKzazDkGs1VlbE+/vqA6HTYIU2k+t1L+FGQI2xpCGRFG22V9K7ty 2EAtn08MMb4m5QALnbsoSzjHB+I749tCBb0g5c9myKCEaD1RhOh/s4D1Cyr0ji9susAU ngJMq1+Coj95GQkB/QOJ9SazWWSEEM6UwZhyO0M2NR+8BQvul9jGWGp2G4CEn8JEjWrx V8Vn9S0Vsw1B4aw61v8UbFRxXxxB+KxJYZVmEhNjIRWfULykQgGb40pa9SYL2ojantMJ UCfA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=6jO1JvdLqeiH3264lCYhj7Gy4bF9zHfZntEVAZAvsks=; b=HXn1C0a448uRKEWQc3FkkvKTw01ovKGS/MSfW7PhPPFeCdHN+gGk6XIsNxx/NXc7Jq 4bkZSvAXInRDJO8aqqj7Zq3LdmLfjdosD4ucntQFO/On+sOzt1eyo9a1+vXthrG1oYXx xsb7pMBifvz07mJom9Fb3CsaPA5x7Vn8L1xXUhcM1tmh4uCAHekqzyClcKGMFdAi9Is6 vYvx7zHCXyyeMThQbdXssoGgpC/yWMMCy6BENpmDBR+Wle7W/UkKtsM8FjWh891f7NOZ eBu+a6h6jNn8YfwI8yR4J54bUfGAKOqyYZlG/WtBgn7w4rLsufMiaGQlchMcREkRkwpu a3Zw== X-Gm-Message-State: AOAM533I47wGfZZsVCBgKJhF6bMk83qrb2t2r8FRbGQrvX2sBpBisvoU vtq0XGsvSUqihwBJ0Q4fDMD5a+3+3NDi5Sz+mnvzjQ== X-Received: by 2002:a17:906:1c83:: with SMTP id g3mr2246116ejh.168.1604673090686; Fri, 06 Nov 2020 06:31:30 -0800 (PST) MIME-Version: 1.0 References: <20201104132624.17168-1-digetx@gmail.com> In-Reply-To: <20201104132624.17168-1-digetx@gmail.com> From: Bartosz Golaszewski Date: Fri, 6 Nov 2020 15:31:20 +0100 Message-ID: Subject: Re: [PATCH v1 1/2] gpio: tegra: Add lockdep class To: Dmitry Osipenko Cc: Thierry Reding , Jonathan Hunter , Laxman Dewangan , Linus Walleij , Peter Geis , linux-tegra@vger.kernel.org, linux-gpio , LKML Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Nov 4, 2020 at 2:26 PM Dmitry Osipenko wrote: > > Add lockdep class in order to fix debug warnings that are coming from a > legit nested use of irq_set_irq_wake() by the Tegra GPIO driver. > > WARNING: possible recursive locking detected > ... > (irq_set_irq_wake) from (tegra_gpio_irq_set_wake) > (tegra_gpio_irq_set_wake) from (irq_set_irq_wake) > (irq_set_irq_wake) from (brcmf_sdiod_intr_register [brcmfmac]) > ... > > Tested-by: Peter Geis > Reported-by: Peter Geis > Signed-off-by: Dmitry Osipenko > --- > drivers/gpio/gpio-tegra.c | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/drivers/gpio/gpio-tegra.c b/drivers/gpio/gpio-tegra.c > index 86568154cdb3..98fc78739ebf 100644 > --- a/drivers/gpio/gpio-tegra.c > +++ b/drivers/gpio/gpio-tegra.c > @@ -560,6 +560,9 @@ static const struct dev_pm_ops tegra_gpio_pm_ops = { > SET_NOIRQ_SYSTEM_SLEEP_PM_OPS(tegra_gpio_suspend, tegra_gpio_resume) > }; > > +static struct lock_class_key gpio_lock_class; > +static struct lock_class_key gpio_request_class; > + > static int tegra_gpio_probe(struct platform_device *pdev) > { > struct tegra_gpio_info *tgi; > @@ -661,6 +664,7 @@ static int tegra_gpio_probe(struct platform_device *pdev) > bank = &tgi->bank_info[GPIO_BANK(gpio)]; > > irq_set_chip_data(irq, bank); > + irq_set_lockdep_class(irq, &gpio_lock_class, &gpio_request_class); > irq_set_chip_and_handler(irq, &tgi->ic, handle_simple_irq); > } > > -- > 2.27.0 > Patch applied, thanks! Bartosz