Received: by 2002:a05:6a10:9e8c:0:0:0:0 with SMTP id y12csp280012pxx; Wed, 28 Oct 2020 04:54:13 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwWf3yKy3IV9rViZMdiXqg41FBujchadUN8QJk4Qn802j3G1zR0KalZanaFREuyoUMkQJkr X-Received: by 2002:aa7:ca4d:: with SMTP id j13mr7119013edt.119.1603886053432; Wed, 28 Oct 2020 04:54:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603886053; cv=none; d=google.com; s=arc-20160816; b=T4tAnriB3RpoP5AxUA/rTtl59xAVuBD/GKtCux0DIMASsshv6mnfzjoyDCkQFczF72 JS3CdXcwhShYKZQXL/rG5qh7sECnPDctQBfBVEtoADDw0EmAEd4TLi9c9tAkjDCntn/5 HDOxqR1j1p44FQux5RHUOED11M6wNRRR50tWe82jbXvtQ0CsWeHQWj7S+D391RTzV6LB GcUL7ej7mMEARQKQerW8f23pIlxEFgxbtDcpWrq577QXMBS8kxn6Opvq8SR7U5pWEoED b0or9TUUxY7h4R5sO/dgYQgqYBf/m0BH/aUD2NryrQlAej9IvGVTK7p6RZ2dRyLFKAY/ 5A4g== 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=BF1+mA1IG3GjXnGa7/CUgcNvpKzkPcjFbFJvTEzepD0=; b=eXVJ4xD2pCUm3RQujbbP4TMTUVZ7aJOLbG4n5xYuwaV6gFQ8O+TyBg/I4Mpxl40Fud qqcKwiNfsXTARbtuQasMnrVB/c2MR+U6cY31lDS1K7sD5hAqiQMxgNuBclRyvB5TwRUK ir1TKy4+DhZGX90D0S2pXjhJ1XAS2IEuY3MTZE4AM7HnSqxTEzWjp/lgsyyrd4AlzNj1 TWr2G43Zd4x0u+7G9/Bi2DNF3iExnQWWhG/xQZQ2eEzrJzrFKZLYrIhzkodpoclb1A/8 mlGmyNTouB0yRxIj28x3slVx4AwzAdaFMEAZhgL0FopE3/wJghr4WWJykOXQuyE0uTMa gmvw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="E/6Xe/sR"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id s18si2795558ejd.147.2020.10.28.04.53.51; Wed, 28 Oct 2020 04:54:13 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="E/6Xe/sR"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1794705AbgJ0PNI (ORCPT + 99 others); Tue, 27 Oct 2020 11:13:08 -0400 Received: from mail.kernel.org ([198.145.29.99]:40362 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1792968AbgJ0PGM (ORCPT ); Tue, 27 Oct 2020 11:06:12 -0400 Received: from localhost (83-86-74-64.cable.dynamic.v4.ziggo.nl [83.86.74.64]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 0F30421D24; Tue, 27 Oct 2020 15:06:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1603811171; bh=aIocu76wD2yXksJDdVAhdWe1KeyuA03JrPSb51ndGaY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=E/6Xe/sRV5MIopas4pJO1udNK0krPW+UGlwPrpQM2i0JiU6Ysved4tpi9jZPhizF6 YdEGM+ZW2aaulbRcnSV6rSKCqezLuVwB/gfZRTopkSMUI+6Lyst7Xl7xd1X+RFwb8b EZKfPBfTRIbi10gw9oHQH5LYTWUd4puSWrwNCro0= 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 5.8 398/633] powerpc/64: fix irq replay pt_regs->softe value Date: Tue, 27 Oct 2020 14:52:21 +0100 Message-Id: <20201027135541.384140506@linuxfoundation.org> X-Mailer: git-send-email 2.29.1 In-Reply-To: <20201027135522.655719020@linuxfoundation.org> References: <20201027135522.655719020@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Nicholas Piggin [ Upstream commit 2b48e96be2f9f7151197fd25dc41487054bc6f5b ] Replayed interrupts get an "artificial" struct pt_regs constructed to pass to interrupt handler functions. This did not get the softe field set correctly, it's as though the interrupt has hit while irqs are disabled. It should be IRQS_ENABLED. This is possibly harmless, asynchronous handlers should not be testing if irqs were disabled, but it might be possible for example some code is shared with synchronous or NMI handlers, and it makes more sense if debug output looks at this. Fixes: 3282a3da25bd ("powerpc/64: Implement soft interrupt replay in C") Signed-off-by: Nicholas Piggin Signed-off-by: Michael Ellerman Link: https://lore.kernel.org/r/20200915114650.3980244-2-npiggin@gmail.com Signed-off-by: Sasha Levin --- arch/powerpc/kernel/irq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/powerpc/kernel/irq.c b/arch/powerpc/kernel/irq.c index 297ee79febc6c..3a22281a8264e 100644 --- a/arch/powerpc/kernel/irq.c +++ b/arch/powerpc/kernel/irq.c @@ -214,7 +214,7 @@ void replay_soft_interrupts(void) struct pt_regs regs; ppc_save_regs(®s); - regs.softe = IRQS_ALL_DISABLED; + regs.softe = IRQS_ENABLED; again: if (IS_ENABLED(CONFIG_PPC_IRQ_SOFT_MASK_DEBUG)) -- 2.25.1