diff mbox series

[v2,08/14] stm32mp: remove efi_add_known_memory() function definition

Message ID 20241008181435.1753814-9-sughosh.ganu@linaro.org
State Superseded
Headers show
Series Make EFI memory allocations synchronous with LMB | expand

Commit Message

Sughosh Ganu Oct. 8, 2024, 6:14 p.m. UTC
The efi_add_known_memory() function for the stm32mp platforms is adding
the EFI_CONVENTIONAL_MEMORY type. This memory is now being handled
through the LMB module -- the lmb_add_memory() adds this memory to the
memory map. Remove the definition of the now superfluous
efi_add_known_memory() function.

Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
---
Changes since V1: None

 arch/arm/mach-stm32mp/dram_init.c | 11 -----------
 1 file changed, 11 deletions(-)

Comments

Ilias Apalodimas Oct. 11, 2024, 10:21 a.m. UTC | #1
On Tue, 8 Oct 2024 at 21:15, Sughosh Ganu <sughosh.ganu@linaro.org> wrote:
>
> The efi_add_known_memory() function for the stm32mp platforms is adding
> the EFI_CONVENTIONAL_MEMORY type. This memory is now being handled
> through the LMB module -- the lmb_add_memory() adds this memory to the
> memory map. Remove the definition of the now superfluous
> efi_add_known_memory() function.
>
> Signed-off-by: Sughosh Ganu <sughosh.ganu@linaro.org>
> ---
> Changes since V1: None
>
>  arch/arm/mach-stm32mp/dram_init.c | 11 -----------
>  1 file changed, 11 deletions(-)
>
> diff --git a/arch/arm/mach-stm32mp/dram_init.c b/arch/arm/mach-stm32mp/dram_init.c
> index 198785353f1..3698fc49bf1 100644
> --- a/arch/arm/mach-stm32mp/dram_init.c
> +++ b/arch/arm/mach-stm32mp/dram_init.c
> @@ -86,14 +86,3 @@ phys_addr_t board_get_usable_ram_top(phys_size_t total_size)
>
>         return reg + size;
>  }
> -
> -void efi_add_known_memory(void)
> -{
> -       if (IS_ENABLED(CONFIG_EFI_LOADER))
> -               /*
> -                * Memory over ram_top is reserved to OPTEE.
> -                * Declare to EFI only memory area below ram_top
> -                */
> -               efi_add_memory_map(gd->ram_base, gd->ram_top - gd->ram_base,
> -                                  EFI_CONVENTIONAL_MEMORY);
> -}
> --
> 2.34.1
>

TBH we should make efi_add_known_memory() and remove __weak in the
future, unless someone has a very good reason to keep it.

Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
diff mbox series

Patch

diff --git a/arch/arm/mach-stm32mp/dram_init.c b/arch/arm/mach-stm32mp/dram_init.c
index 198785353f1..3698fc49bf1 100644
--- a/arch/arm/mach-stm32mp/dram_init.c
+++ b/arch/arm/mach-stm32mp/dram_init.c
@@ -86,14 +86,3 @@  phys_addr_t board_get_usable_ram_top(phys_size_t total_size)
 
 	return reg + size;
 }
-
-void efi_add_known_memory(void)
-{
-	if (IS_ENABLED(CONFIG_EFI_LOADER))
-		/*
-		 * Memory over ram_top is reserved to OPTEE.
-		 * Declare to EFI only memory area below ram_top
-		 */
-		efi_add_memory_map(gd->ram_base, gd->ram_top - gd->ram_base,
-				   EFI_CONVENTIONAL_MEMORY);
-}