diff options
Diffstat (limited to 'common/bootstage.c')
-rw-r--r-- | common/bootstage.c | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/common/bootstage.c b/common/bootstage.c index c7bb204501a..4532100acea 100644 --- a/common/bootstage.c +++ b/common/bootstage.c @@ -249,6 +249,8 @@ static uint32_t print_time_record(struct bootstage_record *rec, uint32_t prev) printf("%11s", ""); print_grouped_ull(rec->time_us, BOOTSTAGE_DIGITS); } else { + if (prev > rec->time_us) + prev = 0; print_grouped_ull(rec->time_us, BOOTSTAGE_DIGITS); print_grouped_ull(rec->time_us - prev, BOOTSTAGE_DIGITS); } @@ -257,13 +259,6 @@ static uint32_t print_time_record(struct bootstage_record *rec, uint32_t prev) return rec->time_us; } -static int h_compare_record(const void *r1, const void *r2) -{ - const struct bootstage_record *rec1 = r1, *rec2 = r2; - - return rec1->time_us > rec2->time_us ? 1 : -1; -} - #ifdef CONFIG_OF_LIBFDT /** * Add all bootstage timings to a device tree. @@ -342,9 +337,6 @@ void bootstage_report(void) prev = print_time_record(rec, 0); - /* Sort records by increasing time */ - qsort(data->record, data->rec_count, sizeof(*rec), h_compare_record); - for (i = 1, rec++; i < data->rec_count; i++, rec++) { if (rec->id && !rec->start_us) prev = print_time_record(rec, prev); |