srcu: Define SRCU_READ_FLAVOR_ALL in terms of symbols
authorPaul E. McKenney <paulmck@kernel.org>
Wed, 11 Dec 2024 20:39:58 +0000 (12:39 -0800)
committerBoqun Feng <boqun.feng@gmail.com>
Wed, 5 Feb 2025 15:12:05 +0000 (07:12 -0800)
This commit defines SRCU_READ_FLAVOR_ALL in terms of the
SRCU_READ_FLAVOR_* definitions instead of a hexadecimal constant.

Suggested-by: Neeraj Upadhyay <Neeraj.Upadhyay@amd.com>
Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
Cc: Alexei Starovoitov <ast@kernel.org>
Cc: Andrii Nakryiko <andrii@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Kent Overstreet <kent.overstreet@linux.dev>
Cc: <bpf@vger.kernel.org>
Signed-off-by: Boqun Feng <boqun.feng@gmail.com>
include/linux/srcu.h

index d7ba46e74f58e9c3c13d84433bdaf4ab24d5b20c..f6f779b9d9ff219d92e6d2741cb665d59b76050e 100644 (file)
@@ -47,7 +47,8 @@ int init_srcu_struct(struct srcu_struct *ssp);
 #define SRCU_READ_FLAVOR_NORMAL        0x1             // srcu_read_lock().
 #define SRCU_READ_FLAVOR_NMI   0x2             // srcu_read_lock_nmisafe().
 #define SRCU_READ_FLAVOR_LITE  0x4             // srcu_read_lock_lite().
-#define SRCU_READ_FLAVOR_ALL   0x7             // All of the above.
+#define SRCU_READ_FLAVOR_ALL   (SRCU_READ_FLAVOR_NORMAL | SRCU_READ_FLAVOR_NMI | \
+                               SRCU_READ_FLAVOR_LITE) // All of the above.
 
 #ifdef CONFIG_TINY_SRCU
 #include <linux/srcutiny.h>