Skip to content

Commit eb1b51a

Browse files
mrutland-armThomas Gleixner
authored andcommitted
entry: Move irqentry_enter() prototype later
Subsequent patches will rework the irqentry_*() functions. The end result (and the intermediate diffs) will be much clearer if the prototype for the irqentry_enter() function is moved later, immediately before the prototype of the irqentry_exit() function. Move the prototype later. This is purely a move; there should be no functional change as a result of this change. Signed-off-by: Mark Rutland <mark.rutland@arm.com> Signed-off-by: Thomas Gleixner <tglx@kernel.org> Reviewed-by: Jinjie Ruan <ruanjinjie@huawei.com> Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org> Link: https://patch.msgid.link/20260407131650.3813777-4-mark.rutland@arm.com
1 parent 22f66e7 commit eb1b51a

1 file changed

Lines changed: 22 additions & 22 deletions

File tree

include/linux/irq-entry-common.h

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -334,6 +334,28 @@ typedef struct irqentry_state {
334334
} irqentry_state_t;
335335
#endif
336336

337+
/**
338+
* irqentry_exit_cond_resched - Conditionally reschedule on return from interrupt
339+
*
340+
* Conditional reschedule with additional sanity checks.
341+
*/
342+
void raw_irqentry_exit_cond_resched(void);
343+
344+
#ifdef CONFIG_PREEMPT_DYNAMIC
345+
#if defined(CONFIG_HAVE_PREEMPT_DYNAMIC_CALL)
346+
#define irqentry_exit_cond_resched_dynamic_enabled raw_irqentry_exit_cond_resched
347+
#define irqentry_exit_cond_resched_dynamic_disabled NULL
348+
DECLARE_STATIC_CALL(irqentry_exit_cond_resched, raw_irqentry_exit_cond_resched);
349+
#define irqentry_exit_cond_resched() static_call(irqentry_exit_cond_resched)()
350+
#elif defined(CONFIG_HAVE_PREEMPT_DYNAMIC_KEY)
351+
DECLARE_STATIC_KEY_TRUE(sk_dynamic_irqentry_exit_cond_resched);
352+
void dynamic_irqentry_exit_cond_resched(void);
353+
#define irqentry_exit_cond_resched() dynamic_irqentry_exit_cond_resched()
354+
#endif
355+
#else /* CONFIG_PREEMPT_DYNAMIC */
356+
#define irqentry_exit_cond_resched() raw_irqentry_exit_cond_resched()
357+
#endif /* CONFIG_PREEMPT_DYNAMIC */
358+
337359
/**
338360
* irqentry_enter - Handle state tracking on ordinary interrupt entries
339361
* @regs: Pointer to pt_regs of interrupted context
@@ -367,28 +389,6 @@ typedef struct irqentry_state {
367389
*/
368390
irqentry_state_t noinstr irqentry_enter(struct pt_regs *regs);
369391

370-
/**
371-
* irqentry_exit_cond_resched - Conditionally reschedule on return from interrupt
372-
*
373-
* Conditional reschedule with additional sanity checks.
374-
*/
375-
void raw_irqentry_exit_cond_resched(void);
376-
377-
#ifdef CONFIG_PREEMPT_DYNAMIC
378-
#if defined(CONFIG_HAVE_PREEMPT_DYNAMIC_CALL)
379-
#define irqentry_exit_cond_resched_dynamic_enabled raw_irqentry_exit_cond_resched
380-
#define irqentry_exit_cond_resched_dynamic_disabled NULL
381-
DECLARE_STATIC_CALL(irqentry_exit_cond_resched, raw_irqentry_exit_cond_resched);
382-
#define irqentry_exit_cond_resched() static_call(irqentry_exit_cond_resched)()
383-
#elif defined(CONFIG_HAVE_PREEMPT_DYNAMIC_KEY)
384-
DECLARE_STATIC_KEY_TRUE(sk_dynamic_irqentry_exit_cond_resched);
385-
void dynamic_irqentry_exit_cond_resched(void);
386-
#define irqentry_exit_cond_resched() dynamic_irqentry_exit_cond_resched()
387-
#endif
388-
#else /* CONFIG_PREEMPT_DYNAMIC */
389-
#define irqentry_exit_cond_resched() raw_irqentry_exit_cond_resched()
390-
#endif /* CONFIG_PREEMPT_DYNAMIC */
391-
392392
/**
393393
* irqentry_exit - Handle return from exception that used irqentry_enter()
394394
* @regs: Pointer to pt_regs (exception entry regs)

0 commit comments

Comments
 (0)