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 X-Spam-Level: X-Spam-Status: No, score=-12.7 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1C527C4727E for ; Mon, 21 Sep 2020 22:23:08 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 9F4C223A62 for ; Mon, 21 Sep 2020 22:23:07 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="leL30mvS"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=armlinux.org.uk header.i=@armlinux.org.uk header.b="m9L9cROE" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9F4C223A62 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=armlinux.org.uk Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:Message-ID: Subject: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=HSQGJ536iwyhbZM2/6SiAJJMWkxMhiPsCWJOyGVtpYs=; b=leL30mvS8BLnajvalovSPvwIS RtVFB5adf1lukdf7FfdVOClw7YL0K0v9E7zy/nuufFZ0SmGEkbc8tvKyN6i+EUDjJr5h3Z7v3pM1A abNJf3SAkK5eKG1rAF4fJK679n/1vtncN0eDq/lnLFhgQ2hNNkySXkxfhG487B+7DaTfJOVlW0QnF 9BOfDbddgglA14joVg5kN1TFdb37TSB7iUvA4BK2TfGee8w6fBdrmpX9WzD+nORuYB0/2E8SnaGBw xAspGpIYddK1Yt324vuy+PwrID53+txZ8arfx3B/BMi73bk2335vPPrSjp/MF5oTD+gfJARbbT5YT ia0bv92Ow==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kKUBp-0000AW-N3; Mon, 21 Sep 2020 22:21:41 +0000 Received: from pandora.armlinux.org.uk ([2001:4d48:ad52:32c8:5054:ff:fe00:142]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kKUBm-0008Fs-Ce for linux-arm-kernel@lists.infradead.org; Mon, 21 Sep 2020 22:21:39 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=armlinux.org.uk; s=pandora-2019; h=Sender:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=0Cs07+XvqgrJQX4qFJkbQFKhx88Hw8XoTK91JOuGZkA=; b=m9L9cROEnX699g/CTAkZAU6Hs wmz+jOZQMa+kxxw6i9hTUyND0upIFXXcFYp+9geqLd/X4s0inGXQFldUGUAo+7mEhLB/uHy0rWU0U rqioLubg3OTAOmY2QEzTaO02NiSgzgag6obNajnIKdmfBUMR210m65acb4+TgLOVi7krinTRo6UET PgF+8j1+0HcPOsmzeT4Crcnhb9iX6zmGTfaSN1mqfmeFo+mc9Mto6UdoC5CF20UCLTQi2ASy9kQnN yzPTpsxdpUJBQ+gYXDQ7cu72e7QWtDP+/fJLfkIA20/MVRT3IVyy8LqvlOxClCX2JJU+MtkMKlMQi 5KlvTPgOw==; Received: from shell.armlinux.org.uk ([fd8f:7570:feb6:1:5054:ff:fe00:4ec]:36594) by pandora.armlinux.org.uk with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kKU8l-0002Hm-5Q; Mon, 21 Sep 2020 23:18:31 +0100 Received: from linux by shell.armlinux.org.uk with local (Exim 4.92) (envelope-from ) id 1kKU8i-0001hP-62; Mon, 21 Sep 2020 23:18:28 +0100 Date: Mon, 21 Sep 2020 23:18:28 +0100 From: Russell King - ARM Linux admin To: Ard Biesheuvel Subject: Re: [PATCH v2 01/10] ARM: p2v: fix handling of LPAE translation in BE mode Message-ID: <20200921221828.GZ1551@shell.armlinux.org.uk> References: <20200921154117.757-1-ardb@kernel.org> <20200921154117.757-2-ardb@kernel.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20200921154117.757-2-ardb@kernel.org> User-Agent: Mutt/1.10.1 (2018-07-13) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200921_182138_444968_5767516F X-CRM114-Status: GOOD ( 19.91 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Linus Walleij , linux-efi@vger.kernel.org, Nicolas Pitre , linux-arm-kernel@lists.infradead.org, Zhen Lei 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 On Mon, Sep 21, 2020 at 05:41:08PM +0200, Ard Biesheuvel wrote: > When running in BE mode on LPAE hardware with a PA-to-VA translation > that exceeds 4 GB, we patch bits 39:32 of the offset into the wrong > byte of the opcode. So fix that, by rotating the offset in r0 to the > right by 8 bits, which will put the 8-bit immediate in bits 31:24. > > Note that this will also move bit #22 in its correct place when > applying the rotation to the constant #0x400000. > > Signed-off-by: Ard Biesheuvel Should this have a fixes tag? > --- > arch/arm/kernel/head.S | 6 +----- > 1 file changed, 1 insertion(+), 5 deletions(-) > > diff --git a/arch/arm/kernel/head.S b/arch/arm/kernel/head.S > index f8904227e7fd..98c1e68bdfcb 100644 > --- a/arch/arm/kernel/head.S > +++ b/arch/arm/kernel/head.S > @@ -671,12 +671,8 @@ ARM_BE8(rev16 ip, ip) > ldrcc r7, [r4], #4 @ use branch for delay slot > bcc 1b > bx lr > -#else > -#ifdef CONFIG_CPU_ENDIAN_BE8 > - moveq r0, #0x00004000 @ set bit 22, mov to mvn instruction > #else > moveq r0, #0x400000 @ set bit 22, mov to mvn instruction > -#endif > b 2f > 1: ldr ip, [r7, r3] > #ifdef CONFIG_CPU_ENDIAN_BE8 > @@ -685,7 +681,7 @@ ARM_BE8(rev16 ip, ip) > tst ip, #0x000f0000 @ check the rotation field > orrne ip, ip, r6, lsl #24 @ mask in offset bits 31-24 > biceq ip, ip, #0x00004000 @ clear bit 22 > - orreq ip, ip, r0 @ mask in offset bits 7-0 > + orreq ip, ip, r0, ror #8 @ mask in offset bits 7-0 > #else > bic ip, ip, #0x000000ff > tst ip, #0xf00 @ check the rotation field > -- > 2.17.1 > > -- RMK's Patch system: https://www.armlinux.org.uk/developer/patches/ FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last! _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel