From patchwork Wed Oct 9 20:57:03 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Taras Kondratiuk X-Patchwork-Id: 3011701 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id E33119F245 for ; Wed, 9 Oct 2013 21:04:09 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id DA41F2026F for ; Wed, 9 Oct 2013 21:04:08 +0000 (UTC) Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 871C72017E for ; Wed, 9 Oct 2013 21:04:07 +0000 (UTC) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1VU0vJ-0005Xh-5X; Wed, 09 Oct 2013 21:04:01 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1VU0vG-0000cc-On; Wed, 09 Oct 2013 21:03:58 +0000 Received: from mail-ee0-f50.google.com ([74.125.83.50]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1VU0vE-0000cD-Hj for linux-arm-kernel@lists.infradead.org; Wed, 09 Oct 2013 21:03:57 +0000 Received: by mail-ee0-f50.google.com with SMTP id d51so705902eek.9 for ; Wed, 09 Oct 2013 14:03:33 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=8JYqispGBC/9btBDrjG1PbBkOJ9Sxy8NIprMCbkKpn0=; b=Pk35xHPUaSzC4+PysLWPL87VoXiz+R5GUTAzZbNSxx+1Ozqwx2pN/zRpc9i+CYdhAL CKjIaxraxf3CAHrXyqsrngoYmmLzzsDn06iSbhStSEUua7BA8ROAlIyTmcudQuzTe0CQ bS2qJM4F1SKU9wmJQj7YS1CVNx3CpvvxgXiyZQYibSCwGZeNBeWOW+CPy7agsjASBrJS tKBd3KKRZMRd9CeJY4z/FgcntdvmfLTKWS5jO8aDD6+veoH9HkdJ9kGjeMsVzM1+MIBZ /J3D0vUk8qpJbBMfUqwFMO/LBJWF3nZR9AGD7ltSoOe6RbUjHOM3amWrDiXzUTyyb3lx TWJw== X-Gm-Message-State: ALoCoQlGEtTVVKfJCpAcDUMl8Bk8k3IF8sCe4iYmshFXhJ8Ev6wFr5H3dcif22BUSdXyP+iPtU46 X-Received: by 10.15.99.72 with SMTP id bk48mr14617382eeb.22.1381352229461; Wed, 09 Oct 2013 13:57:09 -0700 (PDT) Received: from localhost.localdomain (5-1-4-235-dynamic.retail.datagroup.ua. [5.1.4.235]) by mx.google.com with ESMTPSA id x47sm92989193eea.16.1969.12.31.16.00.00 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 09 Oct 2013 13:57:09 -0700 (PDT) From: Taras Kondratiuk To: linux-arm-kernel@lists.infradead.org Subject: [RFC PATCH] ARM: kexec: Assemble relocate code in ARM mode Date: Wed, 9 Oct 2013 23:57:03 +0300 Message-Id: <1381352223-17721-1-git-send-email-taras.kondratiuk@linaro.org> X-Mailer: git-send-email 1.7.9.5 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20131009_170356_697054_9584464B X-CRM114-Status: GOOD ( 10.06 ) X-Spam-Score: -2.6 (--) Cc: Dave Martin , linaro-kernel@lists.linaro.org, Russell King , patches@linaro.org, Will Deacon , steve.mcintyre@linaro.org, linaro-networking@linaro.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP In Thumb2 kernel (CONFIG_THUMB2_KERNEL) kexec's relocate code is assembled in Thumb2 mode, but cpu_v7_reset() jumps to this code in ARM state, because its address is page aligned and has 0 in LSB. Assemble this code in ARM mode to fix the issue. Signed-off-by: Taras Kondratiuk --- Based on v3.12-rc4 Cc: Dave Martin Cc: Will Deacon Cc: Russell King Cc: linaro-kernel@lists.linaro.org Cc: linux-arm-kernel@lists.infradead.org --- arch/arm/kernel/relocate_kernel.S | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/kernel/relocate_kernel.S b/arch/arm/kernel/relocate_kernel.S index d0cdedf..a3af323 100644 --- a/arch/arm/kernel/relocate_kernel.S +++ b/arch/arm/kernel/relocate_kernel.S @@ -5,6 +5,7 @@ #include .globl relocate_new_kernel + .arm relocate_new_kernel: ldr r0,kexec_indirection_page