From: Khem Raj <raj.khem@gmail.com>
To: openembedded-devel@lists.openembedded.org
Subject: Re: minimal{, -uclibc}: linux-omap-psp_2.6.32: task `do_compileconfigs` fails
Date: Sat, 12 Feb 2011 16:26:48 -0800 [thread overview]
Message-ID: <20110213002648.GA6178@gmail.com> (raw)
In-Reply-To: <1297437306.3785.39.camel@mattotaupa>
[-- Attachment #1: Type: text/plain, Size: 2710 bytes --]
On (11/02/11 16:15), Paul Menzel wrote:
> Am Montag, den 20.12.2010, 10:39 -0800 schrieb Khem Raj:
> > On Mon, Dec 20, 2010 at 7:42 AM, Paul Menzel wrote:
> > > Am Samstag, den 18.12.2010, 22:46 -0800 schrieb Khem Raj:
> > >> On Sat, Dec 18, 2010 at 2:24 AM, Eric Bénard <eric@eukrea.com> wrote:
> > >
> > >> > On 18/12/2010 11:10, Paul Menzel wrote:
> > >> >>
> > >> >> Error: selected processor does not support ARM mode `smc #0'
> > >> >
> > >> > this seems to be a known problem with gcc 4.5 :
> > >> > https://bugs.launchpad.net/ubuntu/+source/gcc-4.5/+bug/669912
> > >>
> > >> Its not a gcc problem to clarify. Its just that older compilers did
> > >> not differentiate security extentions presence.
> > >> http://kernel.ubuntu.com/git?p=ubuntu/ubuntu-natty.git;a=commitdiff;h=1ebe13dea156358f1044a7a755f02945ad3890e4;hp=f31ff7673ef77d04e74e1a1e45bb2940781f35f0
> > >>
> > >> http://kernel.ubuntu.com/git?p=ubuntu/ubuntu-natty.git;a=commitdiff;h=99340d7b23f3df75d9b752fb25088a10064cd0a6;hp=9523bd6810e0229a8147e8c3d6498e2f40b38974
> > >>
> > >> are the fixes you should apply to kernel.
> > >
> > > I just wanted to add that `linux-omap-psp_2.6.32` builds fine with
> > > `angstrom-2010.x` (without the above mentioned patches) which uses the
> > > following toolchain.
> > >
> > > conf/distro/angstrom-2010.x.conf:ANGSTROM_GCC_VERSION ?= "4.5"
> > > conf/distro/angstrom-2010.x.conf:ANGSTROM_BINUTILS_VERSION ?= "2.20.1"
> >
> > yes it will work with binutils < 2.21 the patch I previously implied
> > is in assembler.
>
> Víctor committed these patches in 4f24435f [1] for
> `linux-omap4_2.6.35.3.bb`. I tried to backport these patches to
> `linux-omap-psp_2.6.32.bb` but I am not successful. A lot seems to have
> changed between Linux 2.6.32 and 2.6.35.
>
> After the adaptations to `arch/arm/mach-omap2/Makefile` I am now getting
> the next error message.
>
> | LDS arch/arm/kernel/vmlinux.lds
> | /tmp/ccpCEAjJ.s: Assembler messages:
> | /tmp/ccpCEAjJ.s:306: Error: selected processor does not support ARM mode `smc #0'
> | /tmp/ccpCEAjJ.s:346: Error: selected processor does not support ARM mode `smc #0'
>
> But I do not know how to adapt that. Is there an easier way to configure
> these security extensions?
yes there are cases where its used in inline assembly and compiler does not
have knob for security extentions. Here is one patch that will work with
binutils >= 2.21 but be away that it will NOT work with older binutils and
infact will render kernel uncompilable if you are not using binutils
atleast at version 2.21
Enjoy
-Khem
[-- Attachment #2: ARM-add-sec-attribute-to-inline-asm.patch --]
[-- Type: text/x-diff, Size: 1421 bytes --]
Compiling with binutils 2.21 needs to have this sec arch_extention
gcc does not know march=armv7-a+sec and if we use -Wa,-march=armv7-a+sec
then assembler does not honor it because march=armv7-a when specfied to
gcc driver adds march=armv7-a *before* -Wa,-march=armv7-a+sec when calling
assembler. There is no way getting around that :(
So what do we do ? We take the fight to the beast
We add the .arch_extention where its added in inline
assembly.
This file is added by one of local OE patches these patches are not
(upstream _yet_ or discarded) dont know
-Khem
Index: git/arch/arm/kernel/sysfs_v7.c
===================================================================
--- git.orig/arch/arm/kernel/sysfs_v7.c
+++ git/arch/arm/kernel/sysfs_v7.c
@@ -76,7 +76,8 @@ static ssize_t aux_ctl_store(struct sys_
asm ("mrc p15, 0, %0, c1, c0, 1" : "=r"(val));
SETBITS(val, 0xff8, new);
val &= ~2;
- asm ("mov r0, %0 \n\t"
+ asm (".arch_extension sec\n\t"
+ "mov r0, %0 \n\t"
"mov r12, #3 \n\t"
"smc #0 \n\t"
:: "r"(val) : "r0", "r12");
@@ -107,7 +108,8 @@ static ssize_t l2_aux_ctl_store(struct s
asm ("mrc p15, 1, %0, c9, c0, 2" : "=r"(val));
SETBITS(val, 0xbc00000, new);
- asm ("mov r0, %0 \n\t"
+ asm (".arch_extension sec\n\t"
+ "mov r0, %0 \n\t"
"mov r12, #2 \n\t"
"smc #0 \n\t"
:: "r"(val) : "r0", "r12");
prev parent reply other threads:[~2011-02-13 0:28 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-12-18 10:10 minimal{, -uclibc}: linux-omap-psp_2.6.32: task `do_compileconfigs` fails Paul Menzel
2010-12-18 10:24 ` Eric Bénard
2010-12-19 6:46 ` Khem Raj
2010-12-20 15:42 ` Paul Menzel
2010-12-20 18:39 ` Khem Raj
2011-02-11 15:15 ` Paul Menzel
2011-02-13 0:26 ` Khem Raj [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20110213002648.GA6178@gmail.com \
--to=raj.khem@gmail.com \
--cc=openembedded-devel@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox