Skip to content

Commit

Permalink
rcu: Fix rcu_is_cpu_idle() #ifdef in TINY_RCU
Browse files Browse the repository at this point in the history
The rcu_is_cpu_idle() function is used if CONFIG_DEBUG_LOCK_ALLOC,
but TINY_RCU defines it only when CONFIG_PROVE_RCU.  This causes
build failures when CONFIG_DEBUG_LOCK_ALLOC=y but CONFIG_PROVE_RCU=n.
This commit therefore adjusts the #ifdefs for rcu_is_cpu_idle() so
that it is defined when CONFIG_DEBUG_LOCK_ALLOC=y.

Signed-off-by: Paul E. McKenney <paul.mckenney@linaro.org>
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
  • Loading branch information
Paul E. McKenney authored and Paul E. McKenney committed Jul 2, 2012
1 parent 29154c5 commit d711817
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions kernel/rcutiny.c
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ void rcu_irq_enter(void)
local_irq_restore(flags);
}

#ifdef CONFIG_PROVE_RCU
#ifdef CONFIG_DEBUG_LOCK_ALLOC

/*
* Test whether RCU thinks that the current CPU is idle.
Expand All @@ -183,7 +183,7 @@ int rcu_is_cpu_idle(void)
}
EXPORT_SYMBOL(rcu_is_cpu_idle);

#endif /* #ifdef CONFIG_PROVE_RCU */
#endif /* #ifdef CONFIG_DEBUG_LOCK_ALLOC */

/*
* Test whether the current CPU was interrupted from idle. Nested
Expand Down

0 comments on commit d711817

Please sign in to comment.