arm: fix compilation of entry-common.S for older CPUs
PATCH 1/1 arm: fix compilation of entry-common.S for older CPUs
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'.
--- 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+).
arch/arm/kernel/entry-common.S +2 -2
@@ -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}
Signature · 1 line
1.6.3.4
PATCH 1/1 arm: fix compilation of entry-common.S for older CPUs
Hello,
Quoted 11 lines · Dmitry Artamonow
Commit
181f817eaaca4c1fintroduced some new code toentry-common.SSadly, 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'
Quoted 3 lines
Fix these errors by using 'mov pc' instead of 'bx'.
Signed-off-by Dmitry Artamonow <[email protected]>
I wonder if newer glibc's have the same problem as the code is taken more or less from there ...
Thanks
Uwe
Signature · 2 lines
Pengutronix e.K. | Uwe Kleine-K?nig | Industrial Linux Solutions | http://www.pengutronix.de/ |
PATCH 1/1 arm: fix compilation of entry-common.S for older CPUs
Quoted 16 lines · Uwe Kleine-K?nig
Hello,
Quoted 13 lines · Dmitry Artamonow
Commit
181f817eaaca4c1fintroduced some new code toentry-common.SSadly, 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'.
Quoted 8 lines
Quoted 1 line
Signed-off-by Dmitry Artamonow <[email protected]>Acked-by Uwe Kleine-K?nig <[email protected]>I wonder if newer glibc's have the same problem as the code is taken more or less from there ...
Thanks
Uwe
Russell, are you ok with this fix? Should I submit patch to your patch tracker?
(It seems that first time around patch didn't get through to you, due to your server being picky about SMTP servers without matching reverse DNS, so in case you haven't seen the patch on the list, I'm attaching it here again)
Signature · 2 lines
Best regards, Dmitry "MAD" Artamonow
PATCH 1/1 arm: fix compilation of entry-common.S for older CPUs
Quoted 2 lines · Dmitry Artamonow
Russell, are you ok with this fix? Should I submit patch to your patch tracker?
Yes please.