Merge branch 'for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu into core/rcu
Pull RCU changes from Paul E. McKenney:
- Convert RCU's BUG_ON() and similar calls to WARN_ON() and similar.
- Replace calls of RCU-bh and RCU-sched update-side functions
to their vanilla RCU counterparts. This series is a step
towards complete removal of the RCU-bh and RCU-sched update-side
functions.
( Note that some of these conversions are going upstream via their
respective maintainers. )
- Documentation updates, including a number of flavor-consolidation
updates from Joel Fernandes.
- Miscellaneous fixes.
- Automate generation of the initrd filesystem used for
rcutorture testing.
- Convert spin_is_locked() assertions to instead use lockdep.
( Note that some of these conversions are going upstream via their
respective maintainers. )
- SRCU updates, especially including a fix from Dennis Krein
for a bag-on-head-class bug.
- RCU torture-test updates.
Signed-off-by: Ingo Molnar <mingo@kernel.org>
This commit is contained in:
@@ -573,6 +573,27 @@ foreach my $entry (@mode_permission_funcs) {
|
||||
}
|
||||
$mode_perms_search = "(?:${mode_perms_search})";
|
||||
|
||||
our %deprecated_apis = (
|
||||
"synchronize_rcu_bh" => "synchronize_rcu",
|
||||
"synchronize_rcu_bh_expedited" => "synchronize_rcu_expedited",
|
||||
"call_rcu_bh" => "call_rcu",
|
||||
"rcu_barrier_bh" => "rcu_barrier",
|
||||
"synchronize_sched" => "synchronize_rcu",
|
||||
"synchronize_sched_expedited" => "synchronize_rcu_expedited",
|
||||
"call_rcu_sched" => "call_rcu",
|
||||
"rcu_barrier_sched" => "rcu_barrier",
|
||||
"get_state_synchronize_sched" => "get_state_synchronize_rcu",
|
||||
"cond_synchronize_sched" => "cond_synchronize_rcu",
|
||||
);
|
||||
|
||||
#Create a search pattern for all these strings to speed up a loop below
|
||||
our $deprecated_apis_search = "";
|
||||
foreach my $entry (keys %deprecated_apis) {
|
||||
$deprecated_apis_search .= '|' if ($deprecated_apis_search ne "");
|
||||
$deprecated_apis_search .= $entry;
|
||||
}
|
||||
$deprecated_apis_search = "(?:${deprecated_apis_search})";
|
||||
|
||||
our $mode_perms_world_writable = qr{
|
||||
S_IWUGO |
|
||||
S_IWOTH |
|
||||
@@ -6368,6 +6389,20 @@ sub process {
|
||||
"please use device_initcall() or more appropriate function instead of __initcall() (see include/linux/init.h)\n" . $herecurr);
|
||||
}
|
||||
|
||||
# check for spin_is_locked(), suggest lockdep instead
|
||||
if ($line =~ /\bspin_is_locked\(/) {
|
||||
WARN("USE_LOCKDEP",
|
||||
"Where possible, use lockdep_assert_held instead of assertions based on spin_is_locked\n" . $herecurr);
|
||||
}
|
||||
|
||||
# check for deprecated apis
|
||||
if ($line =~ /\b($deprecated_apis_search)\b\s*\(/) {
|
||||
my $deprecated_api = $1;
|
||||
my $new_api = $deprecated_apis{$deprecated_api};
|
||||
WARN("DEPRECATED_API",
|
||||
"Deprecated use of '$deprecated_api', prefer '$new_api' instead\n" . $herecurr);
|
||||
}
|
||||
|
||||
# check for various structs that are normally const (ops, kgdb, device_tree)
|
||||
# and avoid what seem like struct definitions 'struct foo {'
|
||||
if ($line !~ /\bconst\b/ &&
|
||||
|
||||
Reference in New Issue
Block a user