All of lore.kernel.org
 help / color / mirror / Atom feed
From: Simon Glass <sjg@chromium.org>
To: u-boot@lists.denx.de
Subject: [U-Boot] [RFC PATCH v2 15/15] bootstage: arm: Add bootstage calls in board and bootm
Date: Wed, 11 Jan 2012 21:38:13 -0800	[thread overview]
Message-ID: <CAPnjgZ2L-ZVZjjY1swMLjzpngxUUDD0GnQ6wSkL233DHWLRXmQ@mail.gmail.com> (raw)
In-Reply-To: <201201091232.00028.vapier@gentoo.org>

Hi Mike,

On Mon, Jan 9, 2012 at 9:31 AM, Mike Frysinger <vapier@gentoo.org> wrote:
> On Sunday 08 January 2012 18:48:18 Simon Glass wrote:
>> On Sun, Jan 8, 2012 at 11:58 AM, Mike Frysinger wrote:
>> > On Sunday 08 January 2012 12:43:09 Simon Glass wrote:
>> >> On Sun, Jan 8, 2012 at 12:36 AM, Mike Frysinger wrote:
>> >> > On Saturday 10 December 2011 16:08:07 Simon Glass wrote:
>> >> >> --- a/arch/arm/lib/bootm.c
>> >> >> +++ b/arch/arm/lib/bootm.c
>> >> >>
>> >> >> ?static void announce_and_cleanup(void)
>> >> >> ?{
>> >> >> ? ? ? printf("\nStarting kernel ...\n\n");
>> >> >> + ? ? bootstage_mark_name(BOOTSTAGE_ID_BOOTM_HANDOFF,
>> >> >> "start_kernel"); +#ifdef CONFIG_BOOTSTAGE_REPORT
>> >> >> + ? ? bootstage_report();
>> >> >> +#endif
>> >> >
>> >> > shouldn't the header make bootstage_report() into a stub when
>> >> > CONFIG_BOOTSTAGE_REPORT isn't defined ? ?then you won't need the ifdef
>> >> > protection here.
>> >>
>> >> Well maybe. I am hoping for a link error if someone calls it without
>> >> defining that CONFIG. Otherwise it could be very confusing for people
>> >> that they can't get a report!
>> >
>> > i'm not sure we need worry about that
>>
>> I have had another look at this. The idea is that anyone can call
>> bootstage_report() to get a report, but if they define
>> CONFIG_BOOTSTAGE_REPORT then one is printing automatically by U-Boot
>> just before jumping to the kernel.
>>
>> So I don't want this define to remove the ability to print a report,
>> just to enable printing a report at a time which is hopefully
>> suitable.
>>
>> Does that make sense?
>
> ok, so we have:
> #ifdef CONFIG_BOOTSTAGE
> extern void bootstage_report(void);
> #else
> #define bootstage_report()
> #endif
>
> and CONFIG_BOOTSTAGE_REPORT controls the automatic calls to the report func
>
> is the arm-specific bootm hooks the best place for this ? ?wouldn't putting
> this into the common bootm code be better ?

Well the intent is to do this at the last moment. I actually have a
patch which does a 'fake' run through all the bootm code and does the
report after that, so we see everything that is happening before we
settle on and print out our timings.

announce_and_cleanup() is about as close to the end as I can get :-)

Regards,
Simon


> -mike

  reply	other threads:[~2012-01-12  5:38 UTC|newest]

Thread overview: 46+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-10 21:07 [U-Boot] [RFC PATCH v2 0/15] bootstage: record and publish boot progress timing Simon Glass
2011-12-10 21:07 ` [U-Boot] [RFC PATCH v2 01/15] bootstage: Create an initial header for boot progress integers Simon Glass
2012-01-08  8:26   ` Mike Frysinger
2012-01-08 17:22     ` Simon Glass
2012-01-08 19:46       ` Mike Frysinger
2012-01-08 23:43         ` Simon Glass
2011-12-10 21:07 ` [U-Boot] [RFC PATCH v2 02/15] bootstage: Make use of BOOTSTAGE_ID_RUN_OS in show_boot_progress() Simon Glass
2012-01-08  8:26   ` Mike Frysinger
2011-12-10 21:07 ` [U-Boot] [RFC PATCH v2 03/15] bootstage: Use show_boot_error() for -ve progress numbers Simon Glass
2012-01-08  8:27   ` Mike Frysinger
2011-12-10 21:07 ` [U-Boot] [RFC PATCH v2 04/15] bootstage: Convert progress numbers 1-9 into enums Simon Glass
2012-01-08  8:27   ` Mike Frysinger
2012-01-08 17:27     ` Simon Glass
2011-12-10 21:07 ` [U-Boot] [RFC PATCH v2 05/15] bootstage: Convert progress numbers 10-19 to enums Simon Glass
2012-01-08  8:28   ` Mike Frysinger
2012-01-08 17:29     ` Simon Glass
2011-12-10 21:07 ` [U-Boot] [RFC PATCH v2 06/15] bootstage: Convert progress numbers 20-41 " Simon Glass
2011-12-10 21:07 ` [U-Boot] [RFC PATCH v2 07/15] bootstage: Convert IDE progress numbers " Simon Glass
2011-12-10 21:08 ` [U-Boot] [RFC PATCH v2 08/15] bootstage: Convert NAND " Simon Glass
2011-12-10 21:08 ` [U-Boot] [RFC PATCH v2 09/15] bootstage: Convert net " Simon Glass
2011-12-10 21:08 ` [U-Boot] [RFC PATCH v2 10/15] bootstage: Convert FIT " Simon Glass
2011-12-10 21:08 ` [U-Boot] [RFC PATCH v2 11/15] bootstage: Define an optional microsecond timer Simon Glass
2012-01-08  8:30   ` Mike Frysinger
2012-01-08 17:33     ` Simon Glass
2012-01-08 19:57       ` Mike Frysinger
2012-01-08 23:49         ` Simon Glass
2011-12-10 21:08 ` [U-Boot] [RFC PATCH v2 12/15] bootstage: Replace show_boot_progress/error() with bootstage_...() Simon Glass
2011-12-10 21:08 ` [U-Boot] [RFC PATCH v2 13/15] bootstage: Add microsecond boot time measurement Simon Glass
2012-01-08  8:35   ` Mike Frysinger
2012-01-08 17:42     ` Simon Glass
2012-01-09 17:33       ` Mike Frysinger
2012-01-12  5:41         ` Simon Glass
2012-01-15  1:09           ` Mike Frysinger
2012-01-15  1:16             ` Simon Glass
2012-01-15  1:22               ` Mike Frysinger
2012-01-15  1:27                 ` Simon Glass
2012-02-13 23:27                   ` Simon Glass
2011-12-10 21:08 ` [U-Boot] [RFC PATCH v2 14/15] bootstage: Plumb in bootstage calls for basic operations Simon Glass
2011-12-10 21:08 ` [U-Boot] [RFC PATCH v2 15/15] bootstage: arm: Add bootstage calls in board and bootm Simon Glass
2012-01-08  8:36   ` Mike Frysinger
2012-01-08 17:43     ` Simon Glass
2012-01-08 19:58       ` Mike Frysinger
2012-01-08 23:48         ` Simon Glass
2012-01-09 17:31           ` Mike Frysinger
2012-01-12  5:38             ` Simon Glass [this message]
2012-01-03 22:33 ` [U-Boot] [RFC PATCH v2 0/15] bootstage: record and publish boot progress timing Simon Glass

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=CAPnjgZ2L-ZVZjjY1swMLjzpngxUUDD0GnQ6wSkL233DHWLRXmQ@mail.gmail.com \
    --to=sjg@chromium.org \
    --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 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.