[RFC/PATCH 2/3] init: Initialize jump_labels before early parameters

From: Stephen Boyd
Date: Fri Apr 06 2012 - 03:03:59 EST


We want to use jump_labels in the debug_objects code so that when
debug_objects aren't enabled by default we can skip debug_object
code. Move the jump_label initialization before the early
parameter parsing so that debug_objects code can enable and
disable itself according to kernel command line parameters.

Signed-off-by: Stephen Boyd <sboyd@xxxxxxxxxxxxxx>
Cc: Jeremy Fitzhardinge <jeremy.fitzhardinge@xxxxxxxxxx>
Cc: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
---

This also opens the window to using static keys for pr_debug().
I tried and wound up in circular dependency hell.

init/main.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/init/main.c b/init/main.c
index ff49a6d..39a3092 100644
--- a/init/main.c
+++ b/init/main.c
@@ -502,14 +502,14 @@ asmlinkage void __init start_kernel(void)
build_all_zonelists(NULL);
page_alloc_init();

+ jump_label_init();
+
printk(KERN_NOTICE "Kernel command line: %s\n", boot_command_line);
parse_early_param();
parse_args("Booting kernel", static_command_line, __start___param,
__stop___param - __start___param,
&unknown_bootoption);

- jump_label_init();
-
/*
* These use large bootmem allocations and must precede
* kmem_cache_init()
--
Sent by an employee of the Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/