From patchwork Wed Oct 19 08:31:45 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 5478 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4ac7:0:0:0:0:0 with SMTP id y7csp333123wrs; Wed, 19 Oct 2022 06:40:16 -0700 (PDT) X-Google-Smtp-Source: AMsMyM52/5GIrr6B6eDvolkB3xt2V6yY7hrZ2HRtY9sB7H0YrXYKjz1vuP+KLoVEQ1xK8S3B779M X-Received: by 2002:a05:6402:3705:b0:454:e006:82 with SMTP id ek5-20020a056402370500b00454e0060082mr7572723edb.360.1666186816129; Wed, 19 Oct 2022 06:40:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666186816; cv=none; d=google.com; s=arc-20160816; b=kLSW1YznlQ59WEi7awF8AkrVrAcKijFQgXPPwaD3UEPHmNzwsa3N2fSSgVkxXhcWIg eqpWcu63Z+EmROCIIAx7SJJw5tpLHfc8W5ReJTK0A2uTfr12SJ3O5tQ55BjIRVV+TByo kTQw6Y3ko1BVgNRJl65hjCPj7WaLX4BBGQVkCU61a+8YaaqYV4mKRecb8qt94B2RUhbB c69PjtF0Vt7Y22Ye9Y+RSTZ+ziRIrK19BcevRFoI6FmNayZp5QLpiSAw8nkRnblJP8Wh rnUXVyOjjrBgM50WWG0B2rlEnYWK5od/52DGOou/uM56pZN/ajBZqvzDFctZuoNlfCRu Cq1A== 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=2uGB+Q5rR6oVtWTfb+UBTf10EP4K8bIAelKbWHYG2Ww=; b=ZQwUGxXc4JhtzyT31mzW4PM0TjWE6uZK+B5GzqaqnTXHabfNLCcuVFg7EZIxltO8Sb +tcezijVkwm1Ek7GdUkS2wVUVaQHpDqvAa6DjG7V8amT8u1uaNV+2qBdIRQ7/V9T23kP F5lP/a5FIpRS0maRUWsy2N9XNB0/qlNU3jy+covLIIHWcxtQj5f5I02xNvNyTex0683v GO1GDb0/WL9momiqGRghkWvOXVNOaRy99wqn0rDyKCRq64SIfvGxkMIHRQX/8TiZX84C F/R0HUyQqsOhJzLK3C8tLSbnx/bDzELiacCvhpXEUkm35qVidhG7SHFJSBaOjuESCv6N pU5w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=nhK51HPN; 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: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id r26-20020a170906a21a00b0078d39e310e0si11728402ejy.701.2022.10.19.06.39.51; Wed, 19 Oct 2022 06:40:16 -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=nhK51HPN; 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 S232213AbiJSNhH (ORCPT + 99 others); Wed, 19 Oct 2022 09:37:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39546 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231786AbiJSNgS (ORCPT ); Wed, 19 Oct 2022 09:36:18 -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 DC1C014EC76; Wed, 19 Oct 2022 06:25:09 -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 112DAB82481; Wed, 19 Oct 2022 09:05:42 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8097EC433D7; Wed, 19 Oct 2022 09:05:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1666170340; bh=87uGXaQ29FHYXgH/kJOHi/LtGmbeg5m3Y9g0xl9SUtQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=nhK51HPNIoATH1qbakHg0/bIndU2cOmNW8maIJsaNtaJjcbZmr14R4L5RCVcES50e LJw32ou8TzFknosVKqUwiWs9Spo0I6RZDL5wNpc+RJclotlqslFHNf/P1N/zYJY2U/ RbmHSD5keV7AwB44p9KLc6wdga+YtxeY/QbJtlnw= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Nicholas Piggin , Michael Ellerman , Sasha Levin Subject: [PATCH 6.0 618/862] powerpc/64/interrupt: Fix false warning in context tracking due to idle state Date: Wed, 19 Oct 2022 10:31:45 +0200 Message-Id: <20221019083317.242763603@linuxfoundation.org> X-Mailer: git-send-email 2.38.0 In-Reply-To: <20221019083249.951566199@linuxfoundation.org> References: <20221019083249.951566199@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 X-Spam-Status: No, score=-7.4 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 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1747123506789526652?= X-GMAIL-MSGID: =?utf-8?q?1747123506789526652?= From: Nicholas Piggin [ Upstream commit 56adbb7a8b6cc7fc9b940829c38494e53c9e57d1 ] Commit 171476775d32 ("context_tracking: Convert state to atomic_t") added a CONTEXT_IDLE state which can be encountered by interrupts from kernel mode in the idle thread, causing a false positive warning. Fixes: 171476775d32 ("context_tracking: Convert state to atomic_t") Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20220926054305.2671436-2-npiggin@gmail.com Signed-off-by: Sasha Levin --- arch/powerpc/include/asm/interrupt.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/powerpc/include/asm/interrupt.h b/arch/powerpc/include/asm/interrupt.h index 8069dbc4b8d1..b61555e30c7c 100644 --- a/arch/powerpc/include/asm/interrupt.h +++ b/arch/powerpc/include/asm/interrupt.h @@ -195,7 +195,8 @@ static inline void interrupt_enter_prepare(struct pt_regs *regs) * so avoid recursion. */ if (TRAP(regs) != INTERRUPT_PROGRAM) { - CT_WARN_ON(ct_state() != CONTEXT_KERNEL); + CT_WARN_ON(ct_state() != CONTEXT_KERNEL && + ct_state() != CONTEXT_IDLE); if (IS_ENABLED(CONFIG_PPC_IRQ_SOFT_MASK_DEBUG)) BUG_ON(is_implicit_soft_masked(regs)); }