All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH 1/3] bootstage: Dont print reset entry separately
@ 2017-05-30 12:22 Michal Simek
  2017-05-30 12:22 ` [U-Boot] [PATCH 2/3] bootstage: print all entries even if recorded time is zero Michal Simek
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Michal Simek @ 2017-05-30 12:22 UTC (permalink / raw)
  To: u-boot

From: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>

Printing the first entry reset separately is no longer
needed as it now prints the entries with valid name and
timestamp zero. This removes duplicate printing of the reset
record.

Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
---

 common/bootstage.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/common/bootstage.c b/common/bootstage.c
index 35bce3d881a5..c8080dcab5d7 100644
--- a/common/bootstage.c
+++ b/common/bootstage.c
@@ -271,7 +271,7 @@ void bootstage_report(void)
 	/* Fake the first record - we could get it from early boot */
 	rec->name = "reset";
 	rec->time_us = 0;
-	prev = print_time_record(BOOTSTAGE_ID_AWAKE, rec, 0);
+	prev = 0;
 
 	/* Sort records by increasing time */
 	qsort(record, ARRAY_SIZE(record), sizeof(*rec), h_compare_record);
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [U-Boot] [PATCH 2/3] bootstage: print all entries even if recorded time is zero
  2017-05-30 12:22 [U-Boot] [PATCH 1/3] bootstage: Dont print reset entry separately Michal Simek
@ 2017-05-30 12:22 ` Michal Simek
  2017-05-30 12:22 ` [U-Boot] [PATCH 3/3] bootstage: Modify routine timer_get_boot_us() Michal Simek
  2017-06-09  1:00 ` [U-Boot] [U-Boot, 1/3] bootstage: Dont print reset entry separately Tom Rini
  2 siblings, 0 replies; 5+ messages in thread
From: Michal Simek @ 2017-05-30 12:22 UTC (permalink / raw)
  To: u-boot

From: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>

Print all entries in boot stage report even if the recorded
time stamp is zero. This lets the user to know all the recorded
entries that are made into. This helps user to know if something
went wrong with timestamp for that entry.

Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
---

 common/bootstage.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/common/bootstage.c b/common/bootstage.c
index c8080dcab5d7..bca74cd207fc 100644
--- a/common/bootstage.c
+++ b/common/bootstage.c
@@ -277,7 +277,7 @@ void bootstage_report(void)
 	qsort(record, ARRAY_SIZE(record), sizeof(*rec), h_compare_record);
 
 	for (id = 0; id < BOOTSTAGE_ID_COUNT; id++, rec++) {
-		if (rec->time_us != 0 && !rec->start_us)
+		if ((rec->time_us != 0 && !rec->start_us) || rec->name)
 			prev = print_time_record(rec->id, rec, prev);
 	}
 	if (next_id > BOOTSTAGE_ID_COUNT)
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [U-Boot] [PATCH 3/3] bootstage: Modify routine timer_get_boot_us()
  2017-05-30 12:22 [U-Boot] [PATCH 1/3] bootstage: Dont print reset entry separately Michal Simek
  2017-05-30 12:22 ` [U-Boot] [PATCH 2/3] bootstage: print all entries even if recorded time is zero Michal Simek
@ 2017-05-30 12:22 ` Michal Simek
  2017-06-09  1:00 ` [U-Boot] [U-Boot, 1/3] bootstage: Dont print reset entry separately Tom Rini
  2 siblings, 0 replies; 5+ messages in thread
From: Michal Simek @ 2017-05-30 12:22 UTC (permalink / raw)
  To: u-boot

From: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>

Modify routine timer_get_boot_us(), as the base_time
will be stored in bss if initialized to zero(observed for
arm compilers, arm and arm64) and for most of the boards
bss was not initialized to zero before relocation and hence
causing a junk timestamp value in boot record if there is an
entry record before relocation(example would be board_init_f
entry). Also, as it is in bss which will be intialized to zero
after relocation, it causes the first entry after relocation
to be missed while printing bootstage report as the
timer_get_boot_us() returns zero if bss_time is zero.
This patch fixes the same by initialzing bss_time to 1 and also
returning current timestamp if bss_time is 1. Intializing it to
1 causes it to be placed in data section and hence no issues.

Before this patch:
ZynqMP> bootstage report
Timer summary in microseconds:
       Mark    Elapsed  Stage
          0          0  reset
    491,000    491,000  id=64
    516,000     25,000  id=65
    522,000      6,000  main_loop
112,092,989,575,347,436,48112,092,989,575,342,216,48  board_init_f

After this patch:
ZynqMP> bootstage report
Timer summary in microseconds:
       Mark    Elapsed  Stage
          0          0  reset
      9,969      9,969  board_init_f
  1,227,000  1,217,031  board_init_r
  1,713,000    486,000  id=64
  1,733,000     20,000  id=65
  1,735,000      2,000  main_loop

Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
---

 common/bootstage.c | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/common/bootstage.c b/common/bootstage.c
index bca74cd207fc..b65345c28105 100644
--- a/common/bootstage.c
+++ b/common/bootstage.c
@@ -294,16 +294,18 @@ void bootstage_report(void)
 
 ulong __timer_get_boot_us(void)
 {
-	static ulong base_time;
+	static ulong base_time = 1;
 
 	/*
 	 * We can't implement this properly. Return 0 on the first call and
 	 * larger values after that.
 	 */
-	if (base_time)
+	if (base_time != 1)
 		return get_timer(base_time) * 1000;
-	base_time = get_timer(0);
-	return 0;
+	else
+		base_time = get_timer(0);
+
+	return base_time;
 }
 
 ulong timer_get_boot_us(void)
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [U-Boot] [U-Boot, 1/3] bootstage: Dont print reset entry separately
  2017-05-30 12:22 [U-Boot] [PATCH 1/3] bootstage: Dont print reset entry separately Michal Simek
  2017-05-30 12:22 ` [U-Boot] [PATCH 2/3] bootstage: print all entries even if recorded time is zero Michal Simek
  2017-05-30 12:22 ` [U-Boot] [PATCH 3/3] bootstage: Modify routine timer_get_boot_us() Michal Simek
@ 2017-06-09  1:00 ` Tom Rini
  2017-06-21 10:51   ` Michal Simek
  2 siblings, 1 reply; 5+ messages in thread
From: Tom Rini @ 2017-06-09  1:00 UTC (permalink / raw)
  To: u-boot

On Tue, May 30, 2017 at 02:22:11PM +0200, Michal Simek wrote:

> From: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>
> 
> Printing the first entry reset separately is no longer
> needed as it now prints the entries with valid name and
> timestamp zero. This removes duplicate printing of the reset
> record.
> 
> Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
> Signed-off-by: Michal Simek <michal.simek@xilinx.com>

Can you please rebase this and the rest of the series on top of master
again?  And please cc Simon when you repost, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170608/b5a4f827/attachment.sig>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [U-Boot] [U-Boot, 1/3] bootstage: Dont print reset entry separately
  2017-06-09  1:00 ` [U-Boot] [U-Boot, 1/3] bootstage: Dont print reset entry separately Tom Rini
@ 2017-06-21 10:51   ` Michal Simek
  0 siblings, 0 replies; 5+ messages in thread
From: Michal Simek @ 2017-06-21 10:51 UTC (permalink / raw)
  To: u-boot

On 9.6.2017 03:00, Tom Rini wrote:
> On Tue, May 30, 2017 at 02:22:11PM +0200, Michal Simek wrote:
> 
>> From: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>
>>
>> Printing the first entry reset separately is no longer
>> needed as it now prints the entries with valid name and
>> timestamp zero. This removes duplicate printing of the reset
>> record.
>>
>> Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
>> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
> 
> Can you please rebase this and the rest of the series on top of master
> again?  And please cc Simon when you repost, thanks!
> 

There are new patches from Simon. Siva will look at it and try to
validate them on our platforms.

Thanks,
Michal

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2017-06-21 10:51 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-05-30 12:22 [U-Boot] [PATCH 1/3] bootstage: Dont print reset entry separately Michal Simek
2017-05-30 12:22 ` [U-Boot] [PATCH 2/3] bootstage: print all entries even if recorded time is zero Michal Simek
2017-05-30 12:22 ` [U-Boot] [PATCH 3/3] bootstage: Modify routine timer_get_boot_us() Michal Simek
2017-06-09  1:00 ` [U-Boot] [U-Boot, 1/3] bootstage: Dont print reset entry separately Tom Rini
2017-06-21 10:51   ` Michal Simek

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.