Skip to contentSkip to conversation

arch/arm/lib/relocate.S: Remove unreachable code

PATCH New Tom Rini 2 participants 4 messages Mar 18, 2017 Arm (32-bit)

lore
Share & tools
lore

Tom Rini

author
#0 lore raw

PATCH 1/1 arch/arm/lib/relocate.S: Remove unreachable code

We support neither xscale nor ARMv4 at this point in time, so remove this code.

---
 arch/arm/lib/relocate.S | 16 ----------------
 1 file changed, 16 deletions(-)
arch/arm/lib/relocate.S +0 -16
index a6fb07c401d4..54c6c23c2185 100644
@@ -110,22 +110,6 @@ fixnext:
 	blo	fixloop
 
 relocate_done:
-
-#ifdef __XSCALE__
-	/*
-	 * On xscale, icache must be invalidated and write buffers drained,
-	 * even with cache disabled - 4.2.7 of xscale core developer's manual
-	 */
-	mcr	p15, 0, r0, c7, c7, 0	/* invalidate icache */
-	mcr	p15, 0, r0, c7, c10, 4	/* drain write buffer */
-#endif
-
-	/* ARMv4- don't know bx lr but the assembler fails to see that */
-
-#ifdef __ARM_ARCH_4__
-	mov	pc, lr
-#else
 	bx	lr
-#endif
 
 ENDPROC(relocate_code)
Signature · 1 line
1.9.1
author
#1 lore raw

PATCH 1/1 arch/arm/lib/relocate.S: Remove unreachable code

Quoted 24 lines · Tom Rini

We support neither xscale nor ARMv4 at this point in time, so remove this code.

---
 arch/arm/lib/relocate.S | 16 ----------------
 1 file changed, 16 deletions(-)
arch/arm/lib/relocate.S +0 -7
index a6fb07c401d4..54c6c23c2185 100644
@@ -110,22 +110,6 @@ fixnext:
 	blo	fixloop
 
 relocate_done:
-
-#ifdef __XSCALE__
-	/*
-	 * On xscale, icache must be invalidated and write buffers drained,
-	 * even with cache disabled - 4.2.7 of xscale core developer's manual
-	 */
-	mcr	p15, 0, r0, c7, c7, 0	/* invalidate icache */

arch/arm/lib/relocate.S fixnext: · line 129

Quoted 10 lines
arch/arm/lib/relocate.S +0 -9
-	mcr	p15, 0, r0, c7, c10, 4	/* drain write buffer */
-#endif
-
-	/* ARMv4- don't know bx lr but the assembler fails to see that */
-
-#ifdef __ARM_ARCH_4__
-	mov	pc, lr
-#else
 	bx	lr
-#endif

Actually, sorry, I need to NAK this myself as we do set __ARM_ARCH_4__ it's just that wrt that thumb case where we could clarify the v5-related thumb parts.

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170317/7cb4515d/attachment.sig>
#2 lore raw

PATCH 1/1 arch/arm/lib/relocate.S: Remove unreachable code

Hi, Tom

Quoted 2 lines

We support neither xscale nor ARMv4 at this point in time, so remove this code.

AFAIR, compiler sets __XSCALE__ when one specifies -mcpu=xscale option. This option is currently set by CONFIG_CPU_PXA and there are boards in U-Boot that are based on PXA CPU and depends on this config items. Are there plans to drop them all?

Cheers, Alex.

author
#3 lore raw

PATCH 1/1 arch/arm/lib/relocate.S: Remove unreachable code

Quoted 8 lines · Alex Sadovsky

Hi, Tom

Quoted 2 lines

We support neither xscale nor ARMv4 at this point in time, so remove this code.

AFAIR, compiler sets __XSCALE__ when one specifies -mcpu=xscale option. This option is currently set by CONFIG_CPU_PXA and there are boards in U-Boot that are based on PXA CPU and depends on this config items. Are there plans to drop them all?

No, I just made a mistake here without looking hard enough.

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170318/9793e935/attachment.sig>