public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
To: Lai Jiangshan <laijs@cn.fujitsu.com>
Cc: Ingo Molnar <mingo@elte.hu>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] rcu: add __cpuinit to rcu_init_percpu_data()
Date: Wed, 14 Jan 2009 08:14:28 -0800	[thread overview]
Message-ID: <20090114161428.GB6734@linux.vnet.ibm.com> (raw)
In-Reply-To: <496D8D07.5080108@cn.fujitsu.com>

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;
> 
> 
> 

      parent reply	other threads:[~2009-01-14 16:14 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090114161428.GB6734@linux.vnet.ibm.com \
    --to=paulmck@linux.vnet.ibm.com \
    --cc=laijs@cn.fujitsu.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox