Received: by 2002:a05:6358:e9c4:b0:b2:91dc:71ab with SMTP id hc4csp4223780rwb; Sun, 7 Aug 2022 18:33:34 -0700 (PDT) X-Google-Smtp-Source: AA6agR6KNZuO4l0xh4jGcbvU9NNWFdLCPNKYXKqSWViBE/Lrhq+do5ve/NUFEX9II8UAOfIzvI0w X-Received: by 2002:a17:907:75d5:b0:730:b051:d93f with SMTP id jl21-20020a17090775d500b00730b051d93fmr11950637ejc.568.1659922414019; Sun, 07 Aug 2022 18:33:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1659922414; cv=none; d=google.com; s=arc-20160816; b=cPkYn+ZaSAoCu0gBmdTb4QWokaI0y44/vjswn6tbO8fgBbnndPTsGlCbp0Te0hR63s 4vS3jEg3WBy1Y/evYExDTVY51eCgGaJoonWKP+tSP3fKuywmDUUD/6eW46IO821SzJgZ oLdqkgG5OOnmcOqHjzLAmaq/V+e5FdpXLtsDd68dgyfaYQvnpC3pSjAONP0FeFae3Wlf N0XDydDtu6kBJ4Nx21hOPYzqB6ibdiS3RPB+JCHvity+VFc2tDlXqptxodZ/fPSaXeWJ yiDMzEHCYt+XkOQrShTOgJm8Yd0x3zvQUL3hOHrS2E8k2qMaVaYo+iXUXS++Tgtl91Ny TAtA== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=CwWYYDYujhxABz4P1Y2P6bbAdv6fE4tJz3P53Ifq3nI=; b=LWD0Yuqrcp8JPE7hcTK4SV/wSATNrzVIy9qz4KnsCLzw3mxEzodNlEjdqzRaiO79+5 N9bSaPpFxkN08OFJNYWJsGfCnjAlJOgz5I0MvccVjefv9Duvr0pWoxaFpMPsA/ALhkWJ dksLg4640UnQ0le4EMVJgdK1jU3FOYYJpdVv3dGhJnGtQVYiiXwtx0v3n47vZSiVZR2s 1y0SigVBxyiVQqLMctxlSKXNWDV/YSi5aHW0PN5yh8A7lFImH3tKZYge4VTi6DeWNwlg 9eJez714+BIw5TAv3qHt7BX7lvtx3DQqnSOlsChoyGGcJga7hazQg+fNqr1tE9oDDY5d W98w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=gH1p6fM9; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 14-20020a508e0e000000b0043e8539199bsi5344110edw.489.2022.08.07.18.33.08; Sun, 07 Aug 2022 18:33:34 -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; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=gH1p6fM9; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241858AbiHHBbg (ORCPT + 99 others); Sun, 7 Aug 2022 21:31:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57072 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229775AbiHHBba (ORCPT ); Sun, 7 Aug 2022 21:31:30 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 20DB15FC8; Sun, 7 Aug 2022 18:31:29 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 9477D60DDB; Mon, 8 Aug 2022 01:31:28 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 60D6EC433D6; Mon, 8 Aug 2022 01:31:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1659922288; bh=ZYta0xWaaaX3NVY+blxrrshyWYllF3ppbUR9PCuCCpc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=gH1p6fM9zuBlHXAcjzTGKQIX95z8lk3mDrgx+unCcY8skdBNipMHbxLNya3J48Z+n 64fcUIL44XGYcOO9/YoLu3fqblt9tQcI5wVGXbvkBgzAe1VbR/vauqEi3TfRcUObRf cS9M9hqrnwSNDWwuWFiQ5ankNqPXUPC0MNM0j28v4ouevSARV2GVOadfaoa0P3qXWq /zxiwJakn39CNlUa3lBGWC0/ONN6oulLHXmIsSzSOR11UQ5aOSYTR0WfsxtZOfcduw /8X9iAbAMUFhFU4ZlX5kQYbTC2K0o1Z/u/HrSYNJH6WWLd1uwt/iiiRieajRKuodQ9 Gc43+NomOWwLQ== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Mark Rutland , Catalin Marinas , Ingo Molnar , Peter Zijlstra , Thomas Gleixner , Will Deacon , Sasha Levin , mingo@redhat.com, bp@alien8.de, dave.hansen@linux.intel.com, x86@kernel.org, keescook@chromium.org, nathan@kernel.org, paulmck@kernel.org, frederic@kernel.org, jpoimboe@kernel.org, ebiederm@xmission.com, mhiramat@kernel.org, elver@google.com, linux@roeck-us.net, ashimida@linux.alibaba.com, song@kernel.org Subject: [PATCH AUTOSEL 5.19 02/58] arch: make TRACE_IRQFLAGS_NMI_SUPPORT generic Date: Sun, 7 Aug 2022 21:30:20 -0400 Message-Id: <20220808013118.313965-2-sashal@kernel.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220808013118.313965-1-sashal@kernel.org> References: <20220808013118.313965-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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 From: Mark Rutland [ Upstream commit 4510bffb4d0246cdcc1f14c7367c026b807a862d ] On most architectures, IRQ flag tracing is disabled in NMI context, and architectures need to define and select TRACE_IRQFLAGS_NMI_SUPPORT in order to enable this. Commit: 859d069ee1ddd878 ("lockdep: Prepare for NMI IRQ state tracking") Permitted IRQ flag tracing in NMI context, allowing lockdep to work in NMI context where an architecture had suitable entry logic. At the time, most architectures did not have such suitable entry logic, and this broke lockdep on such architectures. Thus, this was partially disabled in commit: ed00495333ccc80f ("locking/lockdep: Fix TRACE_IRQFLAGS vs. NMIs") ... with architectures needing to select TRACE_IRQFLAGS_NMI_SUPPORT to enable IRQ flag tracing in NMI context. Currently TRACE_IRQFLAGS_NMI_SUPPORT is defined under arch/x86/Kconfig.debug. Move it to arch/Kconfig so architectures can select it without having to provide their own definition. Since the regular TRACE_IRQFLAGS_SUPPORT is selected by arch/x86/Kconfig, the select of TRACE_IRQFLAGS_NMI_SUPPORT is moved there too. There should be no functional change as a result of this patch. Signed-off-by: Mark Rutland Cc: Catalin Marinas Cc: Ingo Molnar Cc: Peter Zijlstra (Intel) Cc: Thomas Gleixner Cc: Will Deacon Link: https://lore.kernel.org/r/20220511131733.4074499-2-mark.rutland@arm.com Signed-off-by: Will Deacon Signed-off-by: Sasha Levin --- arch/Kconfig | 3 +++ arch/x86/Kconfig | 1 + arch/x86/Kconfig.debug | 3 --- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/arch/Kconfig b/arch/Kconfig index 71b9272acb28..5ea3e3838c21 100644 --- a/arch/Kconfig +++ b/arch/Kconfig @@ -223,6 +223,9 @@ config HAVE_FUNCTION_DESCRIPTORS config TRACE_IRQFLAGS_SUPPORT bool +config TRACE_IRQFLAGS_NMI_SUPPORT + bool + # # An arch should select this if it provides all these things: # diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig index 52a7f91527fe..25e2b8b75e40 100644 --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig @@ -278,6 +278,7 @@ config X86 select SYSCTL_EXCEPTION_TRACE select THREAD_INFO_IN_TASK select TRACE_IRQFLAGS_SUPPORT + select TRACE_IRQFLAGS_NMI_SUPPORT select USER_STACKTRACE_SUPPORT select VIRT_TO_BUS select HAVE_ARCH_KCSAN if X86_64 diff --git a/arch/x86/Kconfig.debug b/arch/x86/Kconfig.debug index 340399f69954..bdfe08f1a930 100644 --- a/arch/x86/Kconfig.debug +++ b/arch/x86/Kconfig.debug @@ -1,8 +1,5 @@ # SPDX-License-Identifier: GPL-2.0 -config TRACE_IRQFLAGS_NMI_SUPPORT - def_bool y - config EARLY_PRINTK_USB bool -- 2.35.1