multiple smc-related failures using linaro-gcc-4.5 to compile linaro-linux-2.6.36-38

Bug #732148 reported by AJ ONeal
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Linaro
Invalid
Undecided
Unassigned

Bug Description

Install the linaro 4.5 toolchain: https://wiki.linaro.org/Mentoring/ToolchainInstall

Git the latest kernel(s)

  * git://git.linaro.org/kernel/linux-linaro-2.6.36.git
  * git://git.linaro.org/kernel/linux-linaro-2.6.37.git

Compile a clean kernel

make mrproper
make omap2plus_defconfig
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- uImage

watch it fail

2.6.36
  AS arch/arm/mach-omap2/omap-headsmp.o
arch/arm/mach-omap2/omap-headsmp.S: Assembler messages:
arch/arm/mach-omap2/omap-headsmp.S:36: Error: selected processor does not support ARM mode `smc #0'

2.6.37
Similar error with sleep34xx.S
patch: http://paste.ubuntu.com/577940/

Revision history for this message
Steve Langasek (vorlon) wrote : Re: [Bug 732148] [NEW] multiple smc-related failures using linaro-gcc-4.5 to compile linaro-linux-2.6.36-38

On Wed, Mar 09, 2011 at 05:44:52PM -0000, AJ ONeal wrote:
> Public bug reported:

> Install the linaro 4.5 toolchain:
> https://wiki.linaro.org/Mentoring/ToolchainInstall

> Git the latest kernel(s)

> * git://git.linaro.org/kernel/linux-linaro-2.6.36.git
> * git://git.linaro.org/kernel/linux-linaro-2.6.37.git

These are not the latest kernels. The latest kernel is
git://git.linaro.org/kernel/linux-linaro-2.6.38.git (for the stable 11.05
branch), or git://git.linaro.org/kernel/linux-linaro-next.git (for
forward-looking development).

> make mrproper
> make omap2plus_defconfig
> make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- uImage

> watch it fail

> 2.6.36
> AS arch/arm/mach-omap2/omap-headsmp.o
> arch/arm/mach-omap2/omap-headsmp.S: Assembler messages:
> arch/arm/mach-omap2/omap-headsmp.S:36: Error: selected processor does not support ARM mode `smc #0'

Yes, this is because the compiler is being told to build for a processor
target that does not implicitly support the security extensions. I believe
you'll find that this is fixed in the 2.6.38 kernel.

--
Steve Langasek Give me a lever long enough and a Free OS
Debian Developer to set it on, and I can move the world.
Ubuntu Developer http://www.debian.org/
<email address hidden> <email address hidden>

Changed in linaro:
status: New → Invalid
Revision history for this message
John Rigby (jcrigby) wrote :

The first smc problems were in omap-headsmp.S and omap44xx-smc.S and were fixed in upstream commit:

commit fe297dde5ae8f8bf67d3a87759289a99b48ecb2c
Author: John Rigby <email address hidden>
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.

    This patch uses as-instr to check the latter to conditionally
    enable the former in AFLAGS for files that use smc.

    Checked on both old and new binutils to verify that it does
    not break old versions.

    Signed-off-by: John Rigby <email address hidden>
    Signed-off-by: Tony Lindgren <email address hidden>

A new smc error was introduced by this commit in linux-linaro-2.6.38:

commit 2fcb88c541cf98b87a38a0f27b641663aded8802
Author: Dave Martin <email address hidden>
Date: Fri Jan 28 17:19:26 2011 +0000

    ARM: omap3: Work around assembler errors in sleep34xx.S

    In rare cases, gas is unable to fix up references to global symbols
    in the same object when building for Thumb-2.

    This patch provides a dirty temporary workaround and shouldn't
    be merged upstream.

    The issue affects at least ubuntu/linaro binutils
    (2.20.51.20100908-0ubuntu2) and binutils upstream.

    Allegedly, there's a fix in the pipeline.

    Signed-off-by: Dave Martin <email address hidden>

This can be fixed by:

diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile
index 898fffe..1d2d1f6 100644
--- a/arch/arm/mach-omap2/Makefile
+++ b/arch/arm/mach-omap2/Makefile
@@ -71,7 +71,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)

I'll send this upstream.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.