Received: by 2002:ac0:e34a:0:0:0:0:0 with SMTP id g10csp741905imn; Tue, 26 Jul 2022 08:07:59 -0700 (PDT) X-Google-Smtp-Source: AGRyM1tWyc4jmI/Ss2o2sxh5i5x6+Rgou00OQ9H1s6UWdJMkUQNzHUkpDFLDXzdH8CXfV7jkGskc X-Received: by 2002:a17:907:97c3:b0:72f:4a1d:a7b2 with SMTP id js3-20020a17090797c300b0072f4a1da7b2mr14904853ejc.260.1658848079271; Tue, 26 Jul 2022 08:07:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658848079; cv=none; d=google.com; s=arc-20160816; b=PtLdSzZ1T2F0oPHhq+96w5s6t37aGlqau7i97sytWU9eA4BzuWv/0P/mHSsrDvhP4t SFdmVFKBg6LPdwVIBSEHKxH/7+koo3rAt9JjVO/O8M6j2VT4cY2enb8jU+gDAmsOnF9M dF31EW9uxuETzuJGJ6meL/yp2+Q0QDq3hGJQJrcALhEnpTApkuPvWWrakQUBr6YNJg9Y LWvXTcL+Inazp4Yoyi+KrWhpTKlCsc3d0HWim3k1fBZt6OtKyx6Zg5dY8jNt+swiIARd uLMmE15aOUwcih5g4l13TYiwR9QhOjUCtr6IWYkeWpnHH79vnpZJWtBH7nQENy+pJU8d 2uQA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=COm2LQOs8lBdLUczoYa8Ln8mNeqYO4io+UFkQfM2YqA=; b=SYKavzpV2Z/VUtxix/oeMOocyhNC+sJG84dQ8wzcNGIWS9+3LRMuSJ0JfjRkKOZ340 j5mbcnNmwI7bMbGXAgSNabKB9h9JxJ+rURW+hGTFhuAm2s5o6EGJ7Q66RJLS33QPEqvn Kktb6/u0ApegBgwpT5Khzo7Wcu+iHgVu+Wi+aM38MxwDwSIx2UAlu7e0a3gtZKnzFIvu e78Ky7FHo7G3XGFGmKWSn0UKBY3ld+7ckjTfL6GDyiQQFo64TSZGmLwGmMwgGw8I7nR+ vkBEcuKWOKOQ/ZuHtqi6Gy8i7a6YcQYG20kne7b81Q637kRLZQYdeZ7honQQYjKePyTk rrvA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id cs21-20020a170906dc9500b00726b8cf8debsi3006194ejc.869.2022.07.26.08.07.34; Tue, 26 Jul 2022 08:07:59 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239312AbiGZOyh (ORCPT + 99 others); Tue, 26 Jul 2022 10:54:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58400 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229738AbiGZOyg (ORCPT ); Tue, 26 Jul 2022 10:54:36 -0400 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 35451183A5; Tue, 26 Jul 2022 07:54:34 -0700 (PDT) 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 4F9241FB; Tue, 26 Jul 2022 07:54:34 -0700 (PDT) Received: from bogus (e103737-lin.cambridge.arm.com [10.1.197.49]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id CCBB33F73B; Tue, 26 Jul 2022 07:54:32 -0700 (PDT) Date: Tue, 26 Jul 2022 15:54:30 +0100 From: Sudeep Holla To: Mark Rutland Cc: linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Sudeep Holla , Peter Zijlstra Subject: Re: [-next] Lockdep warnings Message-ID: <20220726145430.bfwidmw6xmeppbfb@bogus> References: <20220726104134.3b3awfphvafljdgp@bogus> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jul 26, 2022 at 03:44:31PM +0100, Mark Rutland wrote: > 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? > Yes. > 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. > Ah, I hadn't seen or read this. Thanks for digging this and sharing. Sorry for the noise. Good I got to know this limitation, will try to remember this. Thanks again for your time Mark. -- Regards, Sudeep