Skip to contentSkip to conversation

rcu: add __cpuinit to rcu_init_percpu_data()

PATCH Applied Lai Jiangshan 3 participants 3 messages Jan 14, 2009

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 rcu: add __cpuinit to rcu_init_percpu_data()

Impact: rcu_init_percpu_data() is not use after boot when !CONFIG_HOTPLUG_CPU

add __cpuinit to rcu_init_percpu_data(), and this function's text will be discarded after boot when !CONFIG_HOTPLUG_CPU.

---

kernel/rcuclassic.c +1 -1
index 490934f..bd5a900 100644
@@ -716,7 +716,7 @@ void rcu_check_callbacks(int cpu, int user)
 	raise_rcu_softirq();
 }
 
-static void rcu_init_percpu_data(int cpu, struct rcu_ctrlblk *rcp,
+static void __cpuinit rcu_init_percpu_data(int cpu, struct rcu_ctrlblk *rcp,
 						struct rcu_data *rdp)
 {
 	unsigned long flags;
kernel/rcutree.c +1 -1
index f2d8638..b2fd602 100644
@@ -1314,7 +1314,7 @@ int rcu_needs_cpu(int cpu)
  * access due to the fact that this CPU cannot possibly have any RCU
  * callbacks in flight yet.
  */
-static void
+static void __cpuinit
 rcu_init_percpu_data(int cpu, struct rcu_state *rsp)
 {
 	unsigned long flags;
Applied
#1 lore raw
Quoted 7 lines · Lai Jiangshan

Impact: rcu_init_percpu_data() is not use after boot when !CONFIG_HOTPLUG_CPU

add __cpuinit to rcu_init_percpu_data(), and this function's text will be discarded after boot when !CONFIG_HOTPLUG_CPU.

applied to tip/core/urgent, thanks!

Ingo

Acked-by on v1 1/1
#2 lore raw
In reply to Lai Jiangshan
Quoted 5 lines · Lai Jiangshan

Impact: rcu_init_percpu_data() is not use after boot when !CONFIG_HOTPLUG_CPU

add __cpuinit to rcu_init_percpu_data(), and this function's text will be discarded after boot when !CONFIG_HOTPLUG_CPU.

Good catch!!!

Quoted 31 lines

---

kernel/rcuclassic.c +1 -1
index 490934f..bd5a900 100644
@@ -716,7 +716,7 @@ void rcu_check_callbacks(int cpu, int user)
 	raise_rcu_softirq();
 }
 
-static void rcu_init_percpu_data(int cpu, struct rcu_ctrlblk *rcp,
+static void __cpuinit rcu_init_percpu_data(int cpu, struct rcu_ctrlblk *rcp,
 						struct rcu_data *rdp)
 {
 	unsigned long flags;
kernel/rcutree.c +1 -1
index f2d8638..b2fd602 100644
@@ -1314,7 +1314,7 @@ int rcu_needs_cpu(int cpu)
  * access due to the fact that this CPU cannot possibly have any RCU
  * callbacks in flight yet.
  */
-static void
+static void __cpuinit
 rcu_init_percpu_data(int cpu, struct rcu_state *rsp)
 {
 	unsigned long flags;