Skip to content

Commit

Permalink
rcu: add __cpuinit to rcu_init_percpu_data()
Browse files Browse the repository at this point in the history
Impact: reduce memory footprint

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>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
  • Loading branch information
Lai Jiangshan authored and Ingo Molnar committed Jan 14, 2009
1 parent a652504 commit e4fa4c9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion kernel/rcuclassic.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion kernel/rcutree.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit e4fa4c9

Please sign in to comment.