linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: mad_soft@inbox.ru (Dmitry Artamonow)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] arm: fix compilation of entry-common.S for older CPUs
Date: Fri, 18 Sep 2009 18:29:05 +0400	[thread overview]
Message-ID: <mailman.45.1254166892.2253.linux-arm-kernel@lists.infradead.org> (raw)

Commit 181f817eaaca4c1f introduced some new code to entry-common.S
Sadly, this new code uses 'bx' instruction which is available only on
ARMv5 and higher CPUs. This causes following compilation errors when
building kernel for StrongARM (ARMv4):

arch/arm/kernel/entry-common.S: Assembler messages:
arch/arm/kernel/entry-common.S:129: Error: selected processor does not
 support `bx ip'
arch/arm/kernel/entry-common.S:138: Error: selected processor does not
 support `bx ip'

Fix these errors by using 'mov pc' instead of 'bx'.

Signed-off-by: Dmitry Artamonow <mad_soft@inbox.ru>
---
 arch/arm/kernel/entry-common.S |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

Please note that I haven't tested this change on hardware as I don't
have needed toolchain (GCC 4.4+).

diff --git a/arch/arm/kernel/entry-common.S b/arch/arm/kernel/entry-common.S
index 807cfeb..825db52 100644
--- a/arch/arm/kernel/entry-common.S
+++ b/arch/arm/kernel/entry-common.S
@@ -126,7 +126,7 @@ ENTRY(__gnu_mcount_nc)
 	cmp r0, r2
 	bne gnu_trace
 	ldmia sp!, {r0-r3, ip, lr}
-	bx ip
+	mov pc, ip
 
 gnu_trace:
 	ldr r1, [sp, #20]			@ lr of instrumented routine
@@ -135,7 +135,7 @@ gnu_trace:
 	mov lr, pc
 	mov pc, r2
 	ldmia sp!, {r0-r3, ip, lr}
-	bx ip
+	mov pc, ip
 
 ENTRY(mcount)
 	stmdb sp!, {r0-r3, lr}
-- 
1.6.3.4


--envbJBWh7q8WU6mo--

             reply	other threads:[~2009-09-18 14:29 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-18 14:29 Dmitry Artamonow [this message]
  -- strict thread matches above, loose matches on Subject: below --
2009-09-18 14:55 [PATCH] arm: fix compilation of entry-common.S for older CPUs Dmitry Artamonow
2009-09-18 16:27 ` Uwe Kleine-König
2009-09-28 19:41   ` Dmitry Artamonow
2009-09-28 22:34     ` Russell King - ARM Linux

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=mailman.45.1254166892.2253.linux-arm-kernel@lists.infradead.org \
    --to=mad_soft@inbox.ru \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).