From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 04C30C00140 for ; Tue, 26 Jul 2022 14:46:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=QL1yFHx4xWqJF/Rui2/0LTPUy5TVOhtr02ZPEfWodSU=; b=brQTSVkhcTRCl6 odnStYobx0o4VGwGRc7ydtqdHEwLdvFeVTidjBA6j7rHKXqGzrFZAGUSMzCKTeDjSXITBrN9SE2Xo NO7mFHbd4wUKN8V6mnzwJoGk4WvL9ATGCl3S1yOIYE3DT6w0hqIZT558S06RJ89aQXp5nE6thBgV1 S0dgOlgEkakF5sSEHESa5GguMFH+qZi0xEG0EU3KkV5Ubza7EOx56A4RJA+kS6DjcbxPsCLlkhws1 5kHnH9ZrQy0dHJ8yZbjX2rtPnHzdJhBGZq6i/X6oU/MlXMGniW8LltzS5e+7P9B8R9s2T4KPhrijY 1jVZttAM9qLjJaTCbP1g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oGLnv-000JmS-IA; Tue, 26 Jul 2022 14:44:59 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oGLnr-000Jkh-VH for linux-arm-kernel@lists.infradead.org; Tue, 26 Jul 2022 14:44:57 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id A83551FB; Tue, 26 Jul 2022 07:44:54 -0700 (PDT) Received: from FVFF77S0Q05N (unknown [10.57.87.135]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 32CA43F70D; Tue, 26 Jul 2022 07:44:53 -0700 (PDT) Date: Tue, 26 Jul 2022 15:44:31 +0100 From: Mark Rutland To: Sudeep Holla Cc: linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Peter Zijlstra Subject: Re: [-next] Lockdep warnings Message-ID: References: <20220726104134.3b3awfphvafljdgp@bogus> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20220726104134.3b3awfphvafljdgp@bogus> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220726_074456_092099_4BE2DFDF X-CRM114-Status: GOOD ( 16.21 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Tue, Jul 26, 2022 at 11:41:34AM +0100, Sudeep Holla wrote: > I was seeing the below lockdep warnings on my arm64 Juno development > platform almost 2 weeks back with -next. I wanted to check for similar > reports before post and forgot. [...] > However I don't see the above warning with the latest -next. When I tried > yesterday's -next now, I see a different warning. Not sure if they are > related. I haven't tried to bisect. > > --->8 > ============================= > [ BUG: Invalid wait context ] > 5.19.0-rc8-next-20220725 #38 Not tainted > ----------------------------- > swapper/0/0 is trying to lock: > (&drvdata->spinlock){....}-{3:3}, at: cti_cpu_pm_notify+0x54/0x114 Hmmm... do you have CONFIG_PROVE_RAW_LOCK_NESTING enabled? IIUC that should be {2:2} otherwise... > other info that might help us debug this: > context-{5:5} > 1 lock held by swapper/0/0: > #0: (cpu_pm_notifier.lock){....}-{2:2}, at: cpu_pm_enter+0x2c/0x80 ... and this is telling us that we're trying to take a regular spinlock under a raw spinlock, which is not as intended. The Kconfig text notes: NOTE: There are known nesting problems. So if you enable this option expect lockdep splats until these problems have been fully addressed which is work in progress. This config switch allows to identify and analyze these problems. It will be removed and the check permanently enabled once the main issues have been fixed. ... and I suspect this is one of those latent issues. Mark. > stack backtrace: > CPU: 0 PID: 0 Comm: swapper/0 Not tainted 5.19.0-rc8-next-20220725-00004-g599e6691ed8c #38 > Call trace: > dump_backtrace+0xe8/0x108 > show_stack+0x18/0x4c > dump_stack_lvl+0x90/0xc8 > dump_stack+0x18/0x54 > __lock_acquire+0xa70/0x32d0 > lock_acquire+0x160/0x308 > _raw_spin_lock+0x60/0xa0 > cti_cpu_pm_notify+0x54/0x114 > raw_notifier_call_chain_robust+0x50/0xd4 > cpu_pm_enter+0x48/0x80 > psci_enter_idle_state+0x34/0x74 > cpuidle_enter_state+0x120/0x2a8 > cpuidle_enter+0x38/0x50 > do_idle+0x1e8/0x2b8 > cpu_startup_entry+0x24/0x28 > kernel_init+0x0/0x1a0 > start_kernel+0x0/0x470 > start_kernel+0x34c/0x470 > __primary_switched+0xbc/0xc4 > > ---- > > -- > Regards, > Sudeep _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel