lkml.org 
[lkml]   [2009]   [Jan]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] rcu: add __cpuinit to rcu_init_percpu_data()
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;
>
>
>


\
 
 \ /
  Last update: 2009-01-14 17:17    [W:0.093 / U:0.020 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site