Skip to content

Commit

Permalink
rcu: Rename some instance of CONFIG_PREEMPTION to CONFIG_PREEMPT_RCU
Browse files Browse the repository at this point in the history
CONFIG_PREEMPTION and CONFIG_PREEMPT_RCU are always identical,
but some code depends on CONFIG_PREEMPTION to access to
rcu_preempt functionality. This patch changes CONFIG_PREEMPTION
to CONFIG_PREEMPT_RCU in these cases.

Signed-off-by: Lai Jiangshan <jiangshanlai@gmail.com>
Signed-off-by: Lai Jiangshan <laijs@linux.alibaba.com>
Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
  • Loading branch information
Lai Jiangshan authored and Paul E. McKenney committed Jan 24, 2020
1 parent 90326f0 commit c130d2d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions kernel/rcu/tree.c
Original file line number Diff line number Diff line change
Expand Up @@ -1934,7 +1934,7 @@ rcu_report_unblock_qs_rnp(struct rcu_node *rnp, unsigned long flags)
struct rcu_node *rnp_p;

raw_lockdep_assert_held_rcu_node(rnp);
if (WARN_ON_ONCE(!IS_ENABLED(CONFIG_PREEMPTION)) ||
if (WARN_ON_ONCE(!IS_ENABLED(CONFIG_PREEMPT_RCU)) ||
WARN_ON_ONCE(rcu_preempt_blocked_readers_cgp(rnp)) ||
rnp->qsmask != 0) {
raw_spin_unlock_irqrestore_rcu_node(rnp, flags);
Expand Down Expand Up @@ -2294,7 +2294,7 @@ static void force_qs_rnp(int (*f)(struct rcu_data *rdp))
mask = 0;
raw_spin_lock_irqsave_rcu_node(rnp, flags);
if (rnp->qsmask == 0) {
if (!IS_ENABLED(CONFIG_PREEMPTION) ||
if (!IS_ENABLED(CONFIG_PREEMPT_RCU) ||
rcu_preempt_blocked_readers_cgp(rnp)) {
/*
* No point in scanning bits because they
Expand Down
6 changes: 3 additions & 3 deletions kernel/rcu/tree_stall.h
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ static void rcu_iw_handler(struct irq_work *iwp)
//
// Printing RCU CPU stall warnings

#ifdef CONFIG_PREEMPTION
#ifdef CONFIG_PREEMPT_RCU

/*
* Dump detailed information for all tasks blocking the current RCU
Expand Down Expand Up @@ -215,7 +215,7 @@ static int rcu_print_task_stall(struct rcu_node *rnp)
return ndetected;
}

#else /* #ifdef CONFIG_PREEMPTION */
#else /* #ifdef CONFIG_PREEMPT_RCU */

/*
* Because preemptible RCU does not exist, we never have to check for
Expand All @@ -233,7 +233,7 @@ static int rcu_print_task_stall(struct rcu_node *rnp)
{
return 0;
}
#endif /* #else #ifdef CONFIG_PREEMPTION */
#endif /* #else #ifdef CONFIG_PREEMPT_RCU */

/*
* Dump stacks of all tasks running on stalled CPUs. First try using
Expand Down

0 comments on commit c130d2d

Please sign in to comment.