Skip to contentSkip to conversation

arm: omap2: enable smc instruction for sleep34xx

PATCH In review [email protected] 3 participants 7 messages Mar 31, 2011 – Apr 19, 2011

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

PATCH 1/1 arm: omap2: enable smc instruction for sleep34xx

This fixes broken build when using gcc 4.5.

---
 arch/arm/mach-omap2/Makefile |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
arch/arm/mach-omap2/Makefile +1 -1
index a45cd64..512b152 100644
@@ -68,7 +68,7 @@ obj-$(CONFIG_OMAP_SMARTREFLEX)          += sr_device.o smartreflex.o
 obj-$(CONFIG_OMAP_SMARTREFLEX_CLASS3)	+= smartreflex-class3.o
 
 AFLAGS_sleep24xx.o			:=-Wa,-march=armv6
-AFLAGS_sleep34xx.o			:=-Wa,-march=armv7-a
+AFLAGS_sleep34xx.o			:=-Wa,-march=armv7-a$(plus_sec)
 
 ifeq ($(CONFIG_PM_VERBOSE),y)
 CFLAGS_pm_bus.o				+= -DDEBUG
Signature · 1 line
1.7.3.4
#1 lore raw

(+ some extra CC's)

Quoted 23 lines

Subject: [PATCH] arm: omap2: enable smc instruction for sleep34xx

This fixes broken build when using gcc 4.5.

---
 arch/arm/mach-omap2/Makefile |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
arch/arm/mach- renamed from arch/arm/mach-omap2/Makefile +0 -0

omap2/Makefile
index a45cd64..512b152 100644

arch/arm/mach-omap2/Makefile +0 -0
@@ -68,7 +68,7 @@ obj-$(CONFIG_OMAP_SMARTREFLEX)          +=

sr_device.o smartreflex.o
obj-$(CONFIG_OMAP_SMARTREFLEX_CLASS3) += smartreflex-class3.o

AFLAGS_sleep24xx.o :=-Wa,-march=armv6

arch/arm/mach-omap2/Makefile +1 -1
-AFLAGS_sleep34xx.o			:=-Wa,-march=armv7-a
+AFLAGS_sleep34xx.o			:=-Wa,-march=armv7-

a$(plus_sec)

Quoted 4 lines

ifeq ($(CONFIG_PM_VERBOSE),y)
CFLAGS_pm_bus.o += -DDEBUG
--
1.7.3.4

Ping!

Anyone else that gets bitten by the following when compiling omap2plus_defconfig with gcc 4.5:
arch/arm/mach-omap2/sleep34xx.S:150: Error: selected processor does not support ARM mode `smc #1'

-Oskar

#2 lore raw

PATCH 1/1 arm: omap2: enable smc instruction for sleep34xx

Quoted 4 lines · Ander?, Oskar <Oskar.Andero <at> sonyericsson.com> writes:

Ping!

Anyone else that gets bitten by the following when compiling

omap2plus_defconfig with gcc 4.5:

Quoted 1 line

arch/arm/mach-omap2/sleep34xx.S:150: Error: selected processor does not

support ARM mode `smc #1'

Quoted 3 lines

-Oskar

I can report that I get the exact same compile error as this. OP patch worked beautifully.

-Alex

#3 lore raw

PATCH 1/1 arm: omap2: enable smc instruction for sleep34xx

Quoted 10 lines · Alexander Stevens
Quoted 4 lines · Ander?, Oskar <Oskar.Andero <at> sonyericsson.com> writes:

Ping!

Anyone else that gets bitten by the following when compiling

omap2plus_defconfig with gcc 4.5:

Quoted 1 line

arch/arm/mach-omap2/sleep34xx.S:150: Error: selected processor does not

support ARM mode `smc #1'

Quoted 1 line
Quoted 7 lines
Quoted 2 lines

-Oskar

I can report that I get the exact same compile error as this. OP patch worked beautifully.

-Alex

Can you check what options are being passed to the compiler and the assembler, and check for .arch / .arch_extension directives in the assembler input?

i.e.,

make V=1 CFLAGS_KERNEL='-v -save-temps' arch/arm/mach-omap2/sleep34xx.o

...and look at the output and the generated sleep34xx.s

Maybe the options being passed to the compiler/assembler are wrong somewhere along the line.

---Dave

#4 lore raw

PATCH 1/1 arm: omap2: enable smc instruction for sleep34xx

Quoted 20 lines
Quoted 5 lines
Quoted 3 lines

Ping!

Anyone else that gets bitten by the following when compiling

omap2plus_defconfig with gcc 4.5:

Quoted 1 line

arch/arm/mach-omap2/sleep34xx.S:150: Error: selected processor does

not

Quoted 9 lines

support ARM mode `smc #1'

Quoted 3 lines

-Oskar

I can report that I get the exact same compile error as this. OP patch worked beautifully.

-Alex

Can you check what options are being passed to the compiler and the assembler, and check for .arch / .arch_extension directives in the assembler input?

Quoted 8 lines

i.e.,

make V=1 CFLAGS_KERNEL='-v -save-temps' arch/arm/mach-omap2/sleep34xx.o

...and look at the output and the generated sleep34xx.s

Maybe the options being passed to the compiler/assembler are wrong somewhere along the line.

Yes, the "+sec" extension of armv7-a (i.e. -march=armv7-a+sec) is missing and hence the smc instruction can't be used. This is what my patch fixes. I guess earlier versions of binutils silently ignored this.

It's not visible in my patch, but plus_sec is declared as:
plus_sec := $(call as-instr,.arch_extension sec,+sec)

The following patch added the same extension for some of the other files, but I guess sleep34xx.S was missed or maybe added later:
commit fe297dde5ae8f8bf67d3a87759289a99b48ecb2c

Author: John Rigby <[email protected]>
Date:   Wed Dec 1 05:57:51 2010 +0000

OMAP4: enable smc instruction in new assembler versions

New assemblers need -march=armv7-a+sec on command line or .arch_extension sec inline to enable use of the smc instruction.
<snip>

-Oskar

#5 lore raw

PATCH 1/1 arm: omap2: enable smc instruction for sleep34xx

Quoted 24 lines · Oskar
Quoted 24 lines
Quoted 5 lines
Quoted 3 lines

Ping!

Anyone else that gets bitten by the following when compiling

omap2plus_defconfig with gcc 4.5:

Quoted 1 line

arch/arm/mach-omap2/sleep34xx.S:150: Error: selected processor does

not

Quoted 9 lines

support ARM mode `smc #1'

Quoted 3 lines

-Oskar

I can report that I get the exact same compile error as this. OP patch worked beautifully.

-Alex

Can you check what options are being passed to the compiler and the assembler, and check for .arch / .arch_extension directives in the assembler input?

i.e.,

make V=1 CFLAGS_KERNEL='-v -save-temps' arch/arm/mach-omap2/sleep34xx.o

Quoted 8 lines
Quoted 4 lines

...and look at the output and the generated sleep34xx.s

Maybe the options being passed to the compiler/assembler are wrong somewhere along the line.

Yes, the "+sec" extension of armv7-a (i.e. -march=armv7-a+sec) is missing and hence the smc instruction can't be used. This is what my patch fixes. I guess earlier versions of binutils silently ignored this.

It's not visible in my patch, but plus_sec is declared as:
plus_sec := $(call as-instr,.arch_extension sec,+sec)

Ah right, I was slightly confused by the context.

You're right -- sleep34xx.S also needs this change in the Makefile, as per your patch. This isn't new; the original patch focused on omap4, so I guess this file was just missed.

Cheers
---Dave

Quoted 13 lines

The following patch added the same extension for some of the other files, but I guess sleep34xx.S was missed or maybe added later:
commit fe297dde5ae8f8bf67d3a87759289a99b48ecb2c

Author: John Rigby <[email protected]>
Date:   Wed Dec 1 05:57:51 2010 +0000

OMAP4: enable smc instruction in new assembler versions

New assemblers need -march=armv7-a+sec on command line or .arch_extension sec inline to enable use of the smc instruction.
<snip>

-Oskar

#6 lore raw

PATCH 1/1 arm: omap2: enable smc instruction for sleep34xx

Quoted 35 lines · Oskar
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 3 lines

Ping!

Anyone else that gets bitten by the following when compiling

omap2plus_defconfig with gcc 4.5:

Quoted 1 line

arch/arm/mach-omap2/sleep34xx.S:150: Error: selected processor

does

Quoted 11 lines
Quoted 11 lines

not

Quoted 9 lines

support ARM mode `smc #1'

Quoted 3 lines

-Oskar

I can report that I get the exact same compile error as this. OP patch worked beautifully.

-Alex

Quoted 7 lines
Quoted 7 lines

Can you check what options are being passed to the compiler and the assembler, and check for .arch / .arch_extension directives in the assembler input?

i.e.,

make V=1 CFLAGS_KERNEL='-v -save-temps' arch/arm/mach-

omap2/sleep34xx.o

Quoted 6 lines
Quoted 5 lines

...and look at the output and the generated sleep34xx.s

Maybe the options being passed to the compiler/assembler are wrong somewhere along the line.

Yes, the "+sec" extension of armv7-a (i.e. -march=armv7-a+sec) is

missing and hence the smc instruction can't be used. This is what my patch fixes. I guess earlier versions of binutils silently ignored this.

Quoted 1 line
Quoted 8 lines
Quoted 2 lines

It's not visible in my patch, but plus_sec is declared as:
plus_sec := $(call as-instr,.arch_extension sec,+sec)

Ah right, I was slightly confused by the context.

You're right -- sleep34xx.S also needs this change in the Makefile, as per your patch. This isn't new; the original patch focused on omap4, so I guess this file was just missed.

I will soon resubmit the patch (v2) with a slightly more correct git comment. Please, feel free to review it or ack it. ;)

-Oskar