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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 24F15C25B0C for ; Mon, 8 Aug 2022 01:46:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242518AbiHHBpj (ORCPT ); Sun, 7 Aug 2022 21:45:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52072 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242847AbiHHBnW (ORCPT ); Sun, 7 Aug 2022 21:43:22 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 575F413F08; Sun, 7 Aug 2022 18:36:03 -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 ams.source.kernel.org (Postfix) with ESMTPS id C1D62B80E06; Mon, 8 Aug 2022 01:36:01 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D92DFC433D7; Mon, 8 Aug 2022 01:35:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1659922560; bh=Pir9SmOQsBGR1CQB8AGdZf2HiZDQ5u0vvLJ656/sgb4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=nHdPtxF0WMDJywaWudHc6MfpGK65I8kFoBlChJWgLRFcmr1Szz/8eD7icZuscv+Av iyEl1gkPUVSGiQZWNxCUx/kGRTe+1S5GOoF+pMYXqEWNmAeaRct8oqPJNRzkkiRZT6 DKx7atvpVS/SJFyydAIArGKBfN80kBYd3BituY5ZNthsykF5KqDda6lC11hThlnzBu hftX7bAGKI/gxe8nCKEBGiE0PLeJZtJp6cIuclKoEy6o/mWZ2PR32C2BJC1xJ4SvPe QbL3N4XUmudAZTNOGQmdENfpIHs/dYVSgm/ymJ4cU/iHApklhyZhGVnz9xVl8ISI0e BCq0+M0Ux6XpA== 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, paulmck@kernel.org, nathan@kernel.org, jpoimboe@kernel.org, frederic@kernel.org, ebiederm@xmission.com, elver@google.com, mhiramat@kernel.org, ashimida@linux.alibaba.com, samitolvanen@google.com, song@kernel.org Subject: [PATCH AUTOSEL 5.15 02/45] arch: make TRACE_IRQFLAGS_NMI_SUPPORT generic Date: Sun, 7 Aug 2022 21:35:06 -0400 Message-Id: <20220808013551.315446-2-sashal@kernel.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220808013551.315446-1-sashal@kernel.org> References: <20220808013551.315446-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit 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 191589f26b1a..5987363b41c2 100644 --- a/arch/Kconfig +++ b/arch/Kconfig @@ -200,6 +200,9 @@ config HAVE_NMI 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 a170cfdae2a7..2db73635c115 100644 --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig @@ -260,6 +260,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 d3a6f74a94bd..d4d6db4dde22 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