xref: /linux/arch/powerpc/include/asm/preempt.h (revision 3349ada3cffdbe4579872a004360daa31938f683)
1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef __ASM_POWERPC_PREEMPT_H
3 #define __ASM_POWERPC_PREEMPT_H
4 
5 #include <asm-generic/preempt.h>
6 
7 #if defined(CONFIG_PREEMPT_DYNAMIC)
8 #include <linux/jump_label.h>
9 DECLARE_STATIC_KEY_TRUE(sk_dynamic_irqentry_exit_cond_resched);
10 #define need_irq_preemption() \
11 	(static_branch_unlikely(&sk_dynamic_irqentry_exit_cond_resched))
12 #else
13 #define need_irq_preemption()   (IS_ENABLED(CONFIG_PREEMPTION))
14 #endif
15 
16 #endif /* __ASM_POWERPC_PREEMPT_H */
17