From patchwork Tue May 19 16:26:41 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 206318 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=-10.1 required=3.0 tests=DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT 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 074C9C433DF for ; Tue, 19 May 2020 16:27:03 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id D1E74207FB for ; Tue, 19 May 2020 16:27:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1589905622; bh=s1wJAwkrmgG1XjwsUm3v1xaTI0ARm6WW9gEhCur/Ryw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=i5zk3q3aOtmVaXoDgW1dLA8hEmYPZ8sBid15zpGJUDIVaiSomlEQvlrCFM9rnchd7 ojskvE4J7wRTip3yJK2kGrVO6Dpwy1AEYqQ1mmnsAXST+y4WoPZwz8cG6xUoEDiaoa uFzDwV5m/sYpm6gDhdse7e5Bh46TEhPvynT72A0U= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729205AbgESQ1C (ORCPT ); Tue, 19 May 2020 12:27:02 -0400 Received: from mail.kernel.org ([198.145.29.99]:41168 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728689AbgESQ1C (ORCPT ); Tue, 19 May 2020 12:27:02 -0400 Received: from e123331-lin.nice.arm.com (amontpellier-657-1-18-247.w109-210.abo.wanadoo.fr [109.210.65.247]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id CD43020823; Tue, 19 May 2020 16:26:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1589905622; bh=s1wJAwkrmgG1XjwsUm3v1xaTI0ARm6WW9gEhCur/Ryw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Mhf8scZPUYtvuTAvYm0QeYPePZdh7+Qux7I5nVnoKRYC68hXA3BXA0qAJ9dsc1p9r 9FWz0qdGsTrIN4XttXlX8Ln5odkrizRT2Qrw3dLYhZy5x3dSB1TjRGi2F3wMH4HbX+ eYqJSh29BI3rsCG/YQiRg9kmaUumjQ3a7f2MiwTU= From: Ard Biesheuvel To: linux-arm-kernel@lists.infradead.org Cc: linux-efi@vger.kernel.org, Ard Biesheuvel , Geert Uytterhoeven , Nicolas Pitre , Linus Walleij , Russell King , Heinrich Schuchardt Subject: [PATCH v4 1/5] ARM: decompressor: move headroom variable out of LC0 Date: Tue, 19 May 2020 18:26:41 +0200 Message-Id: <20200519162645.31065-2-ardb@kernel.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200519162645.31065-1-ardb@kernel.org> References: <20200519162645.31065-1-ardb@kernel.org> Sender: linux-efi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-efi@vger.kernel.org Before breaking up LC0 into different pieces, move out the variable that is already place-relative (given that it subtracts 'restart' in the expression) and so its value does not need to be added to the runtime address of the LC0 symbol itself. Signed-off-by: Ard Biesheuvel Reviewed-by: Geert Uytterhoeven Reviewed-by: Nicolas Pitre --- arch/arm/boot/compressed/head.S | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/arch/arm/boot/compressed/head.S b/arch/arm/boot/compressed/head.S index cabdd8f4a248..42b8d67beab6 100644 --- a/arch/arm/boot/compressed/head.S +++ b/arch/arm/boot/compressed/head.S @@ -287,7 +287,7 @@ not_angel: */ mov r0, pc cmp r0, r4 - ldrcc r0, LC0+28 + ldrcc r0, .Lheadroom addcc r0, r0, pc cmpcc r4, r0 orrcc r4, r4, #1 @ remember we skipped cache_on @@ -664,9 +664,11 @@ LC0: .word LC0 @ r1 .word _got_start @ r11 .word _got_end @ ip .word .L_user_stack_end @ sp - .word _end - restart + 16384 + 1024*1024 .size LC0, . - LC0 +.Lheadroom: + .word _end - restart + 16384 + 1024*1024 + .Linflated_image_size_offset: .long (input_data_end - 4) - .