Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp2811288rwb; Mon, 15 Aug 2022 11:49:26 -0700 (PDT) X-Google-Smtp-Source: AA6agR4bC6rYD8J9gjkcaswe5GNwjrYGiMn5xafuL9m6LZaJvXrNz0U8DH0fRx/72r8DFmr1JFNS X-Received: by 2002:a05:6402:20b:b0:440:cb9f:c469 with SMTP id t11-20020a056402020b00b00440cb9fc469mr16084237edv.420.1660589365780; Mon, 15 Aug 2022 11:49:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660589365; cv=none; d=google.com; s=arc-20160816; b=yYvLb5V6cCUCrZ7/hgThl65+PD0v1duONuK0jdKhW7bmNaKUYNTc3j/MP0X0mlWM4C jl7TLyVQHokcVCZvczPG4VU3mE5110kbs/PzvvMQVCQVQ+bnBTnh0kZ/ptmglluxnKRP 5Qx/jXww0gFD2Yw8/KYsY80dJz3kb8Xn7mj+D5kSxRKw32zlJrQK5MhUEk21g0uB9dXN H0nOMZfkzxloMxjB/lkFnNkzNikFFb64yybxgZhycz2BBPZvXo4AibKt143HEvzFNByn u02pC1+wHGpTaAvThvt6WDnPIu/R5XmubDv7UY7k+1LcIDBeN48rxazkPovN5ZeLYhkq BHLA== 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=6Yto8VZls8YUpAqdD3ForOwJDpyAty/zjJQyhbcy000=; b=KlWv6Isn/aDVdhfiI8ce3uDb2OWcmLng3KHLqjKwKtcU2iDmUZ/otPXYiy2piKlRdl pinR0B4NAbH18ufx3ipBl6hObuhlBJFmYoRmgmF8ob8QNehi0mksg7Lt/oFHUyYhnIdA PhoxmPC/d7A5mEMu5ayMdyUTcJXycnvrw7RqBEx7404MuhzEwu5pUhnRIdl0gU8Cg/lU 8/JBFY53jpSnUW3NCQU5DHiw7TeRx6pexeg0JVG6tpGTXahL8I4issGpVbeFXgRe6Rbq BMRTBH4/Kx08B7ydX9v3VtRHW00bSxoUI7ToazZMQ13jIZpu+EuB4Je3CYMu/YbYnunF R1lQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Cu8+jNVC; 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 u25-20020a1709064ad900b007313c16ec8fsi7060500ejt.114.2022.08.15.11.48.59; Mon, 15 Aug 2022 11:49:25 -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=Cu8+jNVC; 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 S241698AbiHOS1q (ORCPT + 99 others); Mon, 15 Aug 2022 14:27:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57590 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242456AbiHOS0J (ORCPT ); Mon, 15 Aug 2022 14:26:09 -0400 Received: from sin.source.kernel.org (sin.source.kernel.org [145.40.73.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E24142FFDD; Mon, 15 Aug 2022 11:19:10 -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 sin.source.kernel.org (Postfix) with ESMTPS id 3B73BCE125A; Mon, 15 Aug 2022 18:18:49 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 09517C433C1; Mon, 15 Aug 2022 18:18:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1660587527; bh=zn7mZIOUKopCQiK6wEEUIfGvCikAD5V+7KAuofMwnWA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Cu8+jNVCy0/EWo30Czx35oDLJyIJfctfe4PNKrqGiQ2GZx4kPtEHyh0boxjH4vilS qNEEbeVRelndfHvbX0zQ7rCq6n+QzuVvcVqkok/RHDK/riQ3YpE/if1srnQ+m9nzfH dLSp6DnojCubWtC+1eOCxKwncMB939KF3L3Dqv5Y= 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.15 112/779] arch: make TRACE_IRQFLAGS_NMI_SUPPORT generic Date: Mon, 15 Aug 2022 19:55:56 +0200 Message-Id: <20220815180342.129998677@linuxfoundation.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220815180337.130757997@linuxfoundation.org> References: <20220815180337.130757997@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 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 fe6981a38795..57f5e881791a 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