Re: [PATCH v2 25/34] ARM: mmu: always do MMU initialization early when MMU is enabled

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 17.05.23 11:03, Sascha Hauer wrote:
> Drop the CONFIG_MMU_EARLY and make early MMU initialization the default.
> 
> Doing so allows us for some simplifications in the MMU code as we have
> less code pathes to care and think about.
> 
> Signed-off-by: Sascha Hauer <s.hauer@xxxxxxxxxxxxxx>

Reviewed-by: Ahmad Fatoum <a.fatoum@xxxxxxxxxxxxxx>



> ---
>  arch/arm/cpu/start.c      | 2 +-
>  arch/arm/cpu/uncompress.c | 2 +-
>  common/Kconfig            | 9 ---------
>  3 files changed, 2 insertions(+), 11 deletions(-)
> 
> diff --git a/arch/arm/cpu/start.c b/arch/arm/cpu/start.c
> index 165d2d94e6..2e987ec41d 100644
> --- a/arch/arm/cpu/start.c
> +++ b/arch/arm/cpu/start.c
> @@ -216,7 +216,7 @@ __noreturn __no_sanitize_address void barebox_non_pbl_start(unsigned long membas
>  
>  	mem_malloc_init((void *)malloc_start, (void *)malloc_end - 1);
>  
> -	if (IS_ENABLED(CONFIG_MMU_EARLY) && !IS_ENABLED(CONFIG_PBL_IMAGE)) {
> +	if (IS_ENABLED(CONFIG_MMU) && !IS_ENABLED(CONFIG_PBL_IMAGE)) {
>  		arm_early_mmu_cache_invalidate();
>  		mmu_early_enable(membase, memsize);
>  	}
> diff --git a/arch/arm/cpu/uncompress.c b/arch/arm/cpu/uncompress.c
> index e471dd87f9..a481c4634d 100644
> --- a/arch/arm/cpu/uncompress.c
> +++ b/arch/arm/cpu/uncompress.c
> @@ -81,7 +81,7 @@ void __noreturn barebox_pbl_start(unsigned long membase, unsigned long memsize,
>  
>  	pr_debug("memory at 0x%08lx, size 0x%08lx\n", membase, memsize);
>  
> -	if (IS_ENABLED(CONFIG_MMU_EARLY))
> +	if (IS_ENABLED(CONFIG_MMU))
>  		mmu_early_enable(membase, memsize);
>  
>  	free_mem_ptr = arm_mem_early_malloc(endmem);
> diff --git a/common/Kconfig b/common/Kconfig
> index ac3df75acb..c6008f125b 100644
> --- a/common/Kconfig
> +++ b/common/Kconfig
> @@ -185,15 +185,6 @@ config MMU
>  	  to enable the data cache which depends on the MMU. See Documentation/mmu.txt
>  	  for further information.
>  
> -config MMU_EARLY
> -	bool "Enable MMU early"
> -	depends on ARM
> -	depends on MMU
> -	default y
> -	help
> -	  This enables the MMU during early startup. This speeds up things during startup
> -	  of barebox, but may lead to harder to debug code. If unsure say yes here.
> -
>  config HAVE_CONFIGURABLE_TEXT_BASE
>  	bool
>  

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |





[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux