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