Skip to contentSkip to conversation

MIPS: fix genex.S build for non MIPS32r2 class processors

PATCH In review Florian Fainelli 2 participants 2 messages Oct 25, 2013 – Oct 28, 2013 MIPS

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 MIPS: fix genex.S build for non MIPS32r2 class processors

Commit d712357d ("MIPS: Print correct PC in trace dump after NMI exception") introduced assembly code which uses the "ehb" instruction, which is only available in MIPS32r2 class processors and causes such build errors on MIPS32r1 processors:

AS arch/mips/kernel/genex.o
arch/mips/kernel/genex.S: Assembler messages:
arch/mips/kernel/genex.S:386: Error: opcode not supported on this
processor: mips32 (mips32) `ehb'
make[2]: *** [arch/mips/kernel/genex.o] Error 1 make[1]: *** [arch/mips/kernel] Error 2
make[1]: *** Waiting for unfinished jobs....

Use _ehb which properly substitutes to a nop or a real ehb depending on the processor we are building for.

---
 arch/mips/kernel/genex.S | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/mips/kernel/genex.S +1 -1
index 72853aa..47d7583 100644
@@ -383,7 +383,7 @@ NESTED(nmi_handler, PT_SIZE, sp)
 	li	k1, ~(ST0_BEV | ST0_ERL)
 	and     k0, k0, k1
 	mtc0    k0, CP0_STATUS
-	ehb
+	_ehb
 	SAVE_ALL
 	move	a0, sp
 	jal	nmi_exception_handler
Signature · 1 line
1.8.3.2
Reviewed-by on v1 1/1
#1 lore raw
Quoted 13 lines · Florian Fainelli

Commit d712357d ("MIPS: Print correct PC in trace dump after NMI exception") introduced assembly code which uses the "ehb" instruction, which is only available in MIPS32r2 class processors and causes such build errors on MIPS32r1 processors:

AS arch/mips/kernel/genex.o
arch/mips/kernel/genex.S: Assembler messages:
arch/mips/kernel/genex.S:386: Error: opcode not supported on this
processor: mips32 (mips32) `ehb'
make[2]: *** [arch/mips/kernel/genex.o] Error 1 make[1]: *** [arch/mips/kernel] Error 2
make[1]: *** Waiting for unfinished jobs....

Quoted 5 lines

Use _ehb which properly substitutes to a nop or a real ehb depending on the processor we are building for.

---

Yep that looks good to me. Thanks for fixing it

Signature · 1 line
markos