From: Gary Thomas <gary@mlbassoc.com>
To: Khem Raj <raj.khem@gmail.com>
Cc: Poky Project <poky@yoctoproject.org>
Subject: Re: Bad ARM code with GCC 4.7.1
Date: Thu, 10 May 2012 10:17:31 -0600 [thread overview]
Message-ID: <4FABEA1B.4050901@mlbassoc.com> (raw)
In-Reply-To: <CAMKF1soadVR07jQ_QGBjkc0=UAvCrTHFPu2V3hxf_dNXg4vmEw@mail.gmail.com>
On 2012-05-10 09:46, Khem Raj wrote:
> On Thu, May 10, 2012 at 7:28 AM, Gary Thomas<gary@mlbassoc.com> wrote:
>> After updating to the latest master, I'm running into trouble
>> using GCC 4.7.1 with my ARM kernel(s).
>>
>
> whats your target arm architecture ? and kernel version ?
My board is DM3730, much like a BeagleBoard
ARM architecture: armv7a
Linux kernel 3.0
>
> gcc generate unaligned accesses by default
>
> Does adding -mno-unaligned-access to cflags help ?
I'll check.
>
>> The problem code is in mm/percpu.c - this function [header]
>>
>> static void pcpu_dump_alloc_info(const char *lvl,
>> const struct pcpu_alloc_info *ai)
>> {
>> int group_width = 1, cpu_width = 1, width;
>> char empty_str[] = "--------";
>> int alloc = 0, alloc_end = 0;
>> int group, v;
>> int upa, apl; /* units per alloc, allocs per line */
>>
>> generates this code:
>>
>> 0xc03669d0<pcpu_dump_alloc_info>: ldr r3, [pc, #532] ; 0xc0366bec
>> <pcpu_dump_alloc_info+540>
>> 0xc03669d4<pcpu_dump_alloc_info+4>: push {r4, r5, r6, r7, r8, r9, r10,
>> r11, lr}
>> 0xc03669d8<pcpu_dump_alloc_info+8>: sub sp, sp, #52 ; 0x34
>> 0xc03669dc<pcpu_dump_alloc_info+12>: ldr r2, [r3]
>> 0xc03669e0<pcpu_dump_alloc_info+16>: mov r4, r1
>> 0xc03669e4<pcpu_dump_alloc_info+20>: mov r10, r0
>>
>> which in turn generates an alignment exception at pcpu_dump_alloc_info+12
--
------------------------------------------------------------
Gary Thomas | Consulting for the
MLB Associates | Embedded world
------------------------------------------------------------
next prev parent reply other threads:[~2012-05-10 16:17 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-10 14:28 Bad ARM code with GCC 4.7.1 Gary Thomas
2012-05-10 15:46 ` Khem Raj
2012-05-10 16:17 ` Gary Thomas [this message]
2012-05-10 16:30 ` Khem Raj
2012-05-10 16:49 ` Mark Hatle
2012-05-10 17:00 ` Khem Raj
2012-05-10 17:08 ` Gary Thomas
2012-05-10 20:06 ` Martin Jansa
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=4FABEA1B.4050901@mlbassoc.com \
--to=gary@mlbassoc.com \
--cc=poky@yoctoproject.org \
--cc=raj.khem@gmail.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.