Commit 86aea0e6 authored by Paul E. McKenney's avatar Paul E. McKenney

rcu: Remove "cpu" argument to rcu_preempt_check_callbacks()

Because rcu_preempt_check_callbacks()'s argument is guaranteed to
always be the current CPU, drop the argument and replace per_cpu()
with __this_cpu_read().
Signed-off-by: default avatarPaul E. McKenney <paulmck@linux.vnet.ibm.com>
Reviewed-by: default avatarPranith Kumar <bobby.prani@gmail.com>
parent e3950ecd
...@@ -2420,7 +2420,7 @@ void rcu_check_callbacks(int user) ...@@ -2420,7 +2420,7 @@ void rcu_check_callbacks(int user)
rcu_bh_qs(); rcu_bh_qs();
} }
rcu_preempt_check_callbacks(smp_processor_id()); rcu_preempt_check_callbacks();
if (rcu_pending()) if (rcu_pending())
invoke_rcu_core(); invoke_rcu_core();
if (user) if (user)
......
...@@ -561,7 +561,7 @@ static int rcu_preempt_offline_tasks(struct rcu_state *rsp, ...@@ -561,7 +561,7 @@ static int rcu_preempt_offline_tasks(struct rcu_state *rsp,
struct rcu_node *rnp, struct rcu_node *rnp,
struct rcu_data *rdp); struct rcu_data *rdp);
#endif /* #ifdef CONFIG_HOTPLUG_CPU */ #endif /* #ifdef CONFIG_HOTPLUG_CPU */
static void rcu_preempt_check_callbacks(int cpu); static void rcu_preempt_check_callbacks(void);
void call_rcu(struct rcu_head *head, void (*func)(struct rcu_head *rcu)); void call_rcu(struct rcu_head *head, void (*func)(struct rcu_head *rcu));
#if defined(CONFIG_HOTPLUG_CPU) || defined(CONFIG_TREE_PREEMPT_RCU) #if defined(CONFIG_HOTPLUG_CPU) || defined(CONFIG_TREE_PREEMPT_RCU)
static void rcu_report_exp_rnp(struct rcu_state *rsp, struct rcu_node *rnp, static void rcu_report_exp_rnp(struct rcu_state *rsp, struct rcu_node *rnp,
......
...@@ -621,7 +621,7 @@ static int rcu_preempt_offline_tasks(struct rcu_state *rsp, ...@@ -621,7 +621,7 @@ static int rcu_preempt_offline_tasks(struct rcu_state *rsp,
* *
* Caller must disable hard irqs. * Caller must disable hard irqs.
*/ */
static void rcu_preempt_check_callbacks(int cpu) static void rcu_preempt_check_callbacks(void)
{ {
struct task_struct *t = current; struct task_struct *t = current;
...@@ -630,8 +630,8 @@ static void rcu_preempt_check_callbacks(int cpu) ...@@ -630,8 +630,8 @@ static void rcu_preempt_check_callbacks(int cpu)
return; return;
} }
if (t->rcu_read_lock_nesting > 0 && if (t->rcu_read_lock_nesting > 0 &&
per_cpu(rcu_preempt_data, cpu).qs_pending && __this_cpu_read(rcu_preempt_data.qs_pending) &&
!per_cpu(rcu_preempt_data, cpu).passed_quiesce) !__this_cpu_read(rcu_preempt_data.passed_quiesce))
t->rcu_read_unlock_special.b.need_qs = true; t->rcu_read_unlock_special.b.need_qs = true;
} }
...@@ -1017,7 +1017,7 @@ static int rcu_preempt_offline_tasks(struct rcu_state *rsp, ...@@ -1017,7 +1017,7 @@ static int rcu_preempt_offline_tasks(struct rcu_state *rsp,
* Because preemptible RCU does not exist, it never has any callbacks * Because preemptible RCU does not exist, it never has any callbacks
* to check. * to check.
*/ */
static void rcu_preempt_check_callbacks(int cpu) static void rcu_preempt_check_callbacks(void)
{ {
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment