* [PATCH] arm: omap2: enable smc instruction for sleep34xx
[not found] <1301581164-26538-1-git-send-email-oskar.andero@sonyericsson.com>
@ 2011-04-18 15:51 ` "Anderö, Oskar"
2011-04-19 8:18 ` Alexander Stevens
0 siblings, 1 reply; 6+ messages in thread
From: "Anderö, Oskar" @ 2011-04-18 15:51 UTC (permalink / raw)
To: linux-arm-kernel
(+ some extra CC's)
> Subject: [PATCH] arm: omap2: enable smc instruction for sleep34xx
>
> This fixes broken build when using gcc 4.5.
>
> Signed-off-by: Oskar Andero <oskar.andero@sonyericsson.com>
> ---
> arch/arm/mach-omap2/Makefile | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-
> omap2/Makefile
> index a45cd64..512b152 100644
> --- a/arch/arm/mach-omap2/Makefile
> +++ b/arch/arm/mach-omap2/Makefile
> @@ -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
> --
> 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
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH] arm: omap2: enable smc instruction for sleep34xx
2011-04-18 15:51 ` [PATCH] arm: omap2: enable smc instruction for sleep34xx "Anderö, Oskar"
@ 2011-04-19 8:18 ` Alexander Stevens
2011-04-19 9:20 ` Dave Martin
0 siblings, 1 reply; 6+ messages in thread
From: Alexander Stevens @ 2011-04-19 8:18 UTC (permalink / raw)
To: linux-arm-kernel
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:
> arch/arm/mach-omap2/sleep34xx.S:150: Error: selected processor does not
support ARM mode `smc #1'
>
> -Oskar
>
I can report that I get the exact same compile error as this.
OP patch worked beautifully.
-Alex
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH] arm: omap2: enable smc instruction for sleep34xx
2011-04-19 8:18 ` Alexander Stevens
@ 2011-04-19 9:20 ` Dave Martin
2011-04-19 10:13 ` "Anderö, Oskar"
0 siblings, 1 reply; 6+ messages in thread
From: Dave Martin @ 2011-04-19 9:20 UTC (permalink / raw)
To: linux-arm-kernel
On Tue, Apr 19, 2011 at 08:18:37AM +0000, Alexander Stevens wrote:
> 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:
> > arch/arm/mach-omap2/sleep34xx.S:150: Error: selected processor does not
> support ARM mode `smc #1'
> >
> > -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
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH] arm: omap2: enable smc instruction for sleep34xx
2011-04-19 9:20 ` Dave Martin
@ 2011-04-19 10:13 ` "Anderö, Oskar"
2011-04-19 10:28 ` Dave Martin
0 siblings, 1 reply; 6+ messages in thread
From: "Anderö, Oskar" @ 2011-04-19 10:13 UTC (permalink / raw)
To: linux-arm-kernel
> > > 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
> > >
> >
> > 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.
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 <john.rigby@linaro.org>
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
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH] arm: omap2: enable smc instruction for sleep34xx
2011-04-19 10:13 ` "Anderö, Oskar"
@ 2011-04-19 10:28 ` Dave Martin
2011-04-19 14:41 ` "Anderö, Oskar"
0 siblings, 1 reply; 6+ messages in thread
From: Dave Martin @ 2011-04-19 10:28 UTC (permalink / raw)
To: linux-arm-kernel
On Tue, Apr 19, 2011 at 12:13:26PM +0200, "Ander?, Oskar" wrote:
> > > > 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
> > > >
> > >
> > > 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.
> 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
>
> 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 <john.rigby@linaro.org>
> 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
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH] arm: omap2: enable smc instruction for sleep34xx
2011-04-19 10:28 ` Dave Martin
@ 2011-04-19 14:41 ` "Anderö, Oskar"
0 siblings, 0 replies; 6+ messages in thread
From: "Anderö, Oskar" @ 2011-04-19 14:41 UTC (permalink / raw)
To: linux-arm-kernel
> On Tue, Apr 19, 2011 at 12:13:26PM +0200, "Ander?, Oskar" wrote:
> > > > > 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
> > > > >
> > > >
> > > > 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.
> > 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.
I will soon resubmit the patch (v2) with a slightly more correct git comment. Please, feel free to review it or ack it. ;)
-Oskar
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2011-04-19 14:41 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <1301581164-26538-1-git-send-email-oskar.andero@sonyericsson.com>
2011-04-18 15:51 ` [PATCH] arm: omap2: enable smc instruction for sleep34xx "Anderö, Oskar"
2011-04-19 8:18 ` Alexander Stevens
2011-04-19 9:20 ` Dave Martin
2011-04-19 10:13 ` "Anderö, Oskar"
2011-04-19 10:28 ` Dave Martin
2011-04-19 14:41 ` "Anderö, Oskar"
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox