From patchwork Mon Jun 20 13:40:27 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dave Martin X-Patchwork-Id: 2085 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id 8557723F4D for ; Mon, 20 Jun 2011 13:40:41 +0000 (UTC) Received: from mail-vx0-f180.google.com (mail-vx0-f180.google.com [209.85.220.180]) by fiordland.canonical.com (Postfix) with ESMTP id 552D6A18770 for ; Mon, 20 Jun 2011 13:40:41 +0000 (UTC) Received: by vxd7 with SMTP id 7so2374878vxd.11 for ; Mon, 20 Jun 2011 06:40:40 -0700 (PDT) Received: by 10.52.98.97 with SMTP id eh1mr7374967vdb.7.1308577240781; Mon, 20 Jun 2011 06:40:40 -0700 (PDT) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.52.183.130 with SMTP id em2cs5216vdc; Mon, 20 Jun 2011 06:40:40 -0700 (PDT) Received: by 10.216.68.140 with SMTP id l12mr225785wed.79.1308577239893; Mon, 20 Jun 2011 06:40:39 -0700 (PDT) Received: from mail-wy0-f178.google.com (mail-wy0-f178.google.com [74.125.82.178]) by mx.google.com with ESMTPS id f16si12858456wed.3.2011.06.20.06.40.39 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 20 Jun 2011 06:40:39 -0700 (PDT) Received-SPF: neutral (google.com: 74.125.82.178 is neither permitted nor denied by best guess record for domain of dave.martin@linaro.org) client-ip=74.125.82.178; Authentication-Results: mx.google.com; spf=neutral (google.com: 74.125.82.178 is neither permitted nor denied by best guess record for domain of dave.martin@linaro.org) smtp.mail=dave.martin@linaro.org Received: by mail-wy0-f178.google.com with SMTP id 21so1988565wya.37 for ; Mon, 20 Jun 2011 06:40:39 -0700 (PDT) Received: by 10.227.24.8 with SMTP id t8mr5082142wbb.0.1308577239140; Mon, 20 Jun 2011 06:40:39 -0700 (PDT) Received: from e200948.peterhouse.linaro.org (fw-lnat.cambridge.arm.com [217.140.96.63]) by mx.google.com with ESMTPS id fr17sm2359178wbb.40.2011.06.20.06.40.37 (version=SSLv3 cipher=OTHER); Mon, 20 Jun 2011 06:40:38 -0700 (PDT) From: Dave Martin To: linux-arm-kernel@lists.infradead.org Cc: patches@linaro.org, Nicolas Pitre Subject: [PATCH 2/4] ARM: head-nommu: Always enter the kernel in ARM state Date: Mon, 20 Jun 2011 14:40:27 +0100 Message-Id: <1308577229-23681-3-git-send-email-dave.martin@linaro.org> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1308577229-23681-1-git-send-email-dave.martin@linaro.org> References: <1308577229-23681-1-git-send-email-dave.martin@linaro.org> This makes Image directly bootable; otherwise the kernel is reliant on the zImage decompressor to switch to the correct instruction set. Signed-off-by: Dave Martin --- arch/arm/kernel/head-nommu.S | 8 ++++++++ 1 files changed, 8 insertions(+), 0 deletions(-) diff --git a/arch/arm/kernel/head-nommu.S b/arch/arm/kernel/head-nommu.S index 6b1e0ad..d46f259 100644 --- a/arch/arm/kernel/head-nommu.S +++ b/arch/arm/kernel/head-nommu.S @@ -32,8 +32,16 @@ * numbers for r1. * */ + .arm + __HEAD ENTRY(stext) + + THUMB( adr r9, BSYM(1f) ) @ Kernel is always entered in ARM. + THUMB( bx r9 ) @ If this is a Thumb-2 kernel, + THUMB( .thumb ) @ switch to Thumb now. + THUMB(1: ) + setmode PSR_F_BIT | PSR_I_BIT | SVC_MODE, r9 @ ensure svc mode @ and irqs disabled #ifndef CONFIG_CPU_CP15