[PATCH v2 6/9] x86: Call bootm_final()

Max Merchel max.merchel at ew.tq-group.com
Wed Feb 25 09:38:55 CET 2026



Am 24.02.26 um 15:25 schrieb Simon Glass:
> The x86 code in bootm_announce_and_cleanup() is very similar to the new
> bootm_final() function, so just use the latter. Move over a useful
> comment.
> 
> Signed-off-by: Simon Glass <simon.glass at canonical.com>
> ---
> 
> (no changes since v1)
> 
>   arch/x86/lib/bootm.c | 14 +-------------
>   boot/bootm_final.c   |  5 +++++
>   2 files changed, 6 insertions(+), 13 deletions(-)
> 
> diff --git a/arch/x86/lib/bootm.c b/arch/x86/lib/bootm.c
> index 7a94dc877e3..cde4fbf3557 100644
> --- a/arch/x86/lib/bootm.c
> +++ b/arch/x86/lib/bootm.c
> @@ -34,22 +34,10 @@ DECLARE_GLOBAL_DATA_PTR;
>   
>   void bootm_announce_and_cleanup(void)
>   {
> -	printf("\nStarting kernel ...\n\n");
> -
>   #ifdef CONFIG_SYS_COREBOOT
>   	timestamp_add_now(TS_START_KERNEL);
>   #endif
> -	bootstage_mark_name(BOOTSTAGE_ID_BOOTM_HANDOFF, "start_kernel");
> -#if IS_ENABLED(CONFIG_BOOTSTAGE_REPORT)
> -	bootstage_report();
> -#endif
> -
> -	/*
> -	 * Call remove function of all devices with a removal flag set.
> -	 * This may be useful for last-stage operations, like cancelling
> -	 * of DMA operation or releasing device internal buffers.
> -	 */
> -	dm_remove_devices_active();
> +	bootm_final(0);
>   }
>   
>   #if defined(CONFIG_OF_LIBFDT) && !defined(CONFIG_OF_NO_KERNEL)
> diff --git a/boot/bootm_final.c b/boot/bootm_final.c
> index dd7cac55f1e..7077702d8c7 100644
> --- a/boot/bootm_final.c
> +++ b/boot/bootm_final.c
> @@ -18,5 +18,10 @@ void bootm_final(enum bootm_final_t flags)
>   	if (IS_ENABLED(CONFIG_BOOTSTAGE_REPORT))
>   		bootstage_report();
>   
> +	/*
> +	 * Call remove function of all devices with a removal flag set.
> +	 * This may be useful for last-stage operations, like cancelling
> +	 * of DMA operation or releasing device internal buffers.
> +	 */
>   	dm_remove_devices_active();
>   }

I think it would be better if the comment were inserted together with 
the function. In Patch [PATCH v2 2/9] bootm: Remove active devices in 
bootm_final()


-- 
Best regards,
Max

TQ-Systems GmbH | Mühlstraße 2, Gut Delling | 82229 Seefeld, Germany
Amtsgericht München, HRB 105018
Geschäftsführer: Detlef Schneider, Rüdiger Stahl, Stefan Schneider
http://www.tq-group.com/



More information about the U-Boot mailing list