diff mbox series

[2/2] MIPS: OCTEON: Don't add kernel sections into memblock allocator

Message ID 20201203123649.44046-2-alexander.sverdlin@nokia.com (mailing list archive)
State Accepted
Commit ca13300a88a37a90160d352cede05776ea723919
Headers show
Series [1/2] MIPS: Don't round up kernel sections size for memblock_add() | expand

Commit Message

Alexander Sverdlin Dec. 3, 2020, 12:36 p.m. UTC
From: Alexander Sverdlin <alexander.sverdlin@nokia.com>

Because check_kernel_sections_mem() does exactly this for all platforms.

Signed-off-by: Alexander Sverdlin <alexander.sverdlin@nokia.com>
---
 arch/mips/cavium-octeon/setup.c | 9 ---------
 1 file changed, 9 deletions(-)

Comments

Thomas Bogendoerfer Dec. 4, 2020, 12:09 p.m. UTC | #1
On Thu, Dec 03, 2020 at 01:36:49PM +0100, Alexander A Sverdlin wrote:
> From: Alexander Sverdlin <alexander.sverdlin@nokia.com>
> 
> Because check_kernel_sections_mem() does exactly this for all platforms.
> 
> Signed-off-by: Alexander Sverdlin <alexander.sverdlin@nokia.com>
> ---
>  arch/mips/cavium-octeon/setup.c | 9 ---------
>  1 file changed, 9 deletions(-)

applied to mips-next.

Thomas.
diff mbox series

Patch

diff --git a/arch/mips/cavium-octeon/setup.c b/arch/mips/cavium-octeon/setup.c
index d051a8a..34cef11 100644
--- a/arch/mips/cavium-octeon/setup.c
+++ b/arch/mips/cavium-octeon/setup.c
@@ -1013,8 +1013,6 @@  void __init plat_mem_setup(void)
 	uint64_t crashk_end;
 #ifndef CONFIG_CRASH_DUMP
 	int64_t memory;
-	uint64_t kernel_start;
-	uint64_t kernel_size;
 #endif
 
 	total = 0;
@@ -1152,13 +1150,6 @@  void __init plat_mem_setup(void)
 		}
 	}
 	cvmx_bootmem_unlock();
-	/* Add the memory region for the kernel. */
-	kernel_start = (unsigned long) _text;
-	kernel_size = _end - _text;
-
-	/* Adjust for physical offset. */
-	kernel_start &= ~0xffffffff80000000ULL;
-	memblock_add(kernel_start, kernel_size);
 #endif /* CONFIG_CRASH_DUMP */
 
 #ifdef CONFIG_CAVIUM_RESERVE32