Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4da117cf authored by Paul E. McKenney's avatar Paul E. McKenney
Browse files

rcu: Remove redundant ACCESS_ONCE() from tick_do_timer_cpu



In kernels built with CONFIG_NO_HZ_FULL, tick_do_timer_cpu is constant
once boot completes.  Thus, there is no need to wrap it in ACCESS_ONCE()
in code that is built only when CONFIG_NO_HZ_FULL.  This commit therefore
removes the redundant ACCESS_ONCE().

Signed-off-by: default avatarPaul E. McKenney <paulmck@linux.vnet.ibm.com>
Acked-by: default avatarFrederic Weisbecker <fweisbec@gmail.com>
Reviewed-by: default avatarLai Jiangshan <laijs@cn.fujitsu.com>
parent b4426b49
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -2844,7 +2844,7 @@ static bool rcu_nohz_full_cpu(struct rcu_state *rsp)
static void rcu_bind_gp_kthread(void)
{
#ifdef CONFIG_NO_HZ_FULL
	int cpu = ACCESS_ONCE(tick_do_timer_cpu);
	int cpu = tick_do_timer_cpu;

	if (cpu < 0 || cpu >= nr_cpu_ids)
		return;