From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 836E7C433EF for ; Mon, 14 Feb 2022 17:21:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=SI8cKLyrvfS0Qqbu1oBScu0mwTLVIRDxtw/dKGdtULU=; b=sl9IHj7JRCp6r9 FTzvw7omj/3/0wmTnj08SXg3kKJABHAcAvm3VCd2s29ffzuIWLZ2MtvQhyP2buHaY1RQWUYjuiFzZ XqD27BFRg6s4ePnLmB0rLM8YVdoyk40r/jnZndX49cYH1YBxevDF8UW8RtxkCOyUo3C+DeHcoGu/c qwi9QVOWoAm+r0+Rsf6w4MGgDtmo+Ch390TANeNGlFGv0SynEYHkn9ADtIdRJSKzYoplck4h/7EQT uJGAB/+sXn80Bjx+/hLCRC43zaCrMS+vGgePChr2s/Fl+fpT0son1n0yTee4MDPPDC49RxB6r3YQl pGWvklEYOcMfrhJJMrsA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nJf1w-00GMQo-24; Mon, 14 Feb 2022 17:20:52 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nJf1r-00GMPV-EN for linux-arm-kernel@lists.infradead.org; Mon, 14 Feb 2022 17:20:48 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 6A65613D5; Mon, 14 Feb 2022 09:20:46 -0800 (PST) Received: from FVFF77S0Q05N (unknown [10.57.86.129]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 747A23F70D; Mon, 14 Feb 2022 09:20:45 -0800 (PST) Date: Mon, 14 Feb 2022 17:20:42 +0000 From: Mark Rutland To: Joakim Tjernlund , Marc Zyngier , Will Deacon , Catalin Marinas Cc: linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH] arm64: Correct wrong label in macro __init_el2_gicv3 Message-ID: References: <20220214171157.20371-1-joakim.tjernlund@infinera.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20220214171157.20371-1-joakim.tjernlund@infinera.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220214_092047_555568_9EBA7C60 X-CRM114-Status: GOOD ( 18.03 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org [Adding Ccs] On Mon, Feb 14, 2022 at 06:11:57PM +0100, Joakim Tjernlund wrote: > If GICv3 init fails, CPU branched to the wrong label causing > a crash much later. How about: | In commit: | | 114945d84a30a5fe ("arm64: Fix labels in el2_setup macros") | | We renamed a label from '1' to '.Lskip_gicv3_\@', but failed to update | a branch to it, which now targets a later label also called '1'. | | The branch is taken rarely, when GICv3 is present but SRE is disabled | at EL3, causing a boot-time crash. | | Update the caller to the new label name. ... since that makes it clear that this is the right fix. > Fixes: 114945d84a30a5fe ("arm64: Fix labels in el2_setup macros") > Signed-off-by: Joakim Tjernlund With the wording above: Reviewed-by: Mark Rutland Thanks, Mark. > --- > arch/arm64/include/asm/el2_setup.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/arch/arm64/include/asm/el2_setup.h b/arch/arm64/include/asm/el2_setup.h > index 3198acb2aad8..7f3c87f7a0ce 100644 > --- a/arch/arm64/include/asm/el2_setup.h > +++ b/arch/arm64/include/asm/el2_setup.h > @@ -106,7 +106,7 @@ > msr_s SYS_ICC_SRE_EL2, x0 > isb // Make sure SRE is now set > mrs_s x0, SYS_ICC_SRE_EL2 // Read SRE back, > - tbz x0, #0, 1f // and check that it sticks > + tbz x0, #0, .Lskip_gicv3_\@ // and check that it sticks > msr_s SYS_ICH_HCR_EL2, xzr // Reset ICC_HCR_EL2 to defaults > .Lskip_gicv3_\@: > .endm > -- > 2.32.0 > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel