[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <06e23d4a305d87bb1f3403b3130f130d784399c1.1581426806.git.michal.simek@xilinx.com>
Date: Tue, 11 Feb 2020 14:13:30 +0100
From: Michal Simek <michal.simek@...inx.com>
To: linux-kernel@...r.kernel.org, monstr@...str.eu,
michal.simek@...inx.com, git@...inx.com
Cc: Andrew Morton <akpm@...ux-foundation.org>,
Arvind Sankar <nivedita@...m.mit.edu>,
Geert Uytterhoeven <geert@...ux-m68k.org>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Mike Rapoport <rppt@...ux.ibm.com>,
Shubhrajyoti Datta <shubhrajyoti.datta@...inx.com>
Subject: [PATCH v2] microblaze: Kernel parameters should be parsed earlier
Kernel command line should be parsed before cma initialization to be able
to get cma sizes from command line. That's why call parse_early_param()
before dma_continugous_reserve().
Unfortunately it can't be called earlier in machine_early_init() because
if earlycon is passed in the command line the parse_early_param() attempts
an ioremap which fails as the memory params are not set yet.
Signed-off-by: Michal Simek <michal.simek@...inx.com>
Signed-off-by: Shubhrajyoti Datta <shubhrajyoti.datta@...inx.com>
---
Changes in v2:
- Fix case with earlycon
arch/microblaze/kernel/setup.c | 1 -
arch/microblaze/mm/init.c | 2 ++
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/arch/microblaze/kernel/setup.c b/arch/microblaze/kernel/setup.c
index 511c1ab7f57f..a8fc15ac4291 100644
--- a/arch/microblaze/kernel/setup.c
+++ b/arch/microblaze/kernel/setup.c
@@ -54,7 +54,6 @@ void __init setup_arch(char **cmdline_p)
*cmdline_p = boot_command_line;
setup_memory();
- parse_early_param();
console_verbose();
diff --git a/arch/microblaze/mm/init.c b/arch/microblaze/mm/init.c
index 1056f1674065..9899ff2ef9b6 100644
--- a/arch/microblaze/mm/init.c
+++ b/arch/microblaze/mm/init.c
@@ -347,6 +347,8 @@ asmlinkage void __init mmu_init(void)
* inside 768MB limit */
memblock_set_current_limit(memory_start + lowmem_size - 1);
+ parse_early_param();
+
/* CMA initialization */
dma_contiguous_reserve(memory_start + lowmem_size - 1);
}
--
2.25.0
Powered by blists - more mailing lists