Skip to content

Commit 7f8d5f7

Browse files
committed
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()
2 parents d42e504 + 70e0a80 commit 7f8d5f7

7 files changed

Lines changed: 8 additions & 10 deletions

File tree

drivers/bus/fsl-mc/mc-sys.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,7 @@ int mc_send_command(struct fsl_mc_io *mc_io, struct fsl_mc_command *cmd)
248248
enum mc_cmd_status status;
249249
unsigned long irq_flags = 0;
250250

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))
252252
return -EINVAL;
253253

254254
if (mc_io->flags & FSL_MC_IO_ATOMIC_CONTEXT_PORTAL)

drivers/md/dm-vdo/logger.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ static const char *get_current_interrupt_type(void)
3434
if (in_nmi())
3535
return "NMI";
3636

37-
if (in_irq())
37+
if (in_hardirq())
3838
return "HI";
3939

4040
if (in_softirq())

include/linux/lockdep.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -616,7 +616,7 @@ do { \
616616
#define lockdep_assert_in_softirq() \
617617
do { \
618618
WARN_ON_ONCE(__lockdep_enabled && \
619-
(!in_softirq() || in_irq() || in_nmi())); \
619+
(!in_softirq() || in_hardirq() || in_nmi())); \
620620
} while (0)
621621

622622
extern void lockdep_assert_in_softirq_func(void);

include/linux/preempt.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,11 +134,9 @@ static __always_inline unsigned char interrupt_context_level(void)
134134

135135
/*
136136
* The following macros are deprecated and should not be used in new code:
137-
* in_irq() - Obsolete version of in_hardirq()
138137
* in_softirq() - We have BH disabled, or are processing softirqs
139138
* in_interrupt() - We're in NMI,IRQ,SoftIRQ context or have BH disabled
140139
*/
141-
#define in_irq() (hardirq_count())
142140
#define in_softirq() (softirq_count())
143141
#define in_interrupt() (irq_count())
144142

kernel/bpf/syscall.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2330,7 +2330,7 @@ static void bpf_audit_prog(const struct bpf_prog *prog, unsigned int op)
23302330
return;
23312331
if (audit_enabled == AUDIT_OFF)
23322332
return;
2333-
if (!in_irq() && !irqs_disabled())
2333+
if (!in_hardirq() && !irqs_disabled())
23342334
ctx = audit_context();
23352335
ab = audit_log_start(ctx, GFP_ATOMIC, AUDIT_BPF);
23362336
if (unlikely(!ab))
@@ -2428,7 +2428,7 @@ static void __bpf_prog_put(struct bpf_prog *prog)
24282428
struct bpf_prog_aux *aux = prog->aux;
24292429

24302430
if (atomic64_dec_and_test(&aux->refcnt)) {
2431-
if (in_irq() || irqs_disabled()) {
2431+
if (in_hardirq() || irqs_disabled()) {
24322432
INIT_WORK(&aux->work, bpf_prog_put_deferred);
24332433
schedule_work(&aux->work);
24342434
} else {

kernel/time/timer.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2473,7 +2473,7 @@ void update_process_times(int user_tick)
24732473
run_local_timers();
24742474
rcu_sched_clock_irq(user_tick);
24752475
#ifdef CONFIG_IRQ_WORK
2476-
if (in_irq())
2476+
if (in_hardirq())
24772477
irq_work_tick();
24782478
#endif
24792479
sched_tick();

lib/locking-selftest.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ static void init_shared_classes(void)
202202
local_irq_disable(); \
203203
__irq_enter(); \
204204
lockdep_hardirq_threaded(); \
205-
WARN_ON(!in_irq());
205+
WARN_ON(!in_hardirq());
206206

207207
#define HARDIRQ_EXIT() \
208208
__irq_exit(); \
@@ -2512,7 +2512,7 @@ DEFINE_LOCK_GUARD_0(NOTTHREADED_HARDIRQ,
25122512
do {
25132513
local_irq_disable();
25142514
__irq_enter();
2515-
WARN_ON(!in_irq());
2515+
WARN_ON(!in_hardirq());
25162516
} while(0), HARDIRQ_EXIT())
25172517
DEFINE_LOCK_GUARD_0(SOFTIRQ, SOFTIRQ_ENTER(), SOFTIRQ_EXIT())
25182518

0 commit comments

Comments
 (0)