summaryrefslogtreecommitdiff
path: root/arch/powerpc/include/asm/preempt.h
blob: 000e2b9681f3086985330b25b18a3dda0c4c5ea0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
/* SPDX-License-Identifier: GPL-2.0 */
#ifndef __ASM_POWERPC_PREEMPT_H
#define __ASM_POWERPC_PREEMPT_H

#include <asm-generic/preempt.h>

#if defined(CONFIG_PREEMPT_DYNAMIC)
#include <linux/jump_label.h>
DECLARE_STATIC_KEY_TRUE(sk_dynamic_irqentry_exit_cond_resched);
#define need_irq_preemption() \
	(static_branch_unlikely(&sk_dynamic_irqentry_exit_cond_resched))
#else
#define need_irq_preemption()   (IS_ENABLED(CONFIG_PREEMPTION))
#endif

#endif /* __ASM_POWERPC_PREEMPT_H */