]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
common/memsize.c: Fix get_effective_memsize() to always check for CONFIG_MAX_MEM_MAPPED
authorPali Rohár <pali@kernel.org>
Fri, 9 Sep 2022 15:32:38 +0000 (17:32 +0200)
committerTom Rini <trini@konsulko.com>
Fri, 23 Sep 2022 19:11:13 +0000 (15:11 -0400)
CONFIG_MAX_MEM_MAPPED when defined specifies upper memory mapped limit.
So check for it always, and not only when CONFIG_VERY_BIG_RAM is defined.

Signed-off-by: Pali Rohár <pali@kernel.org>
common/memsize.c

index d5d13d51bf1fd84f44e8ec8763257f88d8719fd6..31884acca0df8c118edfef93e826cc92be84fa56 100644 (file)
@@ -94,7 +94,7 @@ long get_ram_size(long *base, long maxsize)
 
 phys_size_t __weak get_effective_memsize(void)
 {
-#ifndef CONFIG_VERY_BIG_RAM
+#ifndef CONFIG_MAX_MEM_MAPPED
        return gd->ram_size;
 #else
        /* limit stack to what we can reasonable map */