Skip to content

Commit 6070970

Browse files
Jean-Michel Hautboisgeertu
authored andcommitted
m68k: Initialize jump labels early during setup_arch()
When using static keys early, e.g. by specifying "thread_backlog_napi" on the kernel command line: WARNING: CPU: 0 PID: 0 at include/linux/jump_label.h:322 setup_backlog_napi_threads+0x40/0xa0 static_key_enable(): static key '0x5ceec0' used before call to jump_label_init() The function jump_label_init() should be called from setup_arch() very early for proper functioning of jump label support. Signed-off-by: Jean-Michel Hautbois <[email protected]> Reviewed-by: Geert Uytterhoeven <[email protected]> Link: https://lore.kernel.org/[email protected] [geert: Add reproducer] Signed-off-by: Geert Uytterhoeven <[email protected]>
1 parent 47bc874 commit 6070970

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

arch/m68k/kernel/setup_mm.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,11 @@ void __init setup_arch(char **cmdline_p)
249249
process_uboot_commandline(&m68k_command_line[0], CL_SIZE);
250250
*cmdline_p = m68k_command_line;
251251
memcpy(boot_command_line, *cmdline_p, CL_SIZE);
252-
252+
/*
253+
* Initialise the static keys early as they may be enabled by the
254+
* cpufeature code and early parameters.
255+
*/
256+
jump_label_init();
253257
parse_early_param();
254258

255259
switch (m68k_machtype) {

0 commit comments

Comments
 (0)