]> www.infradead.org Git - users/jedix/linux-maple.git/commit
srcu: Create CPP macros for normal and NMI-safe SRCU readers
authorPaul E. McKenney <paulmck@kernel.org>
Tue, 15 Oct 2024 16:11:04 +0000 (09:11 -0700)
committerFrederic Weisbecker <frederic@kernel.org>
Tue, 12 Nov 2024 14:43:21 +0000 (15:43 +0100)
commit05829be27fe6f64e0675dc3be3a12d43b52492e1
tree6826b594fda28cf369a03b3c4b3a72ea676b8991
parentc071b8e5351453c2cb2d12f425d928f3a24ed2d3
srcu: Create CPP macros for normal and NMI-safe SRCU readers

This commit creates SRCU_READ_FLAVOR_NORMAL and SRCU_READ_FLAVOR_NMI
C-preprocessor macros for srcu_read_lock() and srcu_read_lock_nmisafe(),
respectively.  These replace the old true/false values that were
previously passed to srcu_check_read_flavor().  In addition, the
srcu_check_read_flavor() function itself requires a bit of rework to
handle bitmasks instead of true/false values.

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: Paul E. McKenney <paulmck@kernel.org>
Reviewed-by: Neeraj Upadhyay <Neeraj.Upadhyay@amd.com>
Signed-off-by: Frederic Weisbecker <frederic@kernel.org>
include/linux/srcu.h
include/linux/srcutree.h
kernel/rcu/srcutree.c