diff --git a/common/bootstage.c b/common/bootstage.c index 0fd33be97e..326c40f156 100644 --- a/common/bootstage.c +++ b/common/bootstage.c @@ -147,15 +147,9 @@ ulong bootstage_add_record(enum bootstage_id id, const char *name, return mark; } - -ulong bootstage_mark(enum bootstage_id id) +ulong bootstage_error_name(enum bootstage_id id, const char *name) { - return bootstage_add_record(id, NULL, 0, timer_get_boot_us()); -} - -ulong bootstage_error(enum bootstage_id id) -{ - return bootstage_add_record(id, NULL, BOOTSTAGEF_ERROR, + return bootstage_add_record(id, name, BOOTSTAGEF_ERROR, timer_get_boot_us()); } diff --git a/include/bootstage.h b/include/bootstage.h index bca9438418..7088d0b875 100644 --- a/include/bootstage.h +++ b/include/bootstage.h @@ -268,12 +268,27 @@ ulong bootstage_add_record(enum bootstage_id id, const char *name, /** * Mark a time stamp for the current boot stage. */ -ulong bootstage_mark(enum bootstage_id id); - -ulong bootstage_error(enum bootstage_id id); +#define bootstage_mark(id) bootstage_mark_name(id, __func__) +#define bootstage_error(id) bootstage_error_name(id, __func__) +/** + * bootstage_mark_name - record bootstage with passing id and name + * @id: Bootstage id to record this timestamp against + * @name: Textual name to display for this id in the report + * + * Return: recorded time stamp + */ ulong bootstage_mark_name(enum bootstage_id id, const char *name); +/** + * bootstage_error_name - record bootstage error with passing id and name + * @id: Bootstage id to record this timestamp against + * @name: Textual name to display for this id in the report + * + * Return: recorded time stamp + */ +ulong bootstage_error_name(enum bootstage_id id, const char *name); + /** * Mark a time stamp in the given function and line number *