From: Andre Schwarz <andre.schwarz@matrix-vision.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] show_boot_progess @ ppc not working
Date: Wed, 10 Dec 2008 12:04:10 +0100 [thread overview]
Message-ID: <493FA22A.7010808@matrix-vision.de> (raw)
In-Reply-To: <493FA0BC.9030900@gmail.com>
Graeme Russ schrieb:
> Hi All,
>
> I had some 'fun' with weak functions a little while ago, and I'm wondering
> if maybe we should fix up a few inconsistencies...
>
> Andre Schwarz wrote:
>
>> Heiko Schocher schrieb:
>>
>>> Hello Andre,
>>>
>>> Andre Schwarz wrote:
>>>
>>>
>>>> All,
>>>>
>>>> can someone tell me why the board specific function "void
>>>> show_boot_progress(int arg)"
>>>> is no longer called (at least on MPC5200).
>>>>
>
> <snip>
>
>
>>> Can you try the following patch? (This patch solved it
>>> on my boards ...)
>>>
>>>
>
> <snip>
>
>
>>> -void __attribute__((weak)) show_boot_progress (int val);
>>> +void show_boot_progress (int val);
>>>
>
> This makes show_boot_progress () consistent with nearly every other weak
> function (see below)
>
> Interesting that this is the only function defined weak in this way. All
> other weak functions are defined normally (no attributes) and then declared
> weak with an alias. Good examples can be found in /include/status_led.h
> lines 391-396 and /lib_arm/board.c lines 125-138
>
> <snip>
>
>
>> Heiko,
>>
>> of course this patch makes it work again.
>>
>
> This patch leaves only a handful of inconsistent weak functions:
>
> /include/asm-avr32/arch-at32ap700x/clk.h line 85:
>
> extern void gclk_init(void) __attribute__((weak));
>
> But this is not designed to be overridable - It is designed to not require
> a declaration - See /cpu/at32ap/cpu.c lines 68-69:
>
> if(gclk_init)
> gclk_init();
>
> /common/cmd_boot.c lines 32-36: (/common/cmd_elf.c lines 31-54 and
> /cpu/mips/cpu.c lines 41-43 are same semantics)
>
> __attribute__((weak))
> unsigned long do_go_exec (ulong (*entry)(int, char *[]), int argc, char
> *argv[])
> {
> return entry (argc, argv);
> }
>
> <snip>
>
>
>> But the question is : Why is this specific weak function not replaced by
>> the board specific one ?
>>
>
> Good question - maybe because this function is inlined? (just a wild guess)
> - could be any of a number of reasons as far as I can tell.
>
>
>> This gives me some pain when looking at the other weak functions....
>>
>
> Is there any reason _not_ to fix up these last four weak functions so that
> all weak functions are defined and declared the same way? I can do up a
> patch if the consensus is to make them consistent.
>
>
Please send a proper patch with explanation.
Since I can not explain this effect 100% I'm not able to fix it.
> Regards,
>
> Graeme
>
MATRIX VISION GmbH, Talstra?e 16, DE-71570 Oppenweiler - Registergericht: Amtsgericht Stuttgart, HRB 271090
Gesch?ftsf?hrer: Gerhard Thullner, Werner Armingeon, Uwe Furtner
next prev parent reply other threads:[~2008-12-10 11:04 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-12-09 11:00 [U-Boot] show_boot_progess @ ppc not working Andre Schwarz
2008-12-09 11:21 ` Heiko Schocher
2008-12-09 11:24 ` Andre Schwarz
2008-12-10 7:27 ` Heiko Schocher
2008-12-10 9:56 ` Andre Schwarz
2008-12-10 10:58 ` Graeme Russ
2008-12-10 11:04 ` Andre Schwarz [this message]
2009-06-22 9:57 ` André Schwarz
2009-06-28 9:09 ` Heiko Schocher
2009-06-29 8:16 ` André Schwarz
2009-06-29 10:16 ` Heiko Schocher
2009-07-04 22:29 ` Wolfgang Denk
2009-07-05 7:05 ` Heiko Schocher
2009-07-08 19:39 ` Wolfgang Denk
2009-07-09 5:27 ` Heiko Schocher
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=493FA22A.7010808@matrix-vision.de \
--to=andre.schwarz@matrix-vision.de \
--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