Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp1297996pxb; Wed, 4 Nov 2020 05:29:24 -0800 (PST) X-Google-Smtp-Source: ABdhPJxhjrfciffpcz7E5V6ocMA1z1p6yuxVeJx8wTgenKFB9yRzQmicfm/vzDgaXs9WAskNUdXm X-Received: by 2002:a05:6402:1a33:: with SMTP id be19mr22377902edb.47.1604496564381; Wed, 04 Nov 2020 05:29:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1604496564; cv=none; d=google.com; s=arc-20160816; b=r12Is3YEtopdrAgryq+0m2zNhN0RJleGD9iSIuhf6kyUO4GrYXsiA3LQJAMgnnGmgK Hb6f0y50M9Asq5d/bwh4Hs2sjQvxohL3ix1jGjQFe2QLC2RpjnGLvzJZGZ2Iuy030fBe n4/TPZmtV5lIzazRfqGke8KPQpqGsbiwnSI16ZoAJC/w+W6UdFeO0rcPqg557pRpJbIy Gbq1oqc3od3S5I1Q7G3AQK4TfcOgZxvzwD1k0jb1lZUr+ZvNPIqIYKNPxDMt9BmcJc1z ilO/pn3wQFPis5c9aJVz3R6ol83vGoW080YMTuPZb5TM3q/4PsudDJdGOUlnauBaV+iQ 3C9w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=p/FZImScqZ2Ir9kpVpIAqsDk+Y2Vxk6wtqjcKHY6zIo=; b=hAKu9cRaqgbY3LiM2dG3rtJOgu8ba/0EOgaUcjufeR31XmkiNs0EIK074H/HO8k3EI ra9DeKPegE8Bl6nOyVLUIth7iQusVHzva3QnIobWt/SqBdQ0yJB8gQRpZPSrz9qmJAWZ mlAYxOJ7y5qw+fL4aHMBpoXK8OJaLusiCjgnh9VAjs+EHPf5W58nw5FVYTZO+nNyb9SZ 9i1I5/VT5HBYjwd7RRy/tr8z80RU5b/f1FqTp5iGhG/Pq2jPRI+yXxmDPqssICOjY2F/ DbB9EUlOZHQdkGGpmMwd9s0X2mWMyo61R57v5kWYmG0LUx6kd0L+Zvshmxt//E0SwNb8 zezw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=F9g0EG+8; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f18si1272430edw.32.2020.11.04.05.29.01; Wed, 04 Nov 2020 05:29:24 -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=@gmail.com header.s=20161025 header.b=F9g0EG+8; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729833AbgKDN0r (ORCPT + 99 others); Wed, 4 Nov 2020 08:26:47 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34874 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729089AbgKDN0r (ORCPT ); Wed, 4 Nov 2020 08:26:47 -0500 Received: from mail-lj1-x244.google.com (mail-lj1-x244.google.com [IPv6:2a00:1450:4864:20::244]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8E6FDC0613D3; Wed, 4 Nov 2020 05:26:46 -0800 (PST) Received: by mail-lj1-x244.google.com with SMTP id 11so3397398ljf.2; Wed, 04 Nov 2020 05:26:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=p/FZImScqZ2Ir9kpVpIAqsDk+Y2Vxk6wtqjcKHY6zIo=; b=F9g0EG+8zR2NYJrImIcDQGZbG7MXyErEFMGsBf/I9p3sHAWX5ZSv/Fg6H+Yr+Ad8tC WFB3lYP06K16ybBL0BIyB7jcu+XnNfA5EMpeqEAynhIQM74e9xTxJRiqTdwiyKpXhnSb lqIGVvPNkmsQ8AbCGZIEdcMxIXK5quvXMlAJHCnOwvDD99n/dp78kxwjZ6NfxgY3r4f6 jCnjHzv4UK89GuEwlfS8YQG0MOrDZG6ekZjjD92jxlOIWiM1u3dCLd2k9r9ZhoGIPXiy +I62eXd4cW7FuymezvaaIYy0tyTZ3XUOKmgCA4NWCo/YMzAtCtUD8VFLinlw82QdalRe oRsw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=p/FZImScqZ2Ir9kpVpIAqsDk+Y2Vxk6wtqjcKHY6zIo=; b=WkAzOC8m+8uAz4AHFWIReDK0ruVfGH/q21o80wFwpYY4rZg3zLRWKvwcZXottCmdqw 5fHbiIbu2A1URDcW1OyuVmvx84PxVZnUnfXMbzc+bla1w3nkh2ghkSEereRc6+a+R90r lu1Sg0VkeCh5zZh5iARuoBext6KFxcudei1JHkwXZ3DYAyOovsyc4E93hLQ6zXEUd8d6 hsu0Qz1lxTQ00ZcBECaZ6zptn8ltmkpewnqiuPuXq4U+7uRDoX6he8A9sXarRXvmTHF+ 8nt7r/QUtkKMzoajvGWIUZAQrtYQ3DtD4GSpMegzdrrMmvIPCWRIqbK8IXWJhQCIJCRg U5TQ== X-Gm-Message-State: AOAM532iRrRDR0BC6r4HDsVSRL4HR1hBEW3Yl/FUN8SO0OgnoDfncQcE /yTlpbcuCtV7H68tG/aBLZ4= X-Received: by 2002:a2e:5742:: with SMTP id r2mr923779ljd.161.1604496405114; Wed, 04 Nov 2020 05:26:45 -0800 (PST) Received: from localhost.localdomain (109-252-192-83.dynamic.spd-mgts.ru. [109.252.192.83]) by smtp.gmail.com with ESMTPSA id 82sm409715lfb.12.2020.11.04.05.26.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 04 Nov 2020 05:26:44 -0800 (PST) From: Dmitry Osipenko To: Thierry Reding , Jonathan Hunter , Laxman Dewangan , Bartosz Golaszewski , Linus Walleij , Peter Geis Cc: linux-tegra@vger.kernel.org, linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v1 1/2] gpio: tegra: Add lockdep class Date: Wed, 4 Nov 2020 16:26:23 +0300 Message-Id: <20201104132624.17168-1-digetx@gmail.com> X-Mailer: git-send-email 2.27.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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