Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp1187056rwi; Wed, 19 Oct 2022 07:40:32 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6p3cggPXYTdGCHT3mWju8uV4RZSfBWJH1wJ9y1nSkqrcjDW76s1TvDBWRl8/5cL8A3hu/e X-Received: by 2002:a05:6402:350d:b0:45c:f5a2:348e with SMTP id b13-20020a056402350d00b0045cf5a2348emr7785314edd.398.1666190432434; Wed, 19 Oct 2022 07:40:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666190432; cv=none; d=google.com; s=arc-20160816; b=ZxsZD0FvKLesUgVh+1mAX9wQ9ULNdkoABOwuFvS2dSRzOEr6CseXyypFT9cSHl4oG+ JyUdR8KoZ/mq0vn3jDRc5Tv2aY8LHvWdNdCoW44qlTkricyZCsEyiVgjcaY4BSBTakP5 5Z+xJUTYOwmra+MHhixDg+Qc5aQjfpK0j5VpbpIa3i+LaG8ArW8DcleAE7Fz0HtzS4IE zS73jrbmSf8UxflQ3s5PzQI3Vl3FtngvQNO4OGbR+jRRWqg4f0TeYmUMBm6z2yJTIwY3 WSrmLIg3pSuOBC0whpKzCSYDPaGNYGDvlHXQZJmaTtVVcBYwsmcAN6UaSw940JQBZB7+ 9fyw== 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id cz3-20020a0564021ca300b00459be46b0f4si12452351edb.131.2022.10.19.07.40.06; Wed, 19 Oct 2022 07:40:32 -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 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 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)); } -- 2.35.1