Merge tag 'trace-printf-v6.13' of git://git.kernel.org/pub/scm/linux/kernel/git/trace...
[drm/drm-misc.git] / include / linux / rcu_notifier.h
blob5640f024773b3762d75a72e03b87b1624e0e5d84
1 /* SPDX-License-Identifier: GPL-2.0+ */
2 /*
3 * Read-Copy Update notifiers, initially RCU CPU stall notifier.
4 * Separate from rcupdate.h to avoid #include loops.
6 * Copyright (C) 2023 Paul E. McKenney.
7 */
9 #ifndef __LINUX_RCU_NOTIFIER_H
10 #define __LINUX_RCU_NOTIFIER_H
12 // Actions for RCU CPU stall notifier calls.
13 #define RCU_STALL_NOTIFY_NORM 1
14 #define RCU_STALL_NOTIFY_EXP 2
16 #if defined(CONFIG_RCU_STALL_COMMON) && defined(CONFIG_RCU_CPU_STALL_NOTIFIER)
18 #include <linux/notifier.h>
19 #include <linux/types.h>
21 int rcu_stall_chain_notifier_register(struct notifier_block *n);
22 int rcu_stall_chain_notifier_unregister(struct notifier_block *n);
24 #else // #if defined(CONFIG_RCU_STALL_COMMON) && defined(CONFIG_RCU_CPU_STALL_NOTIFIER)
26 // No RCU CPU stall warnings in Tiny RCU.
27 static inline int rcu_stall_chain_notifier_register(struct notifier_block *n) { return -EEXIST; }
28 static inline int rcu_stall_chain_notifier_unregister(struct notifier_block *n) { return -ENOENT; }
30 #endif // #else // #if defined(CONFIG_RCU_STALL_COMMON) && defined(CONFIG_RCU_CPU_STALL_NOTIFIER)
32 #endif /* __LINUX_RCU_NOTIFIER_H */