From patchwork Mon Jul 21 17:54:32 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Leif Lindholm X-Patchwork-Id: 34010 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-qa0-f69.google.com (mail-qa0-f69.google.com [209.85.216.69]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 2F53820672 for ; Mon, 21 Jul 2014 17:56:26 +0000 (UTC) Received: by mail-qa0-f69.google.com with SMTP id v10sf20140829qac.8 for ; Mon, 21 Jul 2014 10:56:26 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:date:from:to:subject:message-id :mime-version:user-agent:precedence:list-id:list-unsubscribe :list-archive:list-post:list-help:list-subscribe:sender:errors-to :x-original-sender:x-original-authentication-results:mailing-list :content-disposition:content-type:content-transfer-encoding; bh=hX+N5bFP9AQ8paDCzg2C5I9WGf+8cBE3uKbnjP5QOYE=; b=Jjoblmwl9enaz4zCNTzRtx5rsqjeSNS05oNS4C8vdqUKCRosX2YsVUFJmeWhsMySvI R0qJCPVlCkL5Vb30uX1o/5YDYAoGJAYiNJ2EFVezghJt8/ob5QOWnWChPjP6gbl2KKrr Tn77U+GrRs/+QvnVLxt3wKCcHj567peLUI3/wY+ruNH4m2ODuXmZ54af7Gtsc0qydflh P46cfQOL+apDg+CufyVTmeYLdaRREPy69+f56ynoAW87uH4TWUryvkPsyH8l/vCGTU3V ZoaFOpjgtYEGD1sSSB18MGVQoeBlKZac2WjHuBRqunEX5bNkfel4Yq1fdJdG1Ajz2rgB JGug== X-Gm-Message-State: ALoCoQnjF857De0RzlLhGKqxHU2ATiYftEsS5yaCqFnK9hIldu6jFXvDltdwc/TO3Z9xvRTVpATc X-Received: by 10.52.142.12 with SMTP id rs12mr8235875vdb.8.1405965385446; Mon, 21 Jul 2014 10:56:25 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.104.136 with SMTP id a8ls2079771qgf.2.gmail; Mon, 21 Jul 2014 10:56:25 -0700 (PDT) X-Received: by 10.220.118.136 with SMTP id v8mr13969221vcq.50.1405965385331; Mon, 21 Jul 2014 10:56:25 -0700 (PDT) Received: from mail-vc0-f172.google.com (mail-vc0-f172.google.com [209.85.220.172]) by mx.google.com with ESMTPS id ev7si12014251vdb.36.2014.07.21.10.56.25 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 21 Jul 2014 10:56:25 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.172 as permitted sender) client-ip=209.85.220.172; Received: by mail-vc0-f172.google.com with SMTP id im17so13023032vcb.3 for ; Mon, 21 Jul 2014 10:56:25 -0700 (PDT) X-Received: by 10.220.15.8 with SMTP id i8mr19597773vca.45.1405965384837; Mon, 21 Jul 2014 10:56:24 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.221.37.5 with SMTP id tc5csp132406vcb; Mon, 21 Jul 2014 10:56:24 -0700 (PDT) X-Received: by 10.70.98.167 with SMTP id ej7mr27558246pdb.70.1405965384256; Mon, 21 Jul 2014 10:56:24 -0700 (PDT) Received: from bombadil.infradead.org (bombadil.infradead.org. [2001:1868:205::9]) by mx.google.com with ESMTPS id a4si14934759pat.238.2014.07.21.10.56.23 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 21 Jul 2014 10:56:24 -0700 (PDT) Received-SPF: none (google.com: linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org does not designate permitted sender hosts) client-ip=2001:1868:205::9; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1X9Hnl-0001jI-Kt; Mon, 21 Jul 2014 17:55:05 +0000 Received: from mail-wg0-f41.google.com ([74.125.82.41]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1X9Hnh-00015P-VZ for linux-arm-kernel@lists.infradead.org; Mon, 21 Jul 2014 17:55:03 +0000 Received: by mail-wg0-f41.google.com with SMTP id z12so6771493wgg.12 for ; Mon, 21 Jul 2014 10:54:35 -0700 (PDT) X-Received: by 10.194.89.106 with SMTP id bn10mr25603640wjb.121.1405965275689; Mon, 21 Jul 2014 10:54:35 -0700 (PDT) Received: from bivouac.eciton.net ([2a00:1098:0:86:1000:23:0:2]) by mx.google.com with ESMTPSA id u10sm39210868wjz.43.2014.07.21.10.54.34 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Mon, 21 Jul 2014 10:54:34 -0700 (PDT) Date: Mon, 21 Jul 2014 18:54:32 +0100 From: Leif Lindholm To: linux-arm-kernel@lists.infradead.org Subject: [RFC] arm: section split in boot/compressed/head.S Message-ID: <20140721175432.GB4179@bivouac.eciton.net> MIME-Version: 1.0 User-Agent: Mutt/1.5.21 (2010-09-15) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140721_105502_190026_F6AC25E3 X-CRM114-Status: UNSURE ( 9.10 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -0.7 (/) X-Spam-Report: SpamAssassin version 3.4.0 on bombadil.infradead.org summary: Content analysis details: (-0.7 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [74.125.82.41 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [74.125.82.41 listed in wl.mailspike.net] -0.0 SPF_PASS SPF: sender matches SPF record -0.0 RCVD_IN_MSPIKE_WL Mailspike good senders X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: , List-Help: , List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: leif.lindholm@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.172 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 Content-Disposition: inline Reported-by: Roy Franz The current code in boot/compressed/head.S executes pretty much sequentially from "start", all the way until the end of "dtb_check_done". However, shortly after the "not_angel" symbol, there is a section change, in the form of a ".text" directive. This means any literal pools in .start end up getting inserted into the middle of the instruction stream. Would something like the below (pardon the semantic silliness) be an acceptable fix? diff --git a/arch/arm/boot/compressed/head.S b/arch/arm/boot/compressed/head.S index 3a8b32d..8ee05e9 100644 --- a/arch/arm/boot/compressed/head.S +++ b/arch/arm/boot/compressed/head.S @@ -149,6 +149,10 @@ start: mov r0, #0x17 @ angel_SWIreason_EnterSVC ARM( swi 0x123456 ) @ angel_SWI_ARM THUMB( svc 0xab ) @ angel_SWI_THUMB + b angel + + .text +angel: not_angel: safe_svcmode_maskall r0 msr spsr_cxsf, r9 @ Save the CPU boot mode in @@ -163,8 +167,6 @@ not_angel: * by the linker here, but it should preserve r7, r8, and r9. */ - .text - #ifdef CONFIG_AUTO_ZRELADDR @ determine final kernel image address mov r4, pc