Skip to contentSkip to conversation

powerpc/e500mc: Set assembler machine type to e500mc

PATCH Applied Michael Jeanson 2 participants 2 messages Jun 14, 2018 – Jun 19, 2018

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 powerpc/e500mc: Set assembler machine type to e500mc

In binutils 2.26 a new opcode for the "wait" instruction was added for the POWER9 and has precedence over the one specific to the e500mc. Commit ebf714ff3756 ("powerpc/e500mc: Add support for the wait instruction in e500_idle") uses this instruction specifically on the e500mc to work around an erratum.

This results in an invalid instruction in idle_e500 when we build for the e500mc on bintutils >= 2.26 with the default assembler machine type.

Since multiplatform between e500 and non-e500 is not supported, set the assembler machine type globaly when CONFIG_PPC_E500MC=y.

CC Benjamin Herrenschmidt <[email protected]>
CC Paul Mackerras <[email protected]>
CC Michael Ellerman <[email protected]>
CC Kumar Gala <[email protected]>
CC Vakul Garg <[email protected]>
CC Scott Wood <[email protected]>
CC Mathieu Desnoyers <[email protected]>
---
 arch/powerpc/Makefile | 1 +
 1 file changed, 1 insertion(+)
arch/powerpc/Makefile +1 -0
index 95813df90801..bb2523b4bd8f 100644
@@ -251,6 +251,7 @@ cpu-as-$(CONFIG_4xx)		+= -Wa,-m405
 cpu-as-$(CONFIG_ALTIVEC)	+= $(call as-option,-Wa$(comma)-maltivec)
 cpu-as-$(CONFIG_E200)		+= -Wa,-me200
 cpu-as-$(CONFIG_PPC_BOOK3S_64)	+= -Wa,-mpower4
+cpu-as-$(CONFIG_PPC_E500MC)	+= $(call as-option,-Wa$(comma)-me500mc)
 
 KBUILD_AFLAGS += $(cpu-as-y)
 KBUILD_CFLAGS += $(cpu-as-y)
Signature · 1 line
2.17.1
#1 lore raw
Quoted 12 lines · Michael Jeanson

In binutils 2.26 a new opcode for the "wait" instruction was added for the POWER9 and has precedence over the one specific to the e500mc. Commit ebf714ff3756 ("powerpc/e500mc: Add support for the wait instruction in e500_idle") uses this instruction specifically on the e500mc to work around an erratum.

This results in an invalid instruction in idle_e500 when we build for the e500mc on bintutils >= 2.26 with the default assembler machine type.

Since multiplatform between e500 and non-e500 is not supported, set the assembler machine type globaly when CONFIG_PPC_E500MC=y.

Quoted 12 lines
CC Benjamin Herrenschmidt <[email protected]>
CC Paul Mackerras <[email protected]>
CC Michael Ellerman <[email protected]>
CC Kumar Gala <[email protected]>
CC Vakul Garg <[email protected]>
CC Scott Wood <[email protected]>
CC Mathieu Desnoyers <[email protected]>

Applied to powerpc fixes, thanks.

https://git.kernel.org/powerpc/c/69a8405999aa1c489de4b8d349468f

cheers