Linux 4.19.133
[linux/fpc-iii.git] / tools / testing / selftests / rcutorture / configs / rcu / ver_functions.sh
blob7bab8246392bb21f982e3803f77860717513a084
1 #!/bin/bash
3 # Kernel-version-dependent shell functions for the rest of the scripts.
5 # This program is free software; you can redistribute it and/or modify
6 # it under the terms of the GNU General Public License as published by
7 # the Free Software Foundation; either version 2 of the License, or
8 # (at your option) any later version.
10 # This program is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 # GNU General Public License for more details.
15 # You should have received a copy of the GNU General Public License
16 # along with this program; if not, you can access it online at
17 # http://www.gnu.org/licenses/gpl-2.0.html.
19 # Copyright (C) IBM Corporation, 2013
21 # Authors: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
23 # rcutorture_param_n_barrier_cbs bootparam-string
25 # Adds n_barrier_cbs rcutorture module parameter to kernels having it.
26 rcutorture_param_n_barrier_cbs () {
27 if echo $1 | grep -q "rcutorture\.n_barrier_cbs"
28 then
30 else
31 echo rcutorture.n_barrier_cbs=4
35 # rcutorture_param_onoff bootparam-string config-file
37 # Adds onoff rcutorture module parameters to kernels having it.
38 rcutorture_param_onoff () {
39 if ! bootparam_hotplug_cpu "$1" && configfrag_hotplug_cpu "$2"
40 then
41 echo CPU-hotplug kernel, adding rcutorture onoff. 1>&2
42 echo rcutorture.onoff_interval=1000 rcutorture.onoff_holdoff=30
46 # per_version_boot_params bootparam-string config-file seconds
48 # Adds per-version torture-module parameters to kernels supporting them.
49 per_version_boot_params () {
50 echo $1 `rcutorture_param_onoff "$1" "$2"` \
51 `rcutorture_param_n_barrier_cbs "$1"` \
52 rcutorture.stat_interval=15 \
53 rcutorture.shutdown_secs=$3 \
54 rcutorture.test_no_idle_hz=1 \
55 rcutorture.verbose=1