[PATCH v3 1/2] alpha: parse early parameters before reserving contiguous memory
From: Magnus Lindholm
Date: Sun Nov 15 2026 - 05:38:27 EST
Run parse_early_param() in setup_arch(), after machine initialization
and before further memory reservations. This lets the subsequent CMA
reservation honor cma= before start_kernel() reaches its normal call.
Initialize jump labels first so early handlers can safely change static
keys. The later jump_label_init() call in start_kernel() is harmless.
The parser uses boot_command_line and guards against repeated calls.
This moves all early parameter handlers, not just the CMA handler.
Signed-off-by: Magnus Lindholm <linmag7@xxxxxxxxx>
Reviewed-by: Matt Turner <mattst88@xxxxxxxxx>
---
arch/alpha/kernel/setup.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/arch/alpha/kernel/setup.c b/arch/alpha/kernel/setup.c
index 9fda01b73b18..f21a7c8f5213 100644
--- a/arch/alpha/kernel/setup.c
+++ b/arch/alpha/kernel/setup.c
@@ -25,6 +25,7 @@
#include <linux/cpu.h>
#include <linux/errno.h>
#include <linux/init.h>
+#include <linux/jump_label.h>
#include <linux/string.h>
#include <linux/ioport.h>
#include <linux/panic_notifier.h>
@@ -579,6 +580,10 @@ setup_arch(char **cmdline_p)
if (alpha_mv.init_arch)
alpha_mv.init_arch();
+ /* Early options may change static keys and configure DMA CMA. */
+ jump_label_init();
+ parse_early_param();
+
/* Reserve standard resources. */
reserve_std_resources();
--
2.43.0