From: Albert ARIBAUD <albert.u.boot@aribaud.net>
To: u-boot@lists.denx.de
Subject: [U-Boot] [RFC] ARM ISA/cpu/SoC code organization for cache and other functions
Date: Tue, 18 Oct 2011 20:50:42 +0200 [thread overview]
Message-ID: <4E9DCA82.9070401@aribaud.net> (raw)
In-Reply-To: <201110140043.06763.vapier@gentoo.org>
Le 14/10/2011 06:43, Mike Frysinger a ?crit :
> On Thursday 15 September 2011 17:42:12 Albert ARIBAUD wrote:
>> The object files shall be linked in decreasing precedence order, i.e.
>> SoC file first, then cpu file, then isa file, then lib last, so that for
>> each cache op, the weak symbol mechanism uses the most specific one.
>
> as long as the weak symbols don't cause a pain in terms of making sure the
> right one is selected. having one depth of weak and strong is fine, but two
> deep sounds like it could be fragile.
I did some checks, and the symbol take is always the first one met by
the linker.
> i wonder if cascading aliases would work ? that way each symbol only has one
> weak/strong pair to deal with. hopefully it's not too confusing ?
>
>> (isa) (cpu) SoC)
>> arch/arm
>> /armv5t/
>> cache-ops.c
>
> __weak void arm_isa_icache_flush(...) { ... }
> void icache_flush(...) __attribute__((alias("arm_isa_icache_flush")));
>
>> arm926ejs/
>> cache-ops.c
>
> __weak void arm_cpu_icache_flush(...) { ... }
> void arm_isa_icache_flush(...) __attribute__((alias("arm_cpu_icache_flush")));
>
>> orion5x/
>> cache-ops.c
>
> void arm_soc_icache_flush(...) { ... }
> void arm_cpu_icache_flush(...) __attribute__((alias("arm_soc_icache_flush")));
> -mike
How would priority order work?
Amicalement,
--
Albert.
prev parent reply other threads:[~2011-10-18 18:50 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-15 21:42 [U-Boot] [RFC] ARM ISA/cpu/SoC code organization for cache and other functions Albert ARIBAUD
2011-09-15 23:10 ` Jason
2011-09-15 23:18 ` Jason
2011-09-16 17:24 ` Albert ARIBAUD
2011-10-14 4:43 ` Mike Frysinger
2011-10-18 18:50 ` Albert ARIBAUD [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=4E9DCA82.9070401@aribaud.net \
--to=albert.u.boot@aribaud.net \
--cc=u-boot@lists.denx.de \
/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