* [PATCH] rcu: add __cpuinit to rcu_init_percpu_data()
@ 2009-01-14 6:58 Lai Jiangshan
2009-01-14 10:27 ` Ingo Molnar
2009-01-14 16:14 ` Paul E. McKenney
0 siblings, 2 replies; 3+ messages in thread
From: Lai Jiangshan @ 2009-01-14 6:58 UTC (permalink / raw)
To: Paul E. McKenney, Ingo Molnar, Linux Kernel Mailing List
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.
Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com>
---
diff --git a/kernel/rcuclassic.c b/kernel/rcuclassic.c
index 490934f..bd5a900 100644
--- a/kernel/rcuclassic.c
+++ b/kernel/rcuclassic.c
@@ -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;
diff --git a/kernel/rcutree.c b/kernel/rcutree.c
index f2d8638..b2fd602 100644
--- a/kernel/rcutree.c
+++ b/kernel/rcutree.c
@@ -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;
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] rcu: add __cpuinit to rcu_init_percpu_data()
2009-01-14 6:58 [PATCH] rcu: add __cpuinit to rcu_init_percpu_data() Lai Jiangshan
@ 2009-01-14 10:27 ` Ingo Molnar
2009-01-14 16:14 ` Paul E. McKenney
1 sibling, 0 replies; 3+ messages in thread
From: Ingo Molnar @ 2009-01-14 10:27 UTC (permalink / raw)
To: Lai Jiangshan; +Cc: Paul E. McKenney, Linux Kernel Mailing List
* Lai Jiangshan <laijs@cn.fujitsu.com> wrote:
>
> 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.
>
> Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com>
applied to tip/core/urgent, thanks!
Ingo
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] rcu: add __cpuinit to rcu_init_percpu_data()
2009-01-14 6:58 [PATCH] rcu: add __cpuinit to rcu_init_percpu_data() Lai Jiangshan
2009-01-14 10:27 ` Ingo Molnar
@ 2009-01-14 16:14 ` Paul E. McKenney
1 sibling, 0 replies; 3+ messages in thread
From: Paul E. McKenney @ 2009-01-14 16:14 UTC (permalink / raw)
To: Lai Jiangshan; +Cc: Ingo Molnar, Linux Kernel Mailing List
On Wed, Jan 14, 2009 at 02:58:15PM +0800, Lai Jiangshan wrote:
>
> 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!!!
Acked-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
> Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com>
> ---
> diff --git a/kernel/rcuclassic.c b/kernel/rcuclassic.c
> index 490934f..bd5a900 100644
> --- a/kernel/rcuclassic.c
> +++ b/kernel/rcuclassic.c
> @@ -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;
> diff --git a/kernel/rcutree.c b/kernel/rcutree.c
> index f2d8638..b2fd602 100644
> --- a/kernel/rcutree.c
> +++ b/kernel/rcutree.c
> @@ -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;
>
>
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2009-01-14 16:14 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-01-14 6:58 [PATCH] rcu: add __cpuinit to rcu_init_percpu_data() Lai Jiangshan
2009-01-14 10:27 ` Ingo Molnar
2009-01-14 16:14 ` Paul E. McKenney
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox