All of lore.kernel.org
 help / color / mirror / Atom feed
From: arnd@arndb.de (Arnd Bergmann)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] ARM: move __fixup_smp out of init section
Date: Tue, 25 Feb 2014 22:10:02 +0100	[thread overview]
Message-ID: <5546770.Bku2iJMdOj@wuerfel> (raw)
In-Reply-To: <CAL_Jsq+8p+p0wuRf9z01EKDcnGA95CmLvrDwDZzVETLe+SqpGg@mail.gmail.com>

On Tuesday 25 February 2014 15:05:01 Rob Herring wrote:
> On Tue, Feb 25, 2014 at 12:32 PM, Arnd Bergmann <arnd@arndb.de> wrote:
> > On Tuesday 25 February 2014 12:16:33 Rob Herring wrote:
> >> From: Rob Herring <robh@kernel.org>
> >>
> >> With large kernel builds such as allyesconfig exceeding maximum relative
> >> branch offsets, the init section will be too far away to branch to
> >> directly. This causes veneers to be added by the compiler, but veneers
> >> don't work before the MMU is enabled. Fix this by moving __fixup_smp to
> >> the .head.text section as it is not very big.
> >>
> >> Signed-off-by: Rob Herring <robh@kernel.org>
> >
> > This looks good to me, but I have some related questions:
> >
> > * I needed to use -mlong-calls for large kernels. Did you manage without?
> 
> Yes, but I started with allyesconfig and then disabled things until it
> would link. This was mainly PCI, various debug, and filesystems. This
> particular failure you don't see until you try to boot.
> 
> I also saw intermittent inconsistent kallsym errors which
> KALLSYMS_EXTRA_PASS=1 did not fix.

Yes, I saw those too. With XIP_KERNEL enabled, I've seen a randconfig case
that needed 12 extra passes before converging. Without that option,
it's much better but there are still cases that need more than 3 passes
and I haven't gotten to the bottom of that. It seems to be the same
configuration that refuses to link at all with ld.gold.

> > * Do you (or anyone) know how to force the use of a veneer? I see a problem
> >   with some driver calling __do_div_asm from IIRC an init section, and that
> >   creates a link error when the kernel gets too big
> 
> That is surprising given that I saw veneers be inserted for some asm
> to asm calls. Maybe it is something I turned off or something to do
> with the types of sections.
> 
> > * If FUNCTION_TRACER is enabled, we get calls from every function using
> >  'bl __gnu_mcount_nc'. Do you think it's possible to fix those?
> 
> Put it in the middle of the image? ;)
> 
> > * Same thing but simpler for svc_preempt calling preempt_schedule_irq
> >   and lookup_processor_type calling __lookup_processor_type. In those
> >   cases I guess we should be able to trivially rewrite the assembly
> >   to jump through an extra register.
> 
> I did see that lookup_processor_type had a veneer in my build.

Strange. Could it be that -mlong-calls turns off veneers?

Which gcc and binutils version do you use?

	Arnd

  reply	other threads:[~2014-02-25 21:10 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-25 18:16 [PATCH] ARM: move __fixup_smp out of init section Rob Herring
2014-02-25 18:32 ` Arnd Bergmann
2014-02-25 21:05   ` Rob Herring
2014-02-25 21:10     ` Arnd Bergmann [this message]
2014-02-25 21:46       ` Rob Herring
2014-02-25 21:56         ` Arnd Bergmann
2014-02-26 12:24 ` Russell King - ARM Linux
2014-02-26 20:56   ` Rob Herring

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=5546770.Bku2iJMdOj@wuerfel \
    --to=arnd@arndb.de \
    --cc=linux-arm-kernel@lists.infradead.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 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.