Skip to contentSkip to conversation

jump-label: initialize jump-label subsystem somewhat later

PATCH In review David Daney 1 participant 2 messages Dec 14, 2011 – Dec 19, 2011 MIPS

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 jump-label: initialize jump-label subsystem somewhat later

From: David Daney <[email protected]>

commit 97ce2c88f9ad42e3c60a9beb9fca87abf3639faa
(jump-label: initialize jump-label subsystem much earlier) breaks MIPS.

The jump-label initialization does I-Cache flushing after modifying code. On MIPS this is done by calling through the function pointer flush_icache_range(). This function pointer is initialized by trap_init().

As things stand, we cannot be calling jump_label_init() until after trap_init() completes, so we move the call down to satisfy this constraint.

---

Sorry for spamming this out again, but Sergei keeps flagging my poor grammar.

Difference from v2: Fix grammar and spelling issues in changelog. No
change to the patch.

Difference from v1: Move jump_label_init() up one so it is now before
mm_init() instead of after it.

 init/main.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)
init/main.c +1 -2
index 217ed23..68ab12b 100644
@@ -513,8 +513,6 @@ asmlinkage void __init start_kernel(void)
 		   __stop___param - __start___param,
 		   &unknown_bootoption);
 
-	jump_label_init();
-
 	/*
 	 * These use large bootmem allocations and must precede
 	 * kmem_cache_init()
@@ -524,6 +522,7 @@ asmlinkage void __init start_kernel(void)
 	vfs_caches_init_early();
 	sort_main_extable();
 	trap_init();
+	jump_label_init();
 	mm_init();
 
 	/*
Signature · 1 line
1.7.2.3
#1 lore raw
Quoted 10 lines · David Daney

From: David Daney<[email protected]>

commit 97ce2c88f9ad42e3c60a9beb9fca87abf3639faa
(jump-label: initialize jump-label subsystem much earlier) breaks MIPS.

The jump-label initialization does I-Cache flushing after modifying code. On MIPS this is done by calling through the function pointer flush_icache_range(). This function pointer is initialized by trap_init().

Quoted 5 lines

As things stand, we cannot be calling jump_label_init() until after trap_init() completes, so we move the call down to satisfy this constraint.

NACK to myself:

I now have a patch for MIPS that makes this one unnecessary.

David Daney

Quoted 36 lines

---

Sorry for spamming this out again, but Sergei keeps flagging my poor grammar.

Difference from v2: Fix grammar and spelling issues in changelog. No
change to the patch.

Difference from v1: Move jump_label_init() up one so it is now before
mm_init() instead of after it.

  init/main.c |    3 +--
  1 files changed, 1 insertions(+), 2 deletions(-)
init/main.c +1 -2
index 217ed23..68ab12b 100644
@@ -513,8 +513,6 @@ asmlinkage void __init start_kernel(void)
  		   __stop___param - __start___param,
  		&unknown_bootoption);
 
-	jump_label_init();
-
  	/*
  	 * These use large bootmem allocations and must precede
  	 * kmem_cache_init()
@@ -524,6 +522,7 @@ asmlinkage void __init start_kernel(void)
  	vfs_caches_init_early();
  	sort_main_extable();
  	trap_init();
+	jump_label_init();
  	mm_init();
 
  	/*