Skip to content

Commit 2407a64

Browse files
changbindupaulmckrcu
authored andcommitted
rcu: in_irq() cleanup
This commit replaces the obsolete and ambiguous macro in_irq() with its shiny new in_hardirq() equivalent. Signed-off-by: Changbin Du <changbin.du@gmail.com> Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
1 parent 24ba530 commit 2407a64

3 files changed

Lines changed: 3 additions & 3 deletions

File tree

include/linux/rcutiny.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ static inline void rcu_irq_enter_irqson(void) { }
8585
static inline void rcu_irq_exit(void) { }
8686
static inline void rcu_irq_exit_check_preempt(void) { }
8787
#define rcu_is_idle_cpu(cpu) \
88-
(is_idle_task(current) && !in_nmi() && !in_irq() && !in_serving_softirq())
88+
(is_idle_task(current) && !in_nmi() && !in_hardirq() && !in_serving_softirq())
8989
static inline void exit_rcu(void) { }
9090
static inline bool rcu_preempt_need_deferred_qs(struct task_struct *t)
9191
{

kernel/rcu/tree.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1467,7 +1467,7 @@ static void rcu_gp_kthread_wake(void)
14671467
{
14681468
struct task_struct *t = READ_ONCE(rcu_state.gp_kthread);
14691469

1470-
if ((current == t && !in_irq() && !in_serving_softirq()) ||
1470+
if ((current == t && !in_hardirq() && !in_serving_softirq()) ||
14711471
!READ_ONCE(rcu_state.gp_flags) || !t)
14721472
return;
14731473
WRITE_ONCE(rcu_state.gp_wake_time, jiffies);

kernel/rcu/tree_plugin.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -642,7 +642,7 @@ static void rcu_read_unlock_special(struct task_struct *t)
642642
(IS_ENABLED(CONFIG_RCU_BOOST) && irqs_were_disabled &&
643643
t->rcu_blocked_node);
644644
// Need to defer quiescent state until everything is enabled.
645-
if (use_softirq && (in_irq() || (expboost && !irqs_were_disabled))) {
645+
if (use_softirq && (in_hardirq() || (expboost && !irqs_were_disabled))) {
646646
// Using softirq, safe to awaken, and either the
647647
// wakeup is free or there is either an expedited
648648
// GP in flight or a potential need to deboost.

0 commit comments

Comments
 (0)