Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge tag 'core-core-2025-12-03' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull core irq cleanup from Thomas Gleixner:
"Tree wide cleanup of the remaining users of in_irq() which got
replaced by in_hardirq() and marked deprecated in 2020"

* tag 'core-core-2025-12-03' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
treewide: Remove in_irq()

+8 -10
+1 -1
drivers/bus/fsl-mc/mc-sys.c
··· 248 248 enum mc_cmd_status status; 249 249 unsigned long irq_flags = 0; 250 250 251 - if (in_irq() && !(mc_io->flags & FSL_MC_IO_ATOMIC_CONTEXT_PORTAL)) 251 + if (in_hardirq() && !(mc_io->flags & FSL_MC_IO_ATOMIC_CONTEXT_PORTAL)) 252 252 return -EINVAL; 253 253 254 254 if (mc_io->flags & FSL_MC_IO_ATOMIC_CONTEXT_PORTAL)
+1 -1
drivers/md/dm-vdo/logger.c
··· 34 34 if (in_nmi()) 35 35 return "NMI"; 36 36 37 - if (in_irq()) 37 + if (in_hardirq()) 38 38 return "HI"; 39 39 40 40 if (in_softirq())
+1 -1
include/linux/lockdep.h
··· 616 616 #define lockdep_assert_in_softirq() \ 617 617 do { \ 618 618 WARN_ON_ONCE(__lockdep_enabled && \ 619 - (!in_softirq() || in_irq() || in_nmi())); \ 619 + (!in_softirq() || in_hardirq() || in_nmi())); \ 620 620 } while (0) 621 621 622 622 extern void lockdep_assert_in_softirq_func(void);
-2
include/linux/preempt.h
··· 134 134 135 135 /* 136 136 * The following macros are deprecated and should not be used in new code: 137 - * in_irq() - Obsolete version of in_hardirq() 138 137 * in_softirq() - We have BH disabled, or are processing softirqs 139 138 * in_interrupt() - We're in NMI,IRQ,SoftIRQ context or have BH disabled 140 139 */ 141 - #define in_irq() (hardirq_count()) 142 140 #define in_softirq() (softirq_count()) 143 141 #define in_interrupt() (irq_count()) 144 142
+2 -2
kernel/bpf/syscall.c
··· 2330 2330 return; 2331 2331 if (audit_enabled == AUDIT_OFF) 2332 2332 return; 2333 - if (!in_irq() && !irqs_disabled()) 2333 + if (!in_hardirq() && !irqs_disabled()) 2334 2334 ctx = audit_context(); 2335 2335 ab = audit_log_start(ctx, GFP_ATOMIC, AUDIT_BPF); 2336 2336 if (unlikely(!ab)) ··· 2428 2428 struct bpf_prog_aux *aux = prog->aux; 2429 2429 2430 2430 if (atomic64_dec_and_test(&aux->refcnt)) { 2431 - if (in_irq() || irqs_disabled()) { 2431 + if (in_hardirq() || irqs_disabled()) { 2432 2432 INIT_WORK(&aux->work, bpf_prog_put_deferred); 2433 2433 schedule_work(&aux->work); 2434 2434 } else {
+1 -1
kernel/time/timer.c
··· 2473 2473 run_local_timers(); 2474 2474 rcu_sched_clock_irq(user_tick); 2475 2475 #ifdef CONFIG_IRQ_WORK 2476 - if (in_irq()) 2476 + if (in_hardirq()) 2477 2477 irq_work_tick(); 2478 2478 #endif 2479 2479 sched_tick();
+2 -2
lib/locking-selftest.c
··· 202 202 local_irq_disable(); \ 203 203 __irq_enter(); \ 204 204 lockdep_hardirq_threaded(); \ 205 - WARN_ON(!in_irq()); 205 + WARN_ON(!in_hardirq()); 206 206 207 207 #define HARDIRQ_EXIT() \ 208 208 __irq_exit(); \ ··· 2512 2512 do { 2513 2513 local_irq_disable(); 2514 2514 __irq_enter(); 2515 - WARN_ON(!in_irq()); 2515 + WARN_ON(!in_hardirq()); 2516 2516 } while(0), HARDIRQ_EXIT()) 2517 2517 DEFINE_LOCK_GUARD_0(SOFTIRQ, SOFTIRQ_ENTER(), SOFTIRQ_EXIT()) 2518 2518