Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp3021159rwb; Mon, 15 Aug 2022 16:18:22 -0700 (PDT) X-Google-Smtp-Source: AA6agR6fBEVCUercmP0Kqm9UjUvC5uXupGiSTSO13Pzn0eDh3t21Bm4yIOXf/xxbdS+J6T41VUyK X-Received: by 2002:a05:6a00:1588:b0:52f:a5bb:b992 with SMTP id u8-20020a056a00158800b0052fa5bbb992mr18012065pfk.38.1660605502577; Mon, 15 Aug 2022 16:18:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660605502; cv=none; d=google.com; s=arc-20160816; b=jc9TkkbMIQWCFwweMB6mFy1QtoxKn3Un9fQ3w4NpPUbpliCg+dSPJLsipZbH7ch01c vaN6M137RUoFqSuq6H6Rhrg+HU8njhfVm0KJrKSS1aUVzlMwC+Zy01QesmAjqZIuorRo GG2KLcCB6pE9/qToHWt+hYXBhb6eN9oeeOxgJTTyvC276AXDSFui8odiRTe5B3DCBlW1 kfSPGLtJjbcSx5bmCeJPIDq7oeJtx9sKiVPUH8v/L06Gu5PjQ4axqdGZtBqy+LtgW1rc gWGG0GoF6w9lNLAlC+AG6Ld8bklcrmyLL8cZi7C/u29vjyFE4jOKLlR34yPxnujO2Tnq SaLA== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=IICBpmOa+nEiMMcijxBEP2nOEU+TsTAKIiWE7w9jPiE=; b=eduFrZFuA8oQnQIkNerzZNEy6++7E7uPN50kSijS06/CwGwt5wB0+dV1IrUQCs7EzY 7gXcVGwp21RPlJKN040Y8nqR4S+sf9MMxcBMq8gz44UsTe9Yop3oll56OJLJO9maQ3Dl ew3SVhiuZrYaAzHNEdymgk9aapub+BAA23BWl272Je4arVUaCArFkKcezYVJ7U0h4rAR xpoVEdtVqZtNiWbXJCr14+Su6WoBcn/Y4gYXX9EYSipJwBK1gbDABVy1VxYtkpJi3IYy bGinWV9vdNLG7RPlLXw9C+rBD/vNz7n6NPcdiC9QyR5GWj7Sa8iSSUa8XhXrf+q/r/Yo 65cg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=OXfm5lzI; 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=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 203-20020a6300d4000000b0041aee1c45f6si10724590pga.504.2022.08.15.16.18.06; Mon, 15 Aug 2022 16:18:22 -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=@linuxfoundation.org header.s=korg header.b=OXfm5lzI; 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=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345439AbiHOUaR (ORCPT + 99 others); Mon, 15 Aug 2022 16:30:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53116 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1347332AbiHOUWS (ORCPT ); Mon, 15 Aug 2022 16:22:18 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 34FDE2CCBE; Mon, 15 Aug 2022 12:02:34 -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 B5B7261281; Mon, 15 Aug 2022 19:02:33 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A859EC433C1; Mon, 15 Aug 2022 19:02:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1660590153; bh=nogcyjDbxml/XTbmHH6bJemVBNIFkSKhtNm6psYUfCc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=OXfm5lzIk7WsMeVd/EmqW04KzcCDvvRCDx6f/gPMR8JjVudIUhIsJcHPTkKP1slq8 PqJrygYt+oKemwEI0+UOFjXx/OEvjt1CHAthebYJ4/QwWg1+9BR0PlJsAwdGmdCS8Y U+rGUKqnijNANg2Lijh+GJ2wWP5Z9zvhPTW152o0= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Mark Rutland , Catalin Marinas , Ingo Molnar , "Peter Zijlstra (Intel)" , Thomas Gleixner , Will Deacon , Sasha Levin Subject: [PATCH 5.18 0136/1095] arch: make TRACE_IRQFLAGS_NMI_SUPPORT generic Date: Mon, 15 Aug 2022 19:52:15 +0200 Message-Id: <20220815180435.221415031@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220815180429.240518113@linuxfoundation.org> References: <20220815180429.240518113@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 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 31c4fdc4a4ba..ab45e0f6c21b 100644 --- a/arch/Kconfig +++ b/arch/Kconfig @@ -214,6 +214,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 ce1f5a876cfe..04a9865dbdbf 100644 --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig @@ -272,6 +272,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