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: 20916 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ob0-f200.google.com (mail-ob0-f200.google.com [209.85.214.200]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id A3C0625C6D for ; Wed, 9 Oct 2013 20:57:12 +0000 (UTC) Received: by mail-ob0-f200.google.com with SMTP id wo20sf6306495obc.11 for ; Wed, 09 Oct 2013 13:57:11 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=mime-version:x-gm-message-state:delivered-to:from:to:cc:subject :date:message-id:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=8JYqispGBC/9btBDrjG1PbBkOJ9Sxy8NIprMCbkKpn0=; b=J1nozB89Zje5sietz4qtqObPEX9Y7ystM6+sZWLwaf2Xjc4PXDkGp96nw4rp4yN3V3 fQTXlLCjoYhDrknRAyv244jFl10PZoZkC0gRg8/DSo/kBQsU4SBwz7HvhqKCgzks4kzT pfQDMpFuW88TUr/VRe0IzolxVBJOAvbnvHAc0UNU/oi+6t/TsRbMnmUo1sYwIjIJ48kw LtEmJhvf38obI1jVUyddfYzH2+5sdW4TiOsIuGgU1vuQlok+oHRYjaGgs1YFzcB5Nh2S BDTy9Kn9yrUKPHffaMHrETpNnmm+4VA7+NsknLcg3QDrbWJhNTEUhOaGpMf9ErMxbtT+ 2i8g== X-Received: by 10.50.73.37 with SMTP id i5mr3029705igv.2.1381352231834; Wed, 09 Oct 2013 13:57:11 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.76.100 with SMTP id j4ls779633qew.29.gmail; Wed, 09 Oct 2013 13:57:11 -0700 (PDT) X-Received: by 10.220.181.136 with SMTP id by8mr7760961vcb.11.1381352231656; Wed, 09 Oct 2013 13:57:11 -0700 (PDT) Received: from mail-vc0-f176.google.com (mail-vc0-f176.google.com [209.85.220.176]) by mx.google.com with ESMTPS id gq10si12552981vdc.108.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 09 Oct 2013 13:57:11 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.176 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.220.176; Received: by mail-vc0-f176.google.com with SMTP id lf11so969444vcb.21 for ; Wed, 09 Oct 2013 13:57:11 -0700 (PDT) X-Gm-Message-State: ALoCoQl5UNt92jUrWTa5e357Z2hS9O43tUaJDAt5zZwYkiByvfXZ4Fjk4Y1AkYGS9HjsJFk+GCFH X-Received: by 10.52.231.39 with SMTP id td7mr776747vdc.106.1381352231530; Wed, 09 Oct 2013 13:57:11 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.220.174.196 with SMTP id u4csp319979vcz; Wed, 9 Oct 2013 13:57:11 -0700 (PDT) X-Received: by 10.14.107.68 with SMTP id n44mr14612891eeg.26.1381352230334; Wed, 09 Oct 2013 13:57:10 -0700 (PDT) Received: from mail-ee0-f45.google.com (mail-ee0-f45.google.com [74.125.83.45]) by mx.google.com with ESMTPS id 7si33724649eeu.308.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 09 Oct 2013 13:57:10 -0700 (PDT) Received-SPF: neutral (google.com: 74.125.83.45 is neither permitted nor denied by best guess record for domain of taras.kondratiuk@linaro.org) client-ip=74.125.83.45; Received: by mail-ee0-f45.google.com with SMTP id c50so704009eek.18 for ; Wed, 09 Oct 2013 13:57:09 -0700 (PDT) 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 Cc: patches@linaro.org, steve.mcintyre@linaro.org, linaro-networking@linaro.org, Dave Martin , Will Deacon , Russell King , linaro-kernel@lists.linaro.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-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: taras.kondratiuk@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.220.176 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , 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