@@ -195,6 +195,49 @@ static __always_inline bool tif_need_resched(void)
#endif /* _ASM_GENERIC_BITOPS_INSTRUMENTED_NON_ATOMIC_H */
+#ifdef TIF_NOTIFY_IPI
+
+#ifdef _ASM_GENERIC_BITOPS_INSTRUMENTED_NON_ATOMIC_H
+
+static __always_inline bool tif_notify_ipi(void)
+{
+ return arch_test_bit(TIF_NOTIFY_IPI,
+ (unsigned long *)(¤t_thread_info()->flags));
+}
+
+static __always_inline void current_clr_notify_ipi(void)
+{
+ arch_clear_bit(TIF_NOTIFY_IPI,
+ (unsigned long *)(¤t_thread_info()->flags));
+}
+
+#else
+
+static __always_inline bool tif_notify_ipi(void)
+{
+ return test_bit(TIF_NOTIFY_IPI,
+ (unsigned long *)(¤t_thread_info()->flags));
+}
+
+static __always_inline void current_clr_notify_ipi(void)
+{
+ clear_bit(TIF_NOTIFY_IPI,
+ (unsigned long *)(¤t_thread_info()->flags));
+}
+
+#endif /* _ASM_GENERIC_BITOPS_INSTRUMENTED_NON_ATOMIC_H */
+
+#else /* !TIF_NOTIFY_IPI */
+
+static __always_inline bool tif_notify_ipi(void)
+{
+ return false;
+}
+
+static __always_inline void current_clr_notify_ipi(void) { }
+
+#endif /* TIF_NOTIFY_IPI */
+
#ifndef CONFIG_HAVE_ARCH_WITHIN_STACK_FRAMES
static inline int arch_within_stack_frames(const void * const stack,
const void * const stackend,