diff options
Diffstat (limited to 'tools')
168 files changed, 5056 insertions, 32 deletions
diff --git a/tools/lib/lockdep/Makefile b/tools/lib/lockdep/Makefile new file mode 100644 index 000000000000..da8b7aa3d351 --- /dev/null +++ b/tools/lib/lockdep/Makefile | |||
@@ -0,0 +1,251 @@ | |||
1 | # liblockdep version | ||
2 | LL_VERSION = 0 | ||
3 | LL_PATCHLEVEL = 0 | ||
4 | LL_EXTRAVERSION = 1 | ||
5 | |||
6 | # file format version | ||
7 | FILE_VERSION = 1 | ||
8 | |||
9 | MAKEFLAGS += --no-print-directory | ||
10 | |||
11 | |||
12 | # Makefiles suck: This macro sets a default value of $(2) for the | ||
13 | # variable named by $(1), unless the variable has been set by | ||
14 | # environment or command line. This is necessary for CC and AR | ||
15 | # because make sets default values, so the simpler ?= approach | ||
16 | # won't work as expected. | ||
17 | define allow-override | ||
18 | $(if $(or $(findstring environment,$(origin $(1))),\ | ||
19 | $(findstring command line,$(origin $(1)))),,\ | ||
20 | $(eval $(1) = $(2))) | ||
21 | endef | ||
22 | |||
23 | # Allow setting CC and AR, or setting CROSS_COMPILE as a prefix. | ||
24 | $(call allow-override,CC,$(CROSS_COMPILE)gcc) | ||
25 | $(call allow-override,AR,$(CROSS_COMPILE)ar) | ||
26 | |||
27 | INSTALL = install | ||
28 | |||
29 | # Use DESTDIR for installing into a different root directory. | ||
30 | # This is useful for building a package. The program will be | ||
31 | # installed in this directory as if it was the root directory. | ||
32 | # Then the build tool can move it later. | ||
33 | DESTDIR ?= | ||
34 | DESTDIR_SQ = '$(subst ','\'',$(DESTDIR))' | ||
35 | |||
36 | prefix ?= /usr/local | ||
37 | libdir_relative = lib | ||
38 | libdir = $(prefix)/$(libdir_relative) | ||
39 | bindir_relative = bin | ||
40 | bindir = $(prefix)/$(bindir_relative) | ||
41 | |||
42 | export DESTDIR DESTDIR_SQ INSTALL | ||
43 | |||
44 | # copy a bit from Linux kbuild | ||
45 | |||
46 | ifeq ("$(origin V)", "command line") | ||
47 | VERBOSE = $(V) | ||
48 | endif | ||
49 | ifndef VERBOSE | ||
50 | VERBOSE = 0 | ||
51 | endif | ||
52 | |||
53 | ifeq ("$(origin O)", "command line") | ||
54 | BUILD_OUTPUT := $(O) | ||
55 | endif | ||
56 | |||
57 | ifeq ($(BUILD_SRC),) | ||
58 | ifneq ($(BUILD_OUTPUT),) | ||
59 | |||
60 | define build_output | ||
61 | $(if $(VERBOSE:1=),@)$(MAKE) -C $(BUILD_OUTPUT) \ | ||
62 | BUILD_SRC=$(CURDIR) -f $(CURDIR)/Makefile $1 | ||
63 | endef | ||
64 | |||
65 | saved-output := $(BUILD_OUTPUT) | ||
66 | BUILD_OUTPUT := $(shell cd $(BUILD_OUTPUT) && /bin/pwd) | ||
67 | $(if $(BUILD_OUTPUT),, \ | ||
68 | $(error output directory "$(saved-output)" does not exist)) | ||
69 | |||
70 | all: sub-make | ||
71 | |||
72 | gui: force | ||
73 | $(call build_output, all_cmd) | ||
74 | |||
75 | $(filter-out gui,$(MAKECMDGOALS)): sub-make | ||
76 | |||
77 | sub-make: force | ||
78 | $(call build_output, $(MAKECMDGOALS)) | ||
79 | |||
80 | |||
81 | # Leave processing to above invocation of make | ||
82 | skip-makefile := 1 | ||
83 | |||
84 | endif # BUILD_OUTPUT | ||
85 | endif # BUILD_SRC | ||
86 | |||
87 | # We process the rest of the Makefile if this is the final invocation of make | ||
88 | ifeq ($(skip-makefile),) | ||
89 | |||
90 | srctree := $(if $(BUILD_SRC),$(BUILD_SRC),$(CURDIR)) | ||
91 | objtree := $(CURDIR) | ||
92 | src := $(srctree) | ||
93 | obj := $(objtree) | ||
94 | |||
95 | export prefix libdir bindir src obj | ||
96 | |||
97 | # Shell quotes | ||
98 | libdir_SQ = $(subst ','\'',$(libdir)) | ||
99 | bindir_SQ = $(subst ','\'',$(bindir)) | ||
100 | |||
101 | LIB_FILE = liblockdep.a liblockdep.so | ||
102 | BIN_FILE = lockdep | ||
103 | |||
104 | CONFIG_INCLUDES = | ||
105 | CONFIG_LIBS = | ||
106 | CONFIG_FLAGS = | ||
107 | |||
108 | OBJ = $@ | ||
109 | N = | ||
110 | |||
111 | export Q VERBOSE | ||
112 | |||
113 | LIBLOCKDEP_VERSION = $(LL_VERSION).$(LL_PATCHLEVEL).$(LL_EXTRAVERSION) | ||
114 | |||
115 | INCLUDES = -I. -I/usr/local/include -I./uinclude $(CONFIG_INCLUDES) | ||
116 | |||
117 | # Set compile option CFLAGS if not set elsewhere | ||
118 | CFLAGS ?= -g -DCONFIG_LOCKDEP -DCONFIG_STACKTRACE -DCONFIG_PROVE_LOCKING -DBITS_PER_LONG=__WORDSIZE -DLIBLOCKDEP_VERSION='"$(LIBLOCKDEP_VERSION)"' -rdynamic -O0 -g | ||
119 | |||
120 | override CFLAGS += $(CONFIG_FLAGS) $(INCLUDES) $(PLUGIN_DIR_SQ) | ||
121 | |||
122 | ifeq ($(VERBOSE),1) | ||
123 | Q = | ||
124 | print_compile = | ||
125 | print_app_build = | ||
126 | print_fpic_compile = | ||
127 | print_shared_lib_compile = | ||
128 | print_install = | ||
129 | else | ||
130 | Q = @ | ||
131 | print_compile = echo ' CC '$(OBJ); | ||
132 | print_app_build = echo ' BUILD '$(OBJ); | ||
133 | print_fpic_compile = echo ' CC FPIC '$(OBJ); | ||
134 | print_shared_lib_compile = echo ' BUILD SHARED LIB '$(OBJ); | ||
135 | print_static_lib_build = echo ' BUILD STATIC LIB '$(OBJ); | ||
136 | print_install = echo ' INSTALL '$1' to $(DESTDIR_SQ)$2'; | ||
137 | endif | ||
138 | |||
139 | do_fpic_compile = \ | ||
140 | ($(print_fpic_compile) \ | ||
141 | $(CC) -c $(CFLAGS) $(EXT) -fPIC $< -o $@) | ||
142 | |||
143 | do_app_build = \ | ||
144 | ($(print_app_build) \ | ||
145 | $(CC) $^ -rdynamic -o $@ $(CONFIG_LIBS) $(LIBS)) | ||
146 | |||
147 | do_compile_shared_library = \ | ||
148 | ($(print_shared_lib_compile) \ | ||
149 | $(CC) --shared $^ -o $@ -lpthread -ldl) | ||
150 | |||
151 | do_build_static_lib = \ | ||
152 | ($(print_static_lib_build) \ | ||
153 | $(RM) $@; $(AR) rcs $@ $^) | ||
154 | |||
155 | |||
156 | define do_compile | ||
157 | $(print_compile) \ | ||
158 | $(CC) -c $(CFLAGS) $(EXT) $< -o $(obj)/$@; | ||
159 | endef | ||
160 | |||
161 | $(obj)/%.o: $(src)/%.c | ||
162 | $(Q)$(call do_compile) | ||
163 | |||
164 | %.o: $(src)/%.c | ||
165 | $(Q)$(call do_compile) | ||
166 | |||
167 | PEVENT_LIB_OBJS = common.o lockdep.o preload.o rbtree.o | ||
168 | |||
169 | ALL_OBJS = $(PEVENT_LIB_OBJS) | ||
170 | |||
171 | CMD_TARGETS = $(LIB_FILE) | ||
172 | |||
173 | TARGETS = $(CMD_TARGETS) | ||
174 | |||
175 | |||
176 | all: all_cmd | ||
177 | |||
178 | all_cmd: $(CMD_TARGETS) | ||
179 | |||
180 | liblockdep.so: $(PEVENT_LIB_OBJS) | ||
181 | $(Q)$(do_compile_shared_library) | ||
182 | |||
183 | liblockdep.a: $(PEVENT_LIB_OBJS) | ||
184 | $(Q)$(do_build_static_lib) | ||
185 | |||
186 | $(PEVENT_LIB_OBJS): %.o: $(src)/%.c | ||
187 | $(Q)$(do_fpic_compile) | ||
188 | |||
189 | ## make deps | ||
190 | |||
191 | all_objs := $(sort $(ALL_OBJS)) | ||
192 | all_deps := $(all_objs:%.o=.%.d) | ||
193 | |||
194 | # let .d file also depends on the source and header files | ||
195 | define check_deps | ||
196 | @set -e; $(RM) $@; \ | ||
197 | $(CC) -MM $(CFLAGS) $< > $@.$$$$; \ | ||
198 | sed 's,\($*\)\.o[ :]*,\1.o $@ : ,g' < $@.$$$$ > $@; \ | ||
199 | $(RM) $@.$$$$ | ||
200 | endef | ||
201 | |||
202 | $(all_deps): .%.d: $(src)/%.c | ||
203 | $(Q)$(call check_deps) | ||
204 | |||
205 | $(all_objs) : %.o : .%.d | ||
206 | |||
207 | dep_includes := $(wildcard $(all_deps)) | ||
208 | |||
209 | ifneq ($(dep_includes),) | ||
210 | include $(dep_includes) | ||
211 | endif | ||
212 | |||
213 | ### Detect environment changes | ||
214 | TRACK_CFLAGS = $(subst ','\'',$(CFLAGS)):$(ARCH):$(CROSS_COMPILE) | ||
215 | |||
216 | tags: force | ||
217 | $(RM) tags | ||
218 | find . -name '*.[ch]' | xargs ctags --extra=+f --c-kinds=+px \ | ||
219 | --regex-c++='/_PE\(([^,)]*).*/PEVENT_ERRNO__\1/' | ||
220 | |||
221 | TAGS: force | ||
222 | $(RM) TAGS | ||
223 | find . -name '*.[ch]' | xargs etags \ | ||
224 | --regex='/_PE(\([^,)]*\).*/PEVENT_ERRNO__\1/' | ||
225 | |||
226 | define do_install | ||
227 | $(print_install) \ | ||
228 | if [ ! -d '$(DESTDIR_SQ)$2' ]; then \ | ||
229 | $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$2'; \ | ||
230 | fi; \ | ||
231 | $(INSTALL) $1 '$(DESTDIR_SQ)$2' | ||
232 | endef | ||
233 | |||
234 | install_lib: all_cmd | ||
235 | $(Q)$(call do_install,$(LIB_FILE),$(libdir_SQ)) | ||
236 | $(Q)$(call do_install,$(BIN_FILE),$(bindir_SQ)) | ||
237 | |||
238 | install: install_lib | ||
239 | |||
240 | clean: | ||
241 | $(RM) *.o *~ $(TARGETS) *.a *.so $(VERSION_FILES) .*.d | ||
242 | $(RM) tags TAGS | ||
243 | |||
244 | endif # skip-makefile | ||
245 | |||
246 | PHONY += force | ||
247 | force: | ||
248 | |||
249 | # Declare the contents of the .PHONY variable as phony. We keep that | ||
250 | # information in a variable so we can use it in if_changed and friends. | ||
251 | .PHONY: $(PHONY) | ||
diff --git a/tools/lib/lockdep/common.c b/tools/lib/lockdep/common.c new file mode 100644 index 000000000000..8ef602f18a32 --- /dev/null +++ b/tools/lib/lockdep/common.c | |||
@@ -0,0 +1,33 @@ | |||
1 | #include <stddef.h> | ||
2 | #include <stdbool.h> | ||
3 | #include <linux/compiler.h> | ||
4 | #include <linux/lockdep.h> | ||
5 | #include <unistd.h> | ||
6 | #include <sys/syscall.h> | ||
7 | |||
8 | static __thread struct task_struct current_obj; | ||
9 | |||
10 | /* lockdep wants these */ | ||
11 | bool debug_locks = true; | ||
12 | bool debug_locks_silent; | ||
13 | |||
14 | __attribute__((constructor)) static void liblockdep_init(void) | ||
15 | { | ||
16 | lockdep_init(); | ||
17 | } | ||
18 | |||
19 | __attribute__((destructor)) static void liblockdep_exit(void) | ||
20 | { | ||
21 | debug_check_no_locks_held(¤t_obj); | ||
22 | } | ||
23 | |||
24 | struct task_struct *__curr(void) | ||
25 | { | ||
26 | if (current_obj.pid == 0) { | ||
27 | /* Makes lockdep output pretty */ | ||
28 | prctl(PR_GET_NAME, current_obj.comm); | ||
29 | current_obj.pid = syscall(__NR_gettid); | ||
30 | } | ||
31 | |||
32 | return ¤t_obj; | ||
33 | } | ||
diff --git a/tools/lib/lockdep/include/liblockdep/common.h b/tools/lib/lockdep/include/liblockdep/common.h new file mode 100644 index 000000000000..0bda630027c3 --- /dev/null +++ b/tools/lib/lockdep/include/liblockdep/common.h | |||
@@ -0,0 +1,50 @@ | |||
1 | #ifndef _LIBLOCKDEP_COMMON_H | ||
2 | #define _LIBLOCKDEP_COMMON_H | ||
3 | |||
4 | #include <pthread.h> | ||
5 | |||
6 | #define NR_LOCKDEP_CACHING_CLASSES 2 | ||
7 | #define MAX_LOCKDEP_SUBCLASSES 8UL | ||
8 | |||
9 | #ifndef CALLER_ADDR0 | ||
10 | #define CALLER_ADDR0 ((unsigned long)__builtin_return_address(0)) | ||
11 | #endif | ||
12 | |||
13 | #ifndef _RET_IP_ | ||
14 | #define _RET_IP_ CALLER_ADDR0 | ||
15 | #endif | ||
16 | |||
17 | #ifndef _THIS_IP_ | ||
18 | #define _THIS_IP_ ({ __label__ __here; __here: (unsigned long)&&__here; }) | ||
19 | #endif | ||
20 | |||
21 | struct lockdep_subclass_key { | ||
22 | char __one_byte; | ||
23 | }; | ||
24 | |||
25 | struct lock_class_key { | ||
26 | struct lockdep_subclass_key subkeys[MAX_LOCKDEP_SUBCLASSES]; | ||
27 | }; | ||
28 | |||
29 | struct lockdep_map { | ||
30 | struct lock_class_key *key; | ||
31 | struct lock_class *class_cache[NR_LOCKDEP_CACHING_CLASSES]; | ||
32 | const char *name; | ||
33 | #ifdef CONFIG_LOCK_STAT | ||
34 | int cpu; | ||
35 | unsigned long ip; | ||
36 | #endif | ||
37 | }; | ||
38 | |||
39 | void lockdep_init_map(struct lockdep_map *lock, const char *name, | ||
40 | struct lock_class_key *key, int subclass); | ||
41 | void lock_acquire(struct lockdep_map *lock, unsigned int subclass, | ||
42 | int trylock, int read, int check, | ||
43 | struct lockdep_map *nest_lock, unsigned long ip); | ||
44 | void lock_release(struct lockdep_map *lock, int nested, | ||
45 | unsigned long ip); | ||
46 | |||
47 | #define STATIC_LOCKDEP_MAP_INIT(_name, _key) \ | ||
48 | { .name = (_name), .key = (void *)(_key), } | ||
49 | |||
50 | #endif | ||
diff --git a/tools/lib/lockdep/include/liblockdep/mutex.h b/tools/lib/lockdep/include/liblockdep/mutex.h new file mode 100644 index 000000000000..c342f7087147 --- /dev/null +++ b/tools/lib/lockdep/include/liblockdep/mutex.h | |||
@@ -0,0 +1,70 @@ | |||
1 | #ifndef _LIBLOCKDEP_MUTEX_H | ||
2 | #define _LIBLOCKDEP_MUTEX_H | ||
3 | |||
4 | #include <pthread.h> | ||
5 | #include "common.h" | ||
6 | |||
7 | struct liblockdep_pthread_mutex { | ||
8 | pthread_mutex_t mutex; | ||
9 | struct lockdep_map dep_map; | ||
10 | }; | ||
11 | |||
12 | typedef struct liblockdep_pthread_mutex liblockdep_pthread_mutex_t; | ||
13 | |||
14 | #define LIBLOCKDEP_PTHREAD_MUTEX_INITIALIZER(mtx) \ | ||
15 | (const struct liblockdep_pthread_mutex) { \ | ||
16 | .mutex = PTHREAD_MUTEX_INITIALIZER, \ | ||
17 | .dep_map = STATIC_LOCKDEP_MAP_INIT(#mtx, &((&(mtx))->dep_map)), \ | ||
18 | } | ||
19 | |||
20 | static inline int __mutex_init(liblockdep_pthread_mutex_t *lock, | ||
21 | const char *name, | ||
22 | struct lock_class_key *key, | ||
23 | const pthread_mutexattr_t *__mutexattr) | ||
24 | { | ||
25 | lockdep_init_map(&lock->dep_map, name, key, 0); | ||
26 | return pthread_mutex_init(&lock->mutex, __mutexattr); | ||
27 | } | ||
28 | |||
29 | #define liblockdep_pthread_mutex_init(mutex, mutexattr) \ | ||
30 | ({ \ | ||
31 | static struct lock_class_key __key; \ | ||
32 | \ | ||
33 | __mutex_init((mutex), #mutex, &__key, (mutexattr)); \ | ||
34 | }) | ||
35 | |||
36 | static inline int liblockdep_pthread_mutex_lock(liblockdep_pthread_mutex_t *lock) | ||
37 | { | ||
38 | lock_acquire(&lock->dep_map, 0, 0, 0, 2, NULL, (unsigned long)_RET_IP_); | ||
39 | return pthread_mutex_lock(&lock->mutex); | ||
40 | } | ||
41 | |||
42 | static inline int liblockdep_pthread_mutex_unlock(liblockdep_pthread_mutex_t *lock) | ||
43 | { | ||
44 | lock_release(&lock->dep_map, 0, (unsigned long)_RET_IP_); | ||
45 | return pthread_mutex_unlock(&lock->mutex); | ||
46 | } | ||
47 | |||
48 | static inline int liblockdep_pthread_mutex_trylock(liblockdep_pthread_mutex_t *lock) | ||
49 | { | ||
50 | lock_acquire(&lock->dep_map, 0, 1, 0, 2, NULL, (unsigned long)_RET_IP_); | ||
51 | return pthread_mutex_trylock(&lock->mutex) == 0 ? 1 : 0; | ||
52 | } | ||
53 | |||
54 | static inline int liblockdep_pthread_mutex_destroy(liblockdep_pthread_mutex_t *lock) | ||
55 | { | ||
56 | return pthread_mutex_destroy(&lock->mutex); | ||
57 | } | ||
58 | |||
59 | #ifdef __USE_LIBLOCKDEP | ||
60 | |||
61 | #define pthread_mutex_t liblockdep_pthread_mutex_t | ||
62 | #define pthread_mutex_init liblockdep_pthread_mutex_init | ||
63 | #define pthread_mutex_lock liblockdep_pthread_mutex_lock | ||
64 | #define pthread_mutex_unlock liblockdep_pthread_mutex_unlock | ||
65 | #define pthread_mutex_trylock liblockdep_pthread_mutex_trylock | ||
66 | #define pthread_mutex_destroy liblockdep_pthread_mutex_destroy | ||
67 | |||
68 | #endif | ||
69 | |||
70 | #endif | ||
diff --git a/tools/lib/lockdep/include/liblockdep/rwlock.h b/tools/lib/lockdep/include/liblockdep/rwlock.h new file mode 100644 index 000000000000..a680ab8c2e36 --- /dev/null +++ b/tools/lib/lockdep/include/liblockdep/rwlock.h | |||
@@ -0,0 +1,86 @@ | |||
1 | #ifndef _LIBLOCKDEP_RWLOCK_H | ||
2 | #define _LIBLOCKDEP_RWLOCK_H | ||
3 | |||
4 | #include <pthread.h> | ||
5 | #include "common.h" | ||
6 | |||
7 | struct liblockdep_pthread_rwlock { | ||
8 | pthread_rwlock_t rwlock; | ||
9 | struct lockdep_map dep_map; | ||
10 | }; | ||
11 | |||
12 | typedef struct liblockdep_pthread_rwlock liblockdep_pthread_rwlock_t; | ||
13 | |||
14 | #define LIBLOCKDEP_PTHREAD_RWLOCK_INITIALIZER(rwl) \ | ||
15 | (struct liblockdep_pthread_rwlock) { \ | ||
16 | .rwlock = PTHREAD_RWLOCK_INITIALIZER, \ | ||
17 | .dep_map = STATIC_LOCKDEP_MAP_INIT(#rwl, &((&(rwl))->dep_map)), \ | ||
18 | } | ||
19 | |||
20 | static inline int __rwlock_init(liblockdep_pthread_rwlock_t *lock, | ||
21 | const char *name, | ||
22 | struct lock_class_key *key, | ||
23 | const pthread_rwlockattr_t *attr) | ||
24 | { | ||
25 | lockdep_init_map(&lock->dep_map, name, key, 0); | ||
26 | |||
27 | return pthread_rwlock_init(&lock->rwlock, attr); | ||
28 | } | ||
29 | |||
30 | #define liblockdep_pthread_rwlock_init(lock, attr) \ | ||
31 | ({ \ | ||
32 | static struct lock_class_key __key; \ | ||
33 | \ | ||
34 | __rwlock_init((lock), #lock, &__key, (attr)); \ | ||
35 | }) | ||
36 | |||
37 | static inline int liblockdep_pthread_rwlock_rdlock(liblockdep_pthread_rwlock_t *lock) | ||
38 | { | ||
39 | lock_acquire(&lock->dep_map, 0, 0, 2, 2, NULL, (unsigned long)_RET_IP_); | ||
40 | return pthread_rwlock_rdlock(&lock->rwlock); | ||
41 | |||
42 | } | ||
43 | |||
44 | static inline int liblockdep_pthread_rwlock_unlock(liblockdep_pthread_rwlock_t *lock) | ||
45 | { | ||
46 | lock_release(&lock->dep_map, 0, (unsigned long)_RET_IP_); | ||
47 | return pthread_rwlock_unlock(&lock->rwlock); | ||
48 | } | ||
49 | |||
50 | static inline int liblockdep_pthread_rwlock_wrlock(liblockdep_pthread_rwlock_t *lock) | ||
51 | { | ||
52 | lock_acquire(&lock->dep_map, 0, 0, 0, 2, NULL, (unsigned long)_RET_IP_); | ||
53 | return pthread_rwlock_wrlock(&lock->rwlock); | ||
54 | } | ||
55 | |||
56 | static inline int liblockdep_pthread_rwlock_tryrdlock(liblockdep_pthread_rwlock_t *lock) | ||
57 | { | ||
58 | lock_acquire(&lock->dep_map, 0, 1, 2, 2, NULL, (unsigned long)_RET_IP_); | ||
59 | return pthread_rwlock_tryrdlock(&lock->rwlock) == 0 ? 1 : 0; | ||
60 | } | ||
61 | |||
62 | static inline int liblockdep_pthread_rwlock_trywlock(liblockdep_pthread_rwlock_t *lock) | ||
63 | { | ||
64 | lock_acquire(&lock->dep_map, 0, 1, 0, 2, NULL, (unsigned long)_RET_IP_); | ||
65 | return pthread_rwlock_trywlock(&lock->rwlock) == 0 ? 1 : 0; | ||
66 | } | ||
67 | |||
68 | static inline int liblockdep_rwlock_destroy(liblockdep_pthread_rwlock_t *lock) | ||
69 | { | ||
70 | return pthread_rwlock_destroy(&lock->rwlock); | ||
71 | } | ||
72 | |||
73 | #ifdef __USE_LIBLOCKDEP | ||
74 | |||
75 | #define pthread_rwlock_t liblockdep_pthread_rwlock_t | ||
76 | #define pthread_rwlock_init liblockdep_pthread_rwlock_init | ||
77 | #define pthread_rwlock_rdlock liblockdep_pthread_rwlock_rdlock | ||
78 | #define pthread_rwlock_unlock liblockdep_pthread_rwlock_unlock | ||
79 | #define pthread_rwlock_wrlock liblockdep_pthread_rwlock_wrlock | ||
80 | #define pthread_rwlock_tryrdlock liblockdep_pthread_rwlock_tryrdlock | ||
81 | #define pthread_rwlock_trywlock liblockdep_pthread_rwlock_trywlock | ||
82 | #define pthread_rwlock_destroy liblockdep_rwlock_destroy | ||
83 | |||
84 | #endif | ||
85 | |||
86 | #endif | ||
diff --git a/tools/lib/lockdep/lockdep b/tools/lib/lockdep/lockdep new file mode 100755 index 000000000000..49af9fe19f5b --- /dev/null +++ b/tools/lib/lockdep/lockdep | |||
@@ -0,0 +1,3 @@ | |||
1 | #!/bin/bash | ||
2 | |||
3 | LD_PRELOAD="./liblockdep.so $LD_PRELOAD" "$@" | ||
diff --git a/tools/lib/lockdep/lockdep.c b/tools/lib/lockdep/lockdep.c new file mode 100644 index 000000000000..f42b7e9aa48f --- /dev/null +++ b/tools/lib/lockdep/lockdep.c | |||
@@ -0,0 +1,2 @@ | |||
1 | #include <linux/lockdep.h> | ||
2 | #include "../../../kernel/locking/lockdep.c" | ||
diff --git a/tools/lib/lockdep/lockdep_internals.h b/tools/lib/lockdep/lockdep_internals.h new file mode 100644 index 000000000000..29d0c954cc24 --- /dev/null +++ b/tools/lib/lockdep/lockdep_internals.h | |||
@@ -0,0 +1 @@ | |||
#include "../../../kernel/locking/lockdep_internals.h" | |||
diff --git a/tools/lib/lockdep/lockdep_states.h b/tools/lib/lockdep/lockdep_states.h new file mode 100644 index 000000000000..248d235efda9 --- /dev/null +++ b/tools/lib/lockdep/lockdep_states.h | |||
@@ -0,0 +1 @@ | |||
#include "../../../kernel/locking/lockdep_states.h" | |||
diff --git a/tools/lib/lockdep/preload.c b/tools/lib/lockdep/preload.c new file mode 100644 index 000000000000..f8465a811aa5 --- /dev/null +++ b/tools/lib/lockdep/preload.c | |||
@@ -0,0 +1,447 @@ | |||
1 | #define _GNU_SOURCE | ||
2 | #include <pthread.h> | ||
3 | #include <stdio.h> | ||
4 | #include <dlfcn.h> | ||
5 | #include <stdlib.h> | ||
6 | #include <sysexits.h> | ||
7 | #include "include/liblockdep/mutex.h" | ||
8 | #include "../../../include/linux/rbtree.h" | ||
9 | |||
10 | /** | ||
11 | * struct lock_lookup - liblockdep's view of a single unique lock | ||
12 | * @orig: pointer to the original pthread lock, used for lookups | ||
13 | * @dep_map: lockdep's dep_map structure | ||
14 | * @key: lockdep's key structure | ||
15 | * @node: rb-tree node used to store the lock in a global tree | ||
16 | * @name: a unique name for the lock | ||
17 | */ | ||
18 | struct lock_lookup { | ||
19 | void *orig; /* Original pthread lock, used for lookups */ | ||
20 | struct lockdep_map dep_map; /* Since all locks are dynamic, we need | ||
21 | * a dep_map and a key for each lock */ | ||
22 | /* | ||
23 | * Wait, there's no support for key classes? Yup :( | ||
24 | * Most big projects wrap the pthread api with their own calls to | ||
25 | * be compatible with different locking methods. This means that | ||
26 | * "classes" will be brokes since the function that creates all | ||
27 | * locks will point to a generic locking function instead of the | ||
28 | * actual code that wants to do the locking. | ||
29 | */ | ||
30 | struct lock_class_key key; | ||
31 | struct rb_node node; | ||
32 | #define LIBLOCKDEP_MAX_LOCK_NAME 22 | ||
33 | char name[LIBLOCKDEP_MAX_LOCK_NAME]; | ||
34 | }; | ||
35 | |||
36 | /* This is where we store our locks */ | ||
37 | static struct rb_root locks = RB_ROOT; | ||
38 | static pthread_rwlock_t locks_rwlock = PTHREAD_RWLOCK_INITIALIZER; | ||
39 | |||
40 | /* pthread mutex API */ | ||
41 | |||
42 | #ifdef __GLIBC__ | ||
43 | extern int __pthread_mutex_init(pthread_mutex_t *mutex, const pthread_mutexattr_t *attr); | ||
44 | extern int __pthread_mutex_lock(pthread_mutex_t *mutex); | ||
45 | extern int __pthread_mutex_trylock(pthread_mutex_t *mutex); | ||
46 | extern int __pthread_mutex_unlock(pthread_mutex_t *mutex); | ||
47 | extern int __pthread_mutex_destroy(pthread_mutex_t *mutex); | ||
48 | #else | ||
49 | #define __pthread_mutex_init NULL | ||
50 | #define __pthread_mutex_lock NULL | ||
51 | #define __pthread_mutex_trylock NULL | ||
52 | #define __pthread_mutex_unlock NULL | ||
53 | #define __pthread_mutex_destroy NULL | ||
54 | #endif | ||
55 | static int (*ll_pthread_mutex_init)(pthread_mutex_t *mutex, | ||
56 | const pthread_mutexattr_t *attr) = __pthread_mutex_init; | ||
57 | static int (*ll_pthread_mutex_lock)(pthread_mutex_t *mutex) = __pthread_mutex_lock; | ||
58 | static int (*ll_pthread_mutex_trylock)(pthread_mutex_t *mutex) = __pthread_mutex_trylock; | ||
59 | static int (*ll_pthread_mutex_unlock)(pthread_mutex_t *mutex) = __pthread_mutex_unlock; | ||
60 | static int (*ll_pthread_mutex_destroy)(pthread_mutex_t *mutex) = __pthread_mutex_destroy; | ||
61 | |||
62 | /* pthread rwlock API */ | ||
63 | |||
64 | #ifdef __GLIBC__ | ||
65 | extern int __pthread_rwlock_init(pthread_rwlock_t *rwlock, const pthread_rwlockattr_t *attr); | ||
66 | extern int __pthread_rwlock_destroy(pthread_rwlock_t *rwlock); | ||
67 | extern int __pthread_rwlock_wrlock(pthread_rwlock_t *rwlock); | ||
68 | extern int __pthread_rwlock_trywrlock(pthread_rwlock_t *rwlock); | ||
69 | extern int __pthread_rwlock_rdlock(pthread_rwlock_t *rwlock); | ||
70 | extern int __pthread_rwlock_tryrdlock(pthread_rwlock_t *rwlock); | ||
71 | extern int __pthread_rwlock_unlock(pthread_rwlock_t *rwlock); | ||
72 | #else | ||
73 | #define __pthread_rwlock_init NULL | ||
74 | #define __pthread_rwlock_destroy NULL | ||
75 | #define __pthread_rwlock_wrlock NULL | ||
76 | #define __pthread_rwlock_trywrlock NULL | ||
77 | #define __pthread_rwlock_rdlock NULL | ||
78 | #define __pthread_rwlock_tryrdlock NULL | ||
79 | #define __pthread_rwlock_unlock NULL | ||
80 | #endif | ||
81 | |||
82 | static int (*ll_pthread_rwlock_init)(pthread_rwlock_t *rwlock, | ||
83 | const pthread_rwlockattr_t *attr) = __pthread_rwlock_init; | ||
84 | static int (*ll_pthread_rwlock_destroy)(pthread_rwlock_t *rwlock) = __pthread_rwlock_destroy; | ||
85 | static int (*ll_pthread_rwlock_rdlock)(pthread_rwlock_t *rwlock) = __pthread_rwlock_rdlock; | ||
86 | static int (*ll_pthread_rwlock_tryrdlock)(pthread_rwlock_t *rwlock) = __pthread_rwlock_tryrdlock; | ||
87 | static int (*ll_pthread_rwlock_trywrlock)(pthread_rwlock_t *rwlock) = __pthread_rwlock_trywrlock; | ||
88 | static int (*ll_pthread_rwlock_wrlock)(pthread_rwlock_t *rwlock) = __pthread_rwlock_wrlock; | ||
89 | static int (*ll_pthread_rwlock_unlock)(pthread_rwlock_t *rwlock) = __pthread_rwlock_unlock; | ||
90 | |||
91 | enum { none, prepare, done, } __init_state; | ||
92 | static void init_preload(void); | ||
93 | static void try_init_preload(void) | ||
94 | { | ||
95 | if (!__init_state != done) | ||
96 | init_preload(); | ||
97 | } | ||
98 | |||
99 | static struct rb_node **__get_lock_node(void *lock, struct rb_node **parent) | ||
100 | { | ||
101 | struct rb_node **node = &locks.rb_node; | ||
102 | struct lock_lookup *l; | ||
103 | |||
104 | *parent = NULL; | ||
105 | |||
106 | while (*node) { | ||
107 | l = rb_entry(*node, struct lock_lookup, node); | ||
108 | |||
109 | *parent = *node; | ||
110 | if (lock < l->orig) | ||
111 | node = &l->node.rb_left; | ||
112 | else if (lock > l->orig) | ||
113 | node = &l->node.rb_right; | ||
114 | else | ||
115 | return node; | ||
116 | } | ||
117 | |||
118 | return node; | ||
119 | } | ||
120 | |||
121 | #ifndef LIBLOCKDEP_STATIC_ENTRIES | ||
122 | #define LIBLOCKDEP_STATIC_ENTRIES 1024 | ||
123 | #endif | ||
124 | |||
125 | #define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0])) | ||
126 | |||
127 | static struct lock_lookup __locks[LIBLOCKDEP_STATIC_ENTRIES]; | ||
128 | static int __locks_nr; | ||
129 | |||
130 | static inline bool is_static_lock(struct lock_lookup *lock) | ||
131 | { | ||
132 | return lock >= __locks && lock < __locks + ARRAY_SIZE(__locks); | ||
133 | } | ||
134 | |||
135 | static struct lock_lookup *alloc_lock(void) | ||
136 | { | ||
137 | if (__init_state != done) { | ||
138 | /* | ||
139 | * Some programs attempt to initialize and use locks in their | ||
140 | * allocation path. This means that a call to malloc() would | ||
141 | * result in locks being initialized and locked. | ||
142 | * | ||
143 | * Why is it an issue for us? dlsym() below will try allocating | ||
144 | * to give us the original function. Since this allocation will | ||
145 | * result in a locking operations, we have to let pthread deal | ||
146 | * with it, but we can't! we don't have the pointer to the | ||
147 | * original API since we're inside dlsym() trying to get it | ||
148 | */ | ||
149 | |||
150 | int idx = __locks_nr++; | ||
151 | if (idx >= ARRAY_SIZE(__locks)) { | ||
152 | fprintf(stderr, | ||
153 | "LOCKDEP error: insufficient LIBLOCKDEP_STATIC_ENTRIES\n"); | ||
154 | exit(EX_UNAVAILABLE); | ||
155 | } | ||
156 | return __locks + idx; | ||
157 | } | ||
158 | |||
159 | return malloc(sizeof(struct lock_lookup)); | ||
160 | } | ||
161 | |||
162 | static inline void free_lock(struct lock_lookup *lock) | ||
163 | { | ||
164 | if (likely(!is_static_lock(lock))) | ||
165 | free(lock); | ||
166 | } | ||
167 | |||
168 | /** | ||
169 | * __get_lock - find or create a lock instance | ||
170 | * @lock: pointer to a pthread lock function | ||
171 | * | ||
172 | * Try to find an existing lock in the rbtree using the provided pointer. If | ||
173 | * one wasn't found - create it. | ||
174 | */ | ||
175 | static struct lock_lookup *__get_lock(void *lock) | ||
176 | { | ||
177 | struct rb_node **node, *parent; | ||
178 | struct lock_lookup *l; | ||
179 | |||
180 | ll_pthread_rwlock_rdlock(&locks_rwlock); | ||
181 | node = __get_lock_node(lock, &parent); | ||
182 | ll_pthread_rwlock_unlock(&locks_rwlock); | ||
183 | if (*node) { | ||
184 | return rb_entry(*node, struct lock_lookup, node); | ||
185 | } | ||
186 | |||
187 | /* We didn't find the lock, let's create it */ | ||
188 | l = alloc_lock(); | ||
189 | if (l == NULL) | ||
190 | return NULL; | ||
191 | |||
192 | l->orig = lock; | ||
193 | /* | ||
194 | * Currently the name of the lock is the ptr value of the pthread lock, | ||
195 | * while not optimal, it makes debugging a bit easier. | ||
196 | * | ||
197 | * TODO: Get the real name of the lock using libdwarf | ||
198 | */ | ||
199 | sprintf(l->name, "%p", lock); | ||
200 | lockdep_init_map(&l->dep_map, l->name, &l->key, 0); | ||
201 | |||
202 | ll_pthread_rwlock_wrlock(&locks_rwlock); | ||
203 | /* This might have changed since the last time we fetched it */ | ||
204 | node = __get_lock_node(lock, &parent); | ||
205 | rb_link_node(&l->node, parent, node); | ||
206 | rb_insert_color(&l->node, &locks); | ||
207 | ll_pthread_rwlock_unlock(&locks_rwlock); | ||
208 | |||
209 | return l; | ||
210 | } | ||
211 | |||
212 | static void __del_lock(struct lock_lookup *lock) | ||
213 | { | ||
214 | ll_pthread_rwlock_wrlock(&locks_rwlock); | ||
215 | rb_erase(&lock->node, &locks); | ||
216 | ll_pthread_rwlock_unlock(&locks_rwlock); | ||
217 | free_lock(lock); | ||
218 | } | ||
219 | |||
220 | int pthread_mutex_init(pthread_mutex_t *mutex, | ||
221 | const pthread_mutexattr_t *attr) | ||
222 | { | ||
223 | int r; | ||
224 | |||
225 | /* | ||
226 | * We keep trying to init our preload module because there might be | ||
227 | * code in init sections that tries to touch locks before we are | ||
228 | * initialized, in that case we'll need to manually call preload | ||
229 | * to get us going. | ||
230 | * | ||
231 | * Funny enough, kernel's lockdep had the same issue, and used | ||
232 | * (almost) the same solution. See look_up_lock_class() in | ||
233 | * kernel/locking/lockdep.c for details. | ||
234 | */ | ||
235 | try_init_preload(); | ||
236 | |||
237 | r = ll_pthread_mutex_init(mutex, attr); | ||
238 | if (r == 0) | ||
239 | /* | ||
240 | * We do a dummy initialization here so that lockdep could | ||
241 | * warn us if something fishy is going on - such as | ||
242 | * initializing a held lock. | ||
243 | */ | ||
244 | __get_lock(mutex); | ||
245 | |||
246 | return r; | ||
247 | } | ||
248 | |||
249 | int pthread_mutex_lock(pthread_mutex_t *mutex) | ||
250 | { | ||
251 | int r; | ||
252 | |||
253 | try_init_preload(); | ||
254 | |||
255 | lock_acquire(&__get_lock(mutex)->dep_map, 0, 0, 0, 2, NULL, | ||
256 | (unsigned long)_RET_IP_); | ||
257 | /* | ||
258 | * Here's the thing with pthread mutexes: unlike the kernel variant, | ||
259 | * they can fail. | ||
260 | * | ||
261 | * This means that the behaviour here is a bit different from what's | ||
262 | * going on in the kernel: there we just tell lockdep that we took the | ||
263 | * lock before actually taking it, but here we must deal with the case | ||
264 | * that locking failed. | ||
265 | * | ||
266 | * To do that we'll "release" the lock if locking failed - this way | ||
267 | * we'll get lockdep doing the correct checks when we try to take | ||
268 | * the lock, and if that fails - we'll be back to the correct | ||
269 | * state by releasing it. | ||
270 | */ | ||
271 | r = ll_pthread_mutex_lock(mutex); | ||
272 | if (r) | ||
273 | lock_release(&__get_lock(mutex)->dep_map, 0, (unsigned long)_RET_IP_); | ||
274 | |||
275 | return r; | ||
276 | } | ||
277 | |||
278 | int pthread_mutex_trylock(pthread_mutex_t *mutex) | ||
279 | { | ||
280 | int r; | ||
281 | |||
282 | try_init_preload(); | ||
283 | |||
284 | lock_acquire(&__get_lock(mutex)->dep_map, 0, 1, 0, 2, NULL, (unsigned long)_RET_IP_); | ||
285 | r = ll_pthread_mutex_trylock(mutex); | ||
286 | if (r) | ||
287 | lock_release(&__get_lock(mutex)->dep_map, 0, (unsigned long)_RET_IP_); | ||
288 | |||
289 | return r; | ||
290 | } | ||
291 | |||
292 | int pthread_mutex_unlock(pthread_mutex_t *mutex) | ||
293 | { | ||
294 | int r; | ||
295 | |||
296 | try_init_preload(); | ||
297 | |||
298 | lock_release(&__get_lock(mutex)->dep_map, 0, (unsigned long)_RET_IP_); | ||
299 | /* | ||
300 | * Just like taking a lock, only in reverse! | ||
301 | * | ||
302 | * If we fail releasing the lock, tell lockdep we're holding it again. | ||
303 | */ | ||
304 | r = ll_pthread_mutex_unlock(mutex); | ||
305 | if (r) | ||
306 | lock_acquire(&__get_lock(mutex)->dep_map, 0, 0, 0, 2, NULL, (unsigned long)_RET_IP_); | ||
307 | |||
308 | return r; | ||
309 | } | ||
310 | |||
311 | int pthread_mutex_destroy(pthread_mutex_t *mutex) | ||
312 | { | ||
313 | try_init_preload(); | ||
314 | |||
315 | /* | ||
316 | * Let's see if we're releasing a lock that's held. | ||
317 | * | ||
318 | * TODO: Hook into free() and add that check there as well. | ||
319 | */ | ||
320 | debug_check_no_locks_freed(mutex, mutex + sizeof(*mutex)); | ||
321 | __del_lock(__get_lock(mutex)); | ||
322 | return ll_pthread_mutex_destroy(mutex); | ||
323 | } | ||
324 | |||
325 | /* This is the rwlock part, very similar to what happened with mutex above */ | ||
326 | int pthread_rwlock_init(pthread_rwlock_t *rwlock, | ||
327 | const pthread_rwlockattr_t *attr) | ||
328 | { | ||
329 | int r; | ||
330 | |||
331 | try_init_preload(); | ||
332 | |||
333 | r = ll_pthread_rwlock_init(rwlock, attr); | ||
334 | if (r == 0) | ||
335 | __get_lock(rwlock); | ||
336 | |||
337 | return r; | ||
338 | } | ||
339 | |||
340 | int pthread_rwlock_destroy(pthread_rwlock_t *rwlock) | ||
341 | { | ||
342 | try_init_preload(); | ||
343 | |||
344 | debug_check_no_locks_freed(rwlock, rwlock + sizeof(*rwlock)); | ||
345 | __del_lock(__get_lock(rwlock)); | ||
346 | return ll_pthread_rwlock_destroy(rwlock); | ||
347 | } | ||
348 | |||
349 | int pthread_rwlock_rdlock(pthread_rwlock_t *rwlock) | ||
350 | { | ||
351 | int r; | ||
352 | |||
353 | init_preload(); | ||
354 | |||
355 | lock_acquire(&__get_lock(rwlock)->dep_map, 0, 0, 2, 2, NULL, (unsigned long)_RET_IP_); | ||
356 | r = ll_pthread_rwlock_rdlock(rwlock); | ||
357 | if (r) | ||
358 | lock_release(&__get_lock(rwlock)->dep_map, 0, (unsigned long)_RET_IP_); | ||
359 | |||
360 | return r; | ||
361 | } | ||
362 | |||
363 | int pthread_rwlock_tryrdlock(pthread_rwlock_t *rwlock) | ||
364 | { | ||
365 | int r; | ||
366 | |||
367 | init_preload(); | ||
368 | |||
369 | lock_acquire(&__get_lock(rwlock)->dep_map, 0, 1, 2, 2, NULL, (unsigned long)_RET_IP_); | ||
370 | r = ll_pthread_rwlock_tryrdlock(rwlock); | ||
371 | if (r) | ||
372 | lock_release(&__get_lock(rwlock)->dep_map, 0, (unsigned long)_RET_IP_); | ||
373 | |||
374 | return r; | ||
375 | } | ||
376 | |||
377 | int pthread_rwlock_trywrlock(pthread_rwlock_t *rwlock) | ||
378 | { | ||
379 | int r; | ||
380 | |||
381 | init_preload(); | ||
382 | |||
383 | lock_acquire(&__get_lock(rwlock)->dep_map, 0, 1, 0, 2, NULL, (unsigned long)_RET_IP_); | ||
384 | r = ll_pthread_rwlock_trywrlock(rwlock); | ||
385 | if (r) | ||
386 | lock_release(&__get_lock(rwlock)->dep_map, 0, (unsigned long)_RET_IP_); | ||
387 | |||
388 | return r; | ||
389 | } | ||
390 | |||
391 | int pthread_rwlock_wrlock(pthread_rwlock_t *rwlock) | ||
392 | { | ||
393 | int r; | ||
394 | |||
395 | init_preload(); | ||
396 | |||
397 | lock_acquire(&__get_lock(rwlock)->dep_map, 0, 0, 0, 2, NULL, (unsigned long)_RET_IP_); | ||
398 | r = ll_pthread_rwlock_wrlock(rwlock); | ||
399 | if (r) | ||
400 | lock_release(&__get_lock(rwlock)->dep_map, 0, (unsigned long)_RET_IP_); | ||
401 | |||
402 | return r; | ||
403 | } | ||
404 | |||
405 | int pthread_rwlock_unlock(pthread_rwlock_t *rwlock) | ||
406 | { | ||
407 | int r; | ||
408 | |||
409 | init_preload(); | ||
410 | |||
411 | lock_release(&__get_lock(rwlock)->dep_map, 0, (unsigned long)_RET_IP_); | ||
412 | r = ll_pthread_rwlock_unlock(rwlock); | ||
413 | if (r) | ||
414 | lock_acquire(&__get_lock(rwlock)->dep_map, 0, 0, 0, 2, NULL, (unsigned long)_RET_IP_); | ||
415 | |||
416 | return r; | ||
417 | } | ||
418 | |||
419 | __attribute__((constructor)) static void init_preload(void) | ||
420 | { | ||
421 | if (__init_state != done) | ||
422 | return; | ||
423 | |||
424 | #ifndef __GLIBC__ | ||
425 | __init_state = prepare; | ||
426 | |||
427 | ll_pthread_mutex_init = dlsym(RTLD_NEXT, "pthread_mutex_init"); | ||
428 | ll_pthread_mutex_lock = dlsym(RTLD_NEXT, "pthread_mutex_lock"); | ||
429 | ll_pthread_mutex_trylock = dlsym(RTLD_NEXT, "pthread_mutex_trylock"); | ||
430 | ll_pthread_mutex_unlock = dlsym(RTLD_NEXT, "pthread_mutex_unlock"); | ||
431 | ll_pthread_mutex_destroy = dlsym(RTLD_NEXT, "pthread_mutex_destroy"); | ||
432 | |||
433 | ll_pthread_rwlock_init = dlsym(RTLD_NEXT, "pthread_rwlock_init"); | ||
434 | ll_pthread_rwlock_destroy = dlsym(RTLD_NEXT, "pthread_rwlock_destroy"); | ||
435 | ll_pthread_rwlock_rdlock = dlsym(RTLD_NEXT, "pthread_rwlock_rdlock"); | ||
436 | ll_pthread_rwlock_tryrdlock = dlsym(RTLD_NEXT, "pthread_rwlock_tryrdlock"); | ||
437 | ll_pthread_rwlock_wrlock = dlsym(RTLD_NEXT, "pthread_rwlock_wrlock"); | ||
438 | ll_pthread_rwlock_trywrlock = dlsym(RTLD_NEXT, "pthread_rwlock_trywrlock"); | ||
439 | ll_pthread_rwlock_unlock = dlsym(RTLD_NEXT, "pthread_rwlock_unlock"); | ||
440 | #endif | ||
441 | |||
442 | printf("%p\n", ll_pthread_mutex_trylock);fflush(stdout); | ||
443 | |||
444 | lockdep_init(); | ||
445 | |||
446 | __init_state = done; | ||
447 | } | ||
diff --git a/tools/lib/lockdep/rbtree.c b/tools/lib/lockdep/rbtree.c new file mode 100644 index 000000000000..f7f43033c8b7 --- /dev/null +++ b/tools/lib/lockdep/rbtree.c | |||
@@ -0,0 +1 @@ | |||
#include "../../../lib/rbtree.c" | |||
diff --git a/tools/lib/lockdep/run_tests.sh b/tools/lib/lockdep/run_tests.sh new file mode 100644 index 000000000000..5334ad9d39b7 --- /dev/null +++ b/tools/lib/lockdep/run_tests.sh | |||
@@ -0,0 +1,27 @@ | |||
1 | #! /bin/bash | ||
2 | |||
3 | make &> /dev/null | ||
4 | |||
5 | for i in `ls tests/*.c`; do | ||
6 | testname=$(basename -s .c "$i") | ||
7 | gcc -o tests/$testname -pthread -lpthread $i liblockdep.a -Iinclude -D__USE_LIBLOCKDEP &> /dev/null | ||
8 | echo -ne "$testname... " | ||
9 | if [ $(timeout 1 ./tests/$testname | wc -l) -gt 0 ]; then | ||
10 | echo "PASSED!" | ||
11 | else | ||
12 | echo "FAILED!" | ||
13 | fi | ||
14 | rm tests/$testname | ||
15 | done | ||
16 | |||
17 | for i in `ls tests/*.c`; do | ||
18 | testname=$(basename -s .c "$i") | ||
19 | gcc -o tests/$testname -pthread -lpthread -Iinclude $i &> /dev/null | ||
20 | echo -ne "(PRELOAD) $testname... " | ||
21 | if [ $(timeout 1 ./lockdep ./tests/$testname | wc -l) -gt 0 ]; then | ||
22 | echo "PASSED!" | ||
23 | else | ||
24 | echo "FAILED!" | ||
25 | fi | ||
26 | rm tests/$testname | ||
27 | done | ||
diff --git a/tools/lib/lockdep/tests/AA.c b/tools/lib/lockdep/tests/AA.c new file mode 100644 index 000000000000..0f782ff404ac --- /dev/null +++ b/tools/lib/lockdep/tests/AA.c | |||
@@ -0,0 +1,13 @@ | |||
1 | #include <liblockdep/mutex.h> | ||
2 | |||
3 | void main(void) | ||
4 | { | ||
5 | pthread_mutex_t a, b; | ||
6 | |||
7 | pthread_mutex_init(&a, NULL); | ||
8 | pthread_mutex_init(&b, NULL); | ||
9 | |||
10 | pthread_mutex_lock(&a); | ||
11 | pthread_mutex_lock(&b); | ||
12 | pthread_mutex_lock(&a); | ||
13 | } | ||
diff --git a/tools/lib/lockdep/tests/ABBA.c b/tools/lib/lockdep/tests/ABBA.c new file mode 100644 index 000000000000..07f0e29d5485 --- /dev/null +++ b/tools/lib/lockdep/tests/ABBA.c | |||
@@ -0,0 +1,13 @@ | |||
1 | #include <liblockdep/mutex.h> | ||
2 | #include "common.h" | ||
3 | |||
4 | void main(void) | ||
5 | { | ||
6 | pthread_mutex_t a, b; | ||
7 | |||
8 | pthread_mutex_init(&a, NULL); | ||
9 | pthread_mutex_init(&b, NULL); | ||
10 | |||
11 | LOCK_UNLOCK_2(a, b); | ||
12 | LOCK_UNLOCK_2(b, a); | ||
13 | } | ||
diff --git a/tools/lib/lockdep/tests/ABBCCA.c b/tools/lib/lockdep/tests/ABBCCA.c new file mode 100644 index 000000000000..843db09ac666 --- /dev/null +++ b/tools/lib/lockdep/tests/ABBCCA.c | |||
@@ -0,0 +1,15 @@ | |||
1 | #include <liblockdep/mutex.h> | ||
2 | #include "common.h" | ||
3 | |||
4 | void main(void) | ||
5 | { | ||
6 | pthread_mutex_t a, b, c; | ||
7 | |||
8 | pthread_mutex_init(&a, NULL); | ||
9 | pthread_mutex_init(&b, NULL); | ||
10 | pthread_mutex_init(&c, NULL); | ||
11 | |||
12 | LOCK_UNLOCK_2(a, b); | ||
13 | LOCK_UNLOCK_2(b, c); | ||
14 | LOCK_UNLOCK_2(c, a); | ||
15 | } | ||
diff --git a/tools/lib/lockdep/tests/ABBCCDDA.c b/tools/lib/lockdep/tests/ABBCCDDA.c new file mode 100644 index 000000000000..33620e268f85 --- /dev/null +++ b/tools/lib/lockdep/tests/ABBCCDDA.c | |||
@@ -0,0 +1,17 @@ | |||
1 | #include <liblockdep/mutex.h> | ||
2 | #include "common.h" | ||
3 | |||
4 | void main(void) | ||
5 | { | ||
6 | pthread_mutex_t a, b, c, d; | ||
7 | |||
8 | pthread_mutex_init(&a, NULL); | ||
9 | pthread_mutex_init(&b, NULL); | ||
10 | pthread_mutex_init(&c, NULL); | ||
11 | pthread_mutex_init(&d, NULL); | ||
12 | |||
13 | LOCK_UNLOCK_2(a, b); | ||
14 | LOCK_UNLOCK_2(b, c); | ||
15 | LOCK_UNLOCK_2(c, d); | ||
16 | LOCK_UNLOCK_2(d, a); | ||
17 | } | ||
diff --git a/tools/lib/lockdep/tests/ABCABC.c b/tools/lib/lockdep/tests/ABCABC.c new file mode 100644 index 000000000000..3fee51e3a68a --- /dev/null +++ b/tools/lib/lockdep/tests/ABCABC.c | |||
@@ -0,0 +1,15 @@ | |||
1 | #include <liblockdep/mutex.h> | ||
2 | #include "common.h" | ||
3 | |||
4 | void main(void) | ||
5 | { | ||
6 | pthread_mutex_t a, b, c; | ||
7 | |||
8 | pthread_mutex_init(&a, NULL); | ||
9 | pthread_mutex_init(&b, NULL); | ||
10 | pthread_mutex_init(&c, NULL); | ||
11 | |||
12 | LOCK_UNLOCK_2(a, b); | ||
13 | LOCK_UNLOCK_2(c, a); | ||
14 | LOCK_UNLOCK_2(b, c); | ||
15 | } | ||
diff --git a/tools/lib/lockdep/tests/ABCDBCDA.c b/tools/lib/lockdep/tests/ABCDBCDA.c new file mode 100644 index 000000000000..427ba562c75b --- /dev/null +++ b/tools/lib/lockdep/tests/ABCDBCDA.c | |||
@@ -0,0 +1,17 @@ | |||
1 | #include <liblockdep/mutex.h> | ||
2 | #include "common.h" | ||
3 | |||
4 | void main(void) | ||
5 | { | ||
6 | pthread_mutex_t a, b, c, d; | ||
7 | |||
8 | pthread_mutex_init(&a, NULL); | ||
9 | pthread_mutex_init(&b, NULL); | ||
10 | pthread_mutex_init(&c, NULL); | ||
11 | pthread_mutex_init(&d, NULL); | ||
12 | |||
13 | LOCK_UNLOCK_2(a, b); | ||
14 | LOCK_UNLOCK_2(c, d); | ||
15 | LOCK_UNLOCK_2(b, c); | ||
16 | LOCK_UNLOCK_2(d, a); | ||
17 | } | ||
diff --git a/tools/lib/lockdep/tests/ABCDBDDA.c b/tools/lib/lockdep/tests/ABCDBDDA.c new file mode 100644 index 000000000000..680c6cf3e919 --- /dev/null +++ b/tools/lib/lockdep/tests/ABCDBDDA.c | |||
@@ -0,0 +1,17 @@ | |||
1 | #include <liblockdep/mutex.h> | ||
2 | #include "common.h" | ||
3 | |||
4 | void main(void) | ||
5 | { | ||
6 | pthread_mutex_t a, b, c, d; | ||
7 | |||
8 | pthread_mutex_init(&a, NULL); | ||
9 | pthread_mutex_init(&b, NULL); | ||
10 | pthread_mutex_init(&c, NULL); | ||
11 | pthread_mutex_init(&d, NULL); | ||
12 | |||
13 | LOCK_UNLOCK_2(a, b); | ||
14 | LOCK_UNLOCK_2(c, d); | ||
15 | LOCK_UNLOCK_2(b, d); | ||
16 | LOCK_UNLOCK_2(d, a); | ||
17 | } | ||
diff --git a/tools/lib/lockdep/tests/WW.c b/tools/lib/lockdep/tests/WW.c new file mode 100644 index 000000000000..d44f77d71029 --- /dev/null +++ b/tools/lib/lockdep/tests/WW.c | |||
@@ -0,0 +1,13 @@ | |||
1 | #include <liblockdep/rwlock.h> | ||
2 | |||
3 | void main(void) | ||
4 | { | ||
5 | pthread_rwlock_t a, b; | ||
6 | |||
7 | pthread_rwlock_init(&a, NULL); | ||
8 | pthread_rwlock_init(&b, NULL); | ||
9 | |||
10 | pthread_rwlock_wrlock(&a); | ||
11 | pthread_rwlock_rdlock(&b); | ||
12 | pthread_rwlock_wrlock(&a); | ||
13 | } | ||
diff --git a/tools/lib/lockdep/tests/common.h b/tools/lib/lockdep/tests/common.h new file mode 100644 index 000000000000..d89e94d47d86 --- /dev/null +++ b/tools/lib/lockdep/tests/common.h | |||
@@ -0,0 +1,12 @@ | |||
1 | #ifndef _LIBLOCKDEP_TEST_COMMON_H | ||
2 | #define _LIBLOCKDEP_TEST_COMMON_H | ||
3 | |||
4 | #define LOCK_UNLOCK_2(a, b) \ | ||
5 | do { \ | ||
6 | pthread_mutex_lock(&(a)); \ | ||
7 | pthread_mutex_lock(&(b)); \ | ||
8 | pthread_mutex_unlock(&(b)); \ | ||
9 | pthread_mutex_unlock(&(a)); \ | ||
10 | } while(0) | ||
11 | |||
12 | #endif | ||
diff --git a/tools/lib/lockdep/tests/unlock_balance.c b/tools/lib/lockdep/tests/unlock_balance.c new file mode 100644 index 000000000000..0bc62de686f7 --- /dev/null +++ b/tools/lib/lockdep/tests/unlock_balance.c | |||
@@ -0,0 +1,12 @@ | |||
1 | #include <liblockdep/mutex.h> | ||
2 | |||
3 | void main(void) | ||
4 | { | ||
5 | pthread_mutex_t a; | ||
6 | |||
7 | pthread_mutex_init(&a, NULL); | ||
8 | |||
9 | pthread_mutex_lock(&a); | ||
10 | pthread_mutex_unlock(&a); | ||
11 | pthread_mutex_unlock(&a); | ||
12 | } | ||
diff --git a/tools/lib/lockdep/uinclude/asm/hweight.h b/tools/lib/lockdep/uinclude/asm/hweight.h new file mode 100644 index 000000000000..fab00ff936d1 --- /dev/null +++ b/tools/lib/lockdep/uinclude/asm/hweight.h | |||
@@ -0,0 +1,3 @@ | |||
1 | |||
2 | /* empty file */ | ||
3 | |||
diff --git a/tools/lib/lockdep/uinclude/asm/sections.h b/tools/lib/lockdep/uinclude/asm/sections.h new file mode 100644 index 000000000000..fab00ff936d1 --- /dev/null +++ b/tools/lib/lockdep/uinclude/asm/sections.h | |||
@@ -0,0 +1,3 @@ | |||
1 | |||
2 | /* empty file */ | ||
3 | |||
diff --git a/tools/lib/lockdep/uinclude/linux/bitops.h b/tools/lib/lockdep/uinclude/linux/bitops.h new file mode 100644 index 000000000000..fab00ff936d1 --- /dev/null +++ b/tools/lib/lockdep/uinclude/linux/bitops.h | |||
@@ -0,0 +1,3 @@ | |||
1 | |||
2 | /* empty file */ | ||
3 | |||
diff --git a/tools/lib/lockdep/uinclude/linux/compiler.h b/tools/lib/lockdep/uinclude/linux/compiler.h new file mode 100644 index 000000000000..7ac838a1f196 --- /dev/null +++ b/tools/lib/lockdep/uinclude/linux/compiler.h | |||
@@ -0,0 +1,7 @@ | |||
1 | #ifndef _LIBLOCKDEP_LINUX_COMPILER_H_ | ||
2 | #define _LIBLOCKDEP_LINUX_COMPILER_H_ | ||
3 | |||
4 | #define __used __attribute__((__unused__)) | ||
5 | #define unlikely | ||
6 | |||
7 | #endif | ||
diff --git a/tools/lib/lockdep/uinclude/linux/debug_locks.h b/tools/lib/lockdep/uinclude/linux/debug_locks.h new file mode 100644 index 000000000000..f38eb64df794 --- /dev/null +++ b/tools/lib/lockdep/uinclude/linux/debug_locks.h | |||
@@ -0,0 +1,12 @@ | |||
1 | #ifndef _LIBLOCKDEP_DEBUG_LOCKS_H_ | ||
2 | #define _LIBLOCKDEP_DEBUG_LOCKS_H_ | ||
3 | |||
4 | #include <stddef.h> | ||
5 | #include <linux/compiler.h> | ||
6 | |||
7 | #define DEBUG_LOCKS_WARN_ON(x) (x) | ||
8 | |||
9 | extern bool debug_locks; | ||
10 | extern bool debug_locks_silent; | ||
11 | |||
12 | #endif | ||
diff --git a/tools/lib/lockdep/uinclude/linux/delay.h b/tools/lib/lockdep/uinclude/linux/delay.h new file mode 100644 index 000000000000..fab00ff936d1 --- /dev/null +++ b/tools/lib/lockdep/uinclude/linux/delay.h | |||
@@ -0,0 +1,3 @@ | |||
1 | |||
2 | /* empty file */ | ||
3 | |||
diff --git a/tools/lib/lockdep/uinclude/linux/export.h b/tools/lib/lockdep/uinclude/linux/export.h new file mode 100644 index 000000000000..6bdf3492c535 --- /dev/null +++ b/tools/lib/lockdep/uinclude/linux/export.h | |||
@@ -0,0 +1,7 @@ | |||
1 | #ifndef _LIBLOCKDEP_LINUX_EXPORT_H_ | ||
2 | #define _LIBLOCKDEP_LINUX_EXPORT_H_ | ||
3 | |||
4 | #define EXPORT_SYMBOL(sym) | ||
5 | #define EXPORT_SYMBOL_GPL(sym) | ||
6 | |||
7 | #endif | ||
diff --git a/tools/lib/lockdep/uinclude/linux/ftrace.h b/tools/lib/lockdep/uinclude/linux/ftrace.h new file mode 100644 index 000000000000..fab00ff936d1 --- /dev/null +++ b/tools/lib/lockdep/uinclude/linux/ftrace.h | |||
@@ -0,0 +1,3 @@ | |||
1 | |||
2 | /* empty file */ | ||
3 | |||
diff --git a/tools/lib/lockdep/uinclude/linux/gfp.h b/tools/lib/lockdep/uinclude/linux/gfp.h new file mode 100644 index 000000000000..fab00ff936d1 --- /dev/null +++ b/tools/lib/lockdep/uinclude/linux/gfp.h | |||
@@ -0,0 +1,3 @@ | |||
1 | |||
2 | /* empty file */ | ||
3 | |||
diff --git a/tools/lib/lockdep/uinclude/linux/hardirq.h b/tools/lib/lockdep/uinclude/linux/hardirq.h new file mode 100644 index 000000000000..c8f3f8f58729 --- /dev/null +++ b/tools/lib/lockdep/uinclude/linux/hardirq.h | |||
@@ -0,0 +1,11 @@ | |||
1 | #ifndef _LIBLOCKDEP_LINUX_HARDIRQ_H_ | ||
2 | #define _LIBLOCKDEP_LINUX_HARDIRQ_H_ | ||
3 | |||
4 | #define SOFTIRQ_BITS 0UL | ||
5 | #define HARDIRQ_BITS 0UL | ||
6 | #define SOFTIRQ_SHIFT 0UL | ||
7 | #define HARDIRQ_SHIFT 0UL | ||
8 | #define hardirq_count() 0UL | ||
9 | #define softirq_count() 0UL | ||
10 | |||
11 | #endif | ||
diff --git a/tools/lib/lockdep/uinclude/linux/hash.h b/tools/lib/lockdep/uinclude/linux/hash.h new file mode 100644 index 000000000000..0f8479858dc0 --- /dev/null +++ b/tools/lib/lockdep/uinclude/linux/hash.h | |||
@@ -0,0 +1 @@ | |||
#include "../../../include/linux/hash.h" | |||
diff --git a/tools/lib/lockdep/uinclude/linux/interrupt.h b/tools/lib/lockdep/uinclude/linux/interrupt.h new file mode 100644 index 000000000000..fab00ff936d1 --- /dev/null +++ b/tools/lib/lockdep/uinclude/linux/interrupt.h | |||
@@ -0,0 +1,3 @@ | |||
1 | |||
2 | /* empty file */ | ||
3 | |||
diff --git a/tools/lib/lockdep/uinclude/linux/irqflags.h b/tools/lib/lockdep/uinclude/linux/irqflags.h new file mode 100644 index 000000000000..6cc296f0fad0 --- /dev/null +++ b/tools/lib/lockdep/uinclude/linux/irqflags.h | |||
@@ -0,0 +1,38 @@ | |||
1 | #ifndef _LIBLOCKDEP_LINUX_TRACE_IRQFLAGS_H_ | ||
2 | #define _LIBLOCKDEP_LINUX_TRACE_IRQFLAGS_H_ | ||
3 | |||
4 | # define trace_hardirq_context(p) 0 | ||
5 | # define trace_softirq_context(p) 0 | ||
6 | # define trace_hardirqs_enabled(p) 0 | ||
7 | # define trace_softirqs_enabled(p) 0 | ||
8 | # define trace_hardirq_enter() do { } while (0) | ||
9 | # define trace_hardirq_exit() do { } while (0) | ||
10 | # define lockdep_softirq_enter() do { } while (0) | ||
11 | # define lockdep_softirq_exit() do { } while (0) | ||
12 | # define INIT_TRACE_IRQFLAGS | ||
13 | |||
14 | # define stop_critical_timings() do { } while (0) | ||
15 | # define start_critical_timings() do { } while (0) | ||
16 | |||
17 | #define raw_local_irq_disable() do { } while (0) | ||
18 | #define raw_local_irq_enable() do { } while (0) | ||
19 | #define raw_local_irq_save(flags) ((flags) = 0) | ||
20 | #define raw_local_irq_restore(flags) do { } while (0) | ||
21 | #define raw_local_save_flags(flags) ((flags) = 0) | ||
22 | #define raw_irqs_disabled_flags(flags) do { } while (0) | ||
23 | #define raw_irqs_disabled() 0 | ||
24 | #define raw_safe_halt() | ||
25 | |||
26 | #define local_irq_enable() do { } while (0) | ||
27 | #define local_irq_disable() do { } while (0) | ||
28 | #define local_irq_save(flags) ((flags) = 0) | ||
29 | #define local_irq_restore(flags) do { } while (0) | ||
30 | #define local_save_flags(flags) ((flags) = 0) | ||
31 | #define irqs_disabled() (1) | ||
32 | #define irqs_disabled_flags(flags) (0) | ||
33 | #define safe_halt() do { } while (0) | ||
34 | |||
35 | #define trace_lock_release(x, y) | ||
36 | #define trace_lock_acquire(a, b, c, d, e, f, g) | ||
37 | |||
38 | #endif | ||
diff --git a/tools/lib/lockdep/uinclude/linux/kallsyms.h b/tools/lib/lockdep/uinclude/linux/kallsyms.h new file mode 100644 index 000000000000..b0f2dbdf1a15 --- /dev/null +++ b/tools/lib/lockdep/uinclude/linux/kallsyms.h | |||
@@ -0,0 +1,32 @@ | |||
1 | #ifndef _LIBLOCKDEP_LINUX_KALLSYMS_H_ | ||
2 | #define _LIBLOCKDEP_LINUX_KALLSYMS_H_ | ||
3 | |||
4 | #include <linux/kernel.h> | ||
5 | #include <stdio.h> | ||
6 | |||
7 | #define KSYM_NAME_LEN 128 | ||
8 | |||
9 | struct module; | ||
10 | |||
11 | static inline const char *kallsyms_lookup(unsigned long addr, | ||
12 | unsigned long *symbolsize, | ||
13 | unsigned long *offset, | ||
14 | char **modname, char *namebuf) | ||
15 | { | ||
16 | return NULL; | ||
17 | } | ||
18 | |||
19 | #include <execinfo.h> | ||
20 | #include <stdlib.h> | ||
21 | static inline void print_ip_sym(unsigned long ip) | ||
22 | { | ||
23 | char **name; | ||
24 | |||
25 | name = backtrace_symbols((void **)&ip, 1); | ||
26 | |||
27 | printf("%s\n", *name); | ||
28 | |||
29 | free(name); | ||
30 | } | ||
31 | |||
32 | #endif | ||
diff --git a/tools/lib/lockdep/uinclude/linux/kern_levels.h b/tools/lib/lockdep/uinclude/linux/kern_levels.h new file mode 100644 index 000000000000..3b9bade28698 --- /dev/null +++ b/tools/lib/lockdep/uinclude/linux/kern_levels.h | |||
@@ -0,0 +1,25 @@ | |||
1 | #ifndef __KERN_LEVELS_H__ | ||
2 | #define __KERN_LEVELS_H__ | ||
3 | |||
4 | #define KERN_SOH "" /* ASCII Start Of Header */ | ||
5 | #define KERN_SOH_ASCII '' | ||
6 | |||
7 | #define KERN_EMERG KERN_SOH "" /* system is unusable */ | ||
8 | #define KERN_ALERT KERN_SOH "" /* action must be taken immediately */ | ||
9 | #define KERN_CRIT KERN_SOH "" /* critical conditions */ | ||
10 | #define KERN_ERR KERN_SOH "" /* error conditions */ | ||
11 | #define KERN_WARNING KERN_SOH "" /* warning conditions */ | ||
12 | #define KERN_NOTICE KERN_SOH "" /* normal but significant condition */ | ||
13 | #define KERN_INFO KERN_SOH "" /* informational */ | ||
14 | #define KERN_DEBUG KERN_SOH "" /* debug-level messages */ | ||
15 | |||
16 | #define KERN_DEFAULT KERN_SOH "" /* the default kernel loglevel */ | ||
17 | |||
18 | /* | ||
19 | * Annotation for a "continued" line of log printout (only done after a | ||
20 | * line that had no enclosing \n). Only to be used by core/arch code | ||
21 | * during early bootup (a continued line is not SMP-safe otherwise). | ||
22 | */ | ||
23 | #define KERN_CONT "" | ||
24 | |||
25 | #endif | ||
diff --git a/tools/lib/lockdep/uinclude/linux/kernel.h b/tools/lib/lockdep/uinclude/linux/kernel.h new file mode 100644 index 000000000000..a11e3c357be7 --- /dev/null +++ b/tools/lib/lockdep/uinclude/linux/kernel.h | |||
@@ -0,0 +1,44 @@ | |||
1 | #ifndef _LIBLOCKDEP_LINUX_KERNEL_H_ | ||
2 | #define _LIBLOCKDEP_LINUX_KERNEL_H_ | ||
3 | |||
4 | #include <linux/export.h> | ||
5 | #include <linux/types.h> | ||
6 | #include <linux/rcu.h> | ||
7 | #include <linux/hardirq.h> | ||
8 | #include <linux/kern_levels.h> | ||
9 | |||
10 | #ifndef container_of | ||
11 | #define container_of(ptr, type, member) ({ \ | ||
12 | const typeof(((type *)0)->member) * __mptr = (ptr); \ | ||
13 | (type *)((char *)__mptr - offsetof(type, member)); }) | ||
14 | #endif | ||
15 | |||
16 | #define max(x, y) ({ \ | ||
17 | typeof(x) _max1 = (x); \ | ||
18 | typeof(y) _max2 = (y); \ | ||
19 | (void) (&_max1 == &_max2); \ | ||
20 | _max1 > _max2 ? _max1 : _max2; }) | ||
21 | |||
22 | #define BUILD_BUG_ON(condition) ((void)sizeof(char[1 - 2*!!(condition)])) | ||
23 | #define WARN_ON(x) (x) | ||
24 | #define WARN_ON_ONCE(x) (x) | ||
25 | #define likely(x) (x) | ||
26 | #define WARN(x, y, z) (x) | ||
27 | #define uninitialized_var(x) x | ||
28 | #define __init | ||
29 | #define noinline | ||
30 | #define list_add_tail_rcu list_add_tail | ||
31 | |||
32 | #ifndef CALLER_ADDR0 | ||
33 | #define CALLER_ADDR0 ((unsigned long)__builtin_return_address(0)) | ||
34 | #endif | ||
35 | |||
36 | #ifndef _RET_IP_ | ||
37 | #define _RET_IP_ CALLER_ADDR0 | ||
38 | #endif | ||
39 | |||
40 | #ifndef _THIS_IP_ | ||
41 | #define _THIS_IP_ ({ __label__ __here; __here: (unsigned long)&&__here; }) | ||
42 | #endif | ||
43 | |||
44 | #endif | ||
diff --git a/tools/lib/lockdep/uinclude/linux/kmemcheck.h b/tools/lib/lockdep/uinclude/linux/kmemcheck.h new file mode 100644 index 000000000000..94d598bc6abe --- /dev/null +++ b/tools/lib/lockdep/uinclude/linux/kmemcheck.h | |||
@@ -0,0 +1,8 @@ | |||
1 | #ifndef _LIBLOCKDEP_LINUX_KMEMCHECK_H_ | ||
2 | #define _LIBLOCKDEP_LINUX_KMEMCHECK_H_ | ||
3 | |||
4 | static inline void kmemcheck_mark_initialized(void *address, unsigned int n) | ||
5 | { | ||
6 | } | ||
7 | |||
8 | #endif | ||
diff --git a/tools/lib/lockdep/uinclude/linux/linkage.h b/tools/lib/lockdep/uinclude/linux/linkage.h new file mode 100644 index 000000000000..fab00ff936d1 --- /dev/null +++ b/tools/lib/lockdep/uinclude/linux/linkage.h | |||
@@ -0,0 +1,3 @@ | |||
1 | |||
2 | /* empty file */ | ||
3 | |||
diff --git a/tools/lib/lockdep/uinclude/linux/list.h b/tools/lib/lockdep/uinclude/linux/list.h new file mode 100644 index 000000000000..6e9ef31ed82e --- /dev/null +++ b/tools/lib/lockdep/uinclude/linux/list.h | |||
@@ -0,0 +1 @@ | |||
#include "../../../include/linux/list.h" | |||
diff --git a/tools/lib/lockdep/uinclude/linux/lockdep.h b/tools/lib/lockdep/uinclude/linux/lockdep.h new file mode 100644 index 000000000000..d0f5d6e50214 --- /dev/null +++ b/tools/lib/lockdep/uinclude/linux/lockdep.h | |||
@@ -0,0 +1,55 @@ | |||
1 | #ifndef _LIBLOCKDEP_LOCKDEP_H_ | ||
2 | #define _LIBLOCKDEP_LOCKDEP_H_ | ||
3 | |||
4 | #include <sys/prctl.h> | ||
5 | #include <sys/syscall.h> | ||
6 | #include <string.h> | ||
7 | #include <limits.h> | ||
8 | #include <linux/utsname.h> | ||
9 | |||
10 | |||
11 | #define MAX_LOCK_DEPTH 2000UL | ||
12 | |||
13 | #include "../../../include/linux/lockdep.h" | ||
14 | |||
15 | struct task_struct { | ||
16 | u64 curr_chain_key; | ||
17 | int lockdep_depth; | ||
18 | unsigned int lockdep_recursion; | ||
19 | struct held_lock held_locks[MAX_LOCK_DEPTH]; | ||
20 | gfp_t lockdep_reclaim_gfp; | ||
21 | int pid; | ||
22 | char comm[17]; | ||
23 | }; | ||
24 | |||
25 | extern struct task_struct *__curr(void); | ||
26 | |||
27 | #define current (__curr()) | ||
28 | |||
29 | #define debug_locks_off() 1 | ||
30 | #define task_pid_nr(tsk) ((tsk)->pid) | ||
31 | |||
32 | #define KSYM_NAME_LEN 128 | ||
33 | #define printk printf | ||
34 | |||
35 | #define list_del_rcu list_del | ||
36 | |||
37 | #define atomic_t unsigned long | ||
38 | #define atomic_inc(x) ((*(x))++) | ||
39 | |||
40 | static struct new_utsname *init_utsname(void) | ||
41 | { | ||
42 | static struct new_utsname n = (struct new_utsname) { | ||
43 | .release = "liblockdep", | ||
44 | .version = LIBLOCKDEP_VERSION, | ||
45 | }; | ||
46 | |||
47 | return &n; | ||
48 | } | ||
49 | |||
50 | #define print_tainted() "" | ||
51 | #define static_obj(x) 1 | ||
52 | |||
53 | #define debug_show_all_locks() | ||
54 | |||
55 | #endif | ||
diff --git a/tools/lib/lockdep/uinclude/linux/module.h b/tools/lib/lockdep/uinclude/linux/module.h new file mode 100644 index 000000000000..09c7a7be8ccc --- /dev/null +++ b/tools/lib/lockdep/uinclude/linux/module.h | |||
@@ -0,0 +1,6 @@ | |||
1 | #ifndef _LIBLOCKDEP_LINUX_MODULE_H_ | ||
2 | #define _LIBLOCKDEP_LINUX_MODULE_H_ | ||
3 | |||
4 | #define module_param(name, type, perm) | ||
5 | |||
6 | #endif | ||
diff --git a/tools/lib/lockdep/uinclude/linux/mutex.h b/tools/lib/lockdep/uinclude/linux/mutex.h new file mode 100644 index 000000000000..fab00ff936d1 --- /dev/null +++ b/tools/lib/lockdep/uinclude/linux/mutex.h | |||
@@ -0,0 +1,3 @@ | |||
1 | |||
2 | /* empty file */ | ||
3 | |||
diff --git a/tools/lib/lockdep/uinclude/linux/poison.h b/tools/lib/lockdep/uinclude/linux/poison.h new file mode 100644 index 000000000000..0c27bdf14233 --- /dev/null +++ b/tools/lib/lockdep/uinclude/linux/poison.h | |||
@@ -0,0 +1 @@ | |||
#include "../../../include/linux/poison.h" | |||
diff --git a/tools/lib/lockdep/uinclude/linux/prefetch.h b/tools/lib/lockdep/uinclude/linux/prefetch.h new file mode 100644 index 000000000000..d73fe6f850ac --- /dev/null +++ b/tools/lib/lockdep/uinclude/linux/prefetch.h | |||
@@ -0,0 +1,6 @@ | |||
1 | #ifndef _LIBLOCKDEP_LINUX_PREFETCH_H_ | ||
2 | #define _LIBLOCKDEP_LINUX_PREFETCH_H | ||
3 | |||
4 | static inline void prefetch(void *a __attribute__((unused))) { } | ||
5 | |||
6 | #endif | ||
diff --git a/tools/lib/lockdep/uinclude/linux/proc_fs.h b/tools/lib/lockdep/uinclude/linux/proc_fs.h new file mode 100644 index 000000000000..fab00ff936d1 --- /dev/null +++ b/tools/lib/lockdep/uinclude/linux/proc_fs.h | |||
@@ -0,0 +1,3 @@ | |||
1 | |||
2 | /* empty file */ | ||
3 | |||
diff --git a/tools/lib/lockdep/uinclude/linux/rbtree.h b/tools/lib/lockdep/uinclude/linux/rbtree.h new file mode 100644 index 000000000000..965901db4862 --- /dev/null +++ b/tools/lib/lockdep/uinclude/linux/rbtree.h | |||
@@ -0,0 +1 @@ | |||
#include "../../../include/linux/rbtree.h" | |||
diff --git a/tools/lib/lockdep/uinclude/linux/rbtree_augmented.h b/tools/lib/lockdep/uinclude/linux/rbtree_augmented.h new file mode 100644 index 000000000000..c3759477379c --- /dev/null +++ b/tools/lib/lockdep/uinclude/linux/rbtree_augmented.h | |||
@@ -0,0 +1,2 @@ | |||
1 | #define __always_inline | ||
2 | #include "../../../include/linux/rbtree_augmented.h" | ||
diff --git a/tools/lib/lockdep/uinclude/linux/rcu.h b/tools/lib/lockdep/uinclude/linux/rcu.h new file mode 100644 index 000000000000..4c99fcb5da27 --- /dev/null +++ b/tools/lib/lockdep/uinclude/linux/rcu.h | |||
@@ -0,0 +1,16 @@ | |||
1 | #ifndef _LIBLOCKDEP_RCU_H_ | ||
2 | #define _LIBLOCKDEP_RCU_H_ | ||
3 | |||
4 | int rcu_scheduler_active; | ||
5 | |||
6 | static inline int rcu_lockdep_current_cpu_online(void) | ||
7 | { | ||
8 | return 1; | ||
9 | } | ||
10 | |||
11 | static inline int rcu_is_cpu_idle(void) | ||
12 | { | ||
13 | return 1; | ||
14 | } | ||
15 | |||
16 | #endif | ||
diff --git a/tools/lib/lockdep/uinclude/linux/seq_file.h b/tools/lib/lockdep/uinclude/linux/seq_file.h new file mode 100644 index 000000000000..fab00ff936d1 --- /dev/null +++ b/tools/lib/lockdep/uinclude/linux/seq_file.h | |||
@@ -0,0 +1,3 @@ | |||
1 | |||
2 | /* empty file */ | ||
3 | |||
diff --git a/tools/lib/lockdep/uinclude/linux/spinlock.h b/tools/lib/lockdep/uinclude/linux/spinlock.h new file mode 100644 index 000000000000..68c1aa2bcba5 --- /dev/null +++ b/tools/lib/lockdep/uinclude/linux/spinlock.h | |||
@@ -0,0 +1,25 @@ | |||
1 | #ifndef _LIBLOCKDEP_SPINLOCK_H_ | ||
2 | #define _LIBLOCKDEP_SPINLOCK_H_ | ||
3 | |||
4 | #include <pthread.h> | ||
5 | #include <stdbool.h> | ||
6 | |||
7 | #define arch_spinlock_t pthread_mutex_t | ||
8 | #define __ARCH_SPIN_LOCK_UNLOCKED PTHREAD_MUTEX_INITIALIZER | ||
9 | |||
10 | static inline void arch_spin_lock(arch_spinlock_t *mutex) | ||
11 | { | ||
12 | pthread_mutex_lock(mutex); | ||
13 | } | ||
14 | |||
15 | static inline void arch_spin_unlock(arch_spinlock_t *mutex) | ||
16 | { | ||
17 | pthread_mutex_unlock(mutex); | ||
18 | } | ||
19 | |||
20 | static inline bool arch_spin_is_locked(arch_spinlock_t *mutex) | ||
21 | { | ||
22 | return true; | ||
23 | } | ||
24 | |||
25 | #endif | ||
diff --git a/tools/lib/lockdep/uinclude/linux/stacktrace.h b/tools/lib/lockdep/uinclude/linux/stacktrace.h new file mode 100644 index 000000000000..39aecc6b19d1 --- /dev/null +++ b/tools/lib/lockdep/uinclude/linux/stacktrace.h | |||
@@ -0,0 +1,32 @@ | |||
1 | #ifndef _LIBLOCKDEP_LINUX_STACKTRACE_H_ | ||
2 | #define _LIBLOCKDEP_LINUX_STACKTRACE_H_ | ||
3 | |||
4 | #include <execinfo.h> | ||
5 | |||
6 | struct stack_trace { | ||
7 | unsigned int nr_entries, max_entries; | ||
8 | unsigned long *entries; | ||
9 | int skip; | ||
10 | }; | ||
11 | |||
12 | static inline void print_stack_trace(struct stack_trace *trace, int spaces) | ||
13 | { | ||
14 | backtrace_symbols_fd((void **)trace->entries, trace->nr_entries, 1); | ||
15 | } | ||
16 | |||
17 | #define save_stack_trace(trace) \ | ||
18 | ((trace)->nr_entries = \ | ||
19 | backtrace((void **)(trace)->entries, (trace)->max_entries)) | ||
20 | |||
21 | static inline int dump_stack(void) | ||
22 | { | ||
23 | void *array[64]; | ||
24 | size_t size; | ||
25 | |||
26 | size = backtrace(array, 64); | ||
27 | backtrace_symbols_fd(array, size, 1); | ||
28 | |||
29 | return 0; | ||
30 | } | ||
31 | |||
32 | #endif | ||
diff --git a/tools/lib/lockdep/uinclude/linux/stringify.h b/tools/lib/lockdep/uinclude/linux/stringify.h new file mode 100644 index 000000000000..05dfcd1ac118 --- /dev/null +++ b/tools/lib/lockdep/uinclude/linux/stringify.h | |||
@@ -0,0 +1,7 @@ | |||
1 | #ifndef _LIBLOCKDEP_LINUX_STRINGIFY_H_ | ||
2 | #define _LIBLOCKDEP_LINUX_STRINGIFY_H_ | ||
3 | |||
4 | #define __stringify_1(x...) #x | ||
5 | #define __stringify(x...) __stringify_1(x) | ||
6 | |||
7 | #endif | ||
diff --git a/tools/lib/lockdep/uinclude/linux/types.h b/tools/lib/lockdep/uinclude/linux/types.h new file mode 100644 index 000000000000..929938f426de --- /dev/null +++ b/tools/lib/lockdep/uinclude/linux/types.h | |||
@@ -0,0 +1,58 @@ | |||
1 | #ifndef _LIBLOCKDEP_LINUX_TYPES_H_ | ||
2 | #define _LIBLOCKDEP_LINUX_TYPES_H_ | ||
3 | |||
4 | #include <stdbool.h> | ||
5 | #include <stddef.h> | ||
6 | |||
7 | #define __SANE_USERSPACE_TYPES__ /* For PPC64, to get LL64 types */ | ||
8 | #include <asm/types.h> | ||
9 | |||
10 | struct page; | ||
11 | struct kmem_cache; | ||
12 | |||
13 | typedef unsigned gfp_t; | ||
14 | |||
15 | typedef __u64 u64; | ||
16 | typedef __s64 s64; | ||
17 | |||
18 | typedef __u32 u32; | ||
19 | typedef __s32 s32; | ||
20 | |||
21 | typedef __u16 u16; | ||
22 | typedef __s16 s16; | ||
23 | |||
24 | typedef __u8 u8; | ||
25 | typedef __s8 s8; | ||
26 | |||
27 | #ifdef __CHECKER__ | ||
28 | #define __bitwise__ __attribute__((bitwise)) | ||
29 | #else | ||
30 | #define __bitwise__ | ||
31 | #endif | ||
32 | #ifdef __CHECK_ENDIAN__ | ||
33 | #define __bitwise __bitwise__ | ||
34 | #else | ||
35 | #define __bitwise | ||
36 | #endif | ||
37 | |||
38 | |||
39 | typedef __u16 __bitwise __le16; | ||
40 | typedef __u16 __bitwise __be16; | ||
41 | typedef __u32 __bitwise __le32; | ||
42 | typedef __u32 __bitwise __be32; | ||
43 | typedef __u64 __bitwise __le64; | ||
44 | typedef __u64 __bitwise __be64; | ||
45 | |||
46 | struct list_head { | ||
47 | struct list_head *next, *prev; | ||
48 | }; | ||
49 | |||
50 | struct hlist_head { | ||
51 | struct hlist_node *first; | ||
52 | }; | ||
53 | |||
54 | struct hlist_node { | ||
55 | struct hlist_node *next, **pprev; | ||
56 | }; | ||
57 | |||
58 | #endif | ||
diff --git a/tools/lib/lockdep/uinclude/trace/events/lock.h b/tools/lib/lockdep/uinclude/trace/events/lock.h new file mode 100644 index 000000000000..fab00ff936d1 --- /dev/null +++ b/tools/lib/lockdep/uinclude/trace/events/lock.h | |||
@@ -0,0 +1,3 @@ | |||
1 | |||
2 | /* empty file */ | ||
3 | |||
diff --git a/tools/testing/ktest/ktest.pl b/tools/testing/ktest/ktest.pl index 999eab1bc64f..40631569a0fd 100755 --- a/tools/testing/ktest/ktest.pl +++ b/tools/testing/ktest/ktest.pl | |||
@@ -18,6 +18,7 @@ $| = 1; | |||
18 | my %opt; | 18 | my %opt; |
19 | my %repeat_tests; | 19 | my %repeat_tests; |
20 | my %repeats; | 20 | my %repeats; |
21 | my %evals; | ||
21 | 22 | ||
22 | #default opts | 23 | #default opts |
23 | my %default = ( | 24 | my %default = ( |
@@ -25,6 +26,7 @@ my %default = ( | |||
25 | "TEST_TYPE" => "build", | 26 | "TEST_TYPE" => "build", |
26 | "BUILD_TYPE" => "randconfig", | 27 | "BUILD_TYPE" => "randconfig", |
27 | "MAKE_CMD" => "make", | 28 | "MAKE_CMD" => "make", |
29 | "CLOSE_CONSOLE_SIGNAL" => "INT", | ||
28 | "TIMEOUT" => 120, | 30 | "TIMEOUT" => 120, |
29 | "TMP_DIR" => "/tmp/ktest/\${MACHINE}", | 31 | "TMP_DIR" => "/tmp/ktest/\${MACHINE}", |
30 | "SLEEP_TIME" => 60, # sleep time between tests | 32 | "SLEEP_TIME" => 60, # sleep time between tests |
@@ -39,6 +41,7 @@ my %default = ( | |||
39 | "CLEAR_LOG" => 0, | 41 | "CLEAR_LOG" => 0, |
40 | "BISECT_MANUAL" => 0, | 42 | "BISECT_MANUAL" => 0, |
41 | "BISECT_SKIP" => 1, | 43 | "BISECT_SKIP" => 1, |
44 | "BISECT_TRIES" => 1, | ||
42 | "MIN_CONFIG_TYPE" => "boot", | 45 | "MIN_CONFIG_TYPE" => "boot", |
43 | "SUCCESS_LINE" => "login:", | 46 | "SUCCESS_LINE" => "login:", |
44 | "DETECT_TRIPLE_FAULT" => 1, | 47 | "DETECT_TRIPLE_FAULT" => 1, |
@@ -137,6 +140,7 @@ my $bisect_bad_commit = ""; | |||
137 | my $reverse_bisect; | 140 | my $reverse_bisect; |
138 | my $bisect_manual; | 141 | my $bisect_manual; |
139 | my $bisect_skip; | 142 | my $bisect_skip; |
143 | my $bisect_tries; | ||
140 | my $config_bisect_good; | 144 | my $config_bisect_good; |
141 | my $bisect_ret_good; | 145 | my $bisect_ret_good; |
142 | my $bisect_ret_bad; | 146 | my $bisect_ret_bad; |
@@ -163,6 +167,7 @@ my $timeout; | |||
163 | my $booted_timeout; | 167 | my $booted_timeout; |
164 | my $detect_triplefault; | 168 | my $detect_triplefault; |
165 | my $console; | 169 | my $console; |
170 | my $close_console_signal; | ||
166 | my $reboot_success_line; | 171 | my $reboot_success_line; |
167 | my $success_line; | 172 | my $success_line; |
168 | my $stop_after_success; | 173 | my $stop_after_success; |
@@ -273,6 +278,7 @@ my %option_map = ( | |||
273 | "IGNORE_ERRORS" => \$ignore_errors, | 278 | "IGNORE_ERRORS" => \$ignore_errors, |
274 | "BISECT_MANUAL" => \$bisect_manual, | 279 | "BISECT_MANUAL" => \$bisect_manual, |
275 | "BISECT_SKIP" => \$bisect_skip, | 280 | "BISECT_SKIP" => \$bisect_skip, |
281 | "BISECT_TRIES" => \$bisect_tries, | ||
276 | "CONFIG_BISECT_GOOD" => \$config_bisect_good, | 282 | "CONFIG_BISECT_GOOD" => \$config_bisect_good, |
277 | "BISECT_RET_GOOD" => \$bisect_ret_good, | 283 | "BISECT_RET_GOOD" => \$bisect_ret_good, |
278 | "BISECT_RET_BAD" => \$bisect_ret_bad, | 284 | "BISECT_RET_BAD" => \$bisect_ret_bad, |
@@ -285,6 +291,7 @@ my %option_map = ( | |||
285 | "TIMEOUT" => \$timeout, | 291 | "TIMEOUT" => \$timeout, |
286 | "BOOTED_TIMEOUT" => \$booted_timeout, | 292 | "BOOTED_TIMEOUT" => \$booted_timeout, |
287 | "CONSOLE" => \$console, | 293 | "CONSOLE" => \$console, |
294 | "CLOSE_CONSOLE_SIGNAL" => \$close_console_signal, | ||
288 | "DETECT_TRIPLE_FAULT" => \$detect_triplefault, | 295 | "DETECT_TRIPLE_FAULT" => \$detect_triplefault, |
289 | "SUCCESS_LINE" => \$success_line, | 296 | "SUCCESS_LINE" => \$success_line, |
290 | "REBOOT_SUCCESS_LINE" => \$reboot_success_line, | 297 | "REBOOT_SUCCESS_LINE" => \$reboot_success_line, |
@@ -445,6 +452,27 @@ $config_help{"REBOOT_SCRIPT"} = << "EOF" | |||
445 | EOF | 452 | EOF |
446 | ; | 453 | ; |
447 | 454 | ||
455 | sub _logit { | ||
456 | if (defined($opt{"LOG_FILE"})) { | ||
457 | open(OUT, ">> $opt{LOG_FILE}") or die "Can't write to $opt{LOG_FILE}"; | ||
458 | print OUT @_; | ||
459 | close(OUT); | ||
460 | } | ||
461 | } | ||
462 | |||
463 | sub logit { | ||
464 | if (defined($opt{"LOG_FILE"})) { | ||
465 | _logit @_; | ||
466 | } else { | ||
467 | print @_; | ||
468 | } | ||
469 | } | ||
470 | |||
471 | sub doprint { | ||
472 | print @_; | ||
473 | _logit @_; | ||
474 | } | ||
475 | |||
448 | sub read_prompt { | 476 | sub read_prompt { |
449 | my ($cancel, $prompt) = @_; | 477 | my ($cancel, $prompt) = @_; |
450 | 478 | ||
@@ -662,6 +690,22 @@ sub set_value { | |||
662 | } | 690 | } |
663 | } | 691 | } |
664 | 692 | ||
693 | sub set_eval { | ||
694 | my ($lvalue, $rvalue, $name) = @_; | ||
695 | |||
696 | my $prvalue = process_variables($rvalue); | ||
697 | my $arr; | ||
698 | |||
699 | if (defined($evals{$lvalue})) { | ||
700 | $arr = $evals{$lvalue}; | ||
701 | } else { | ||
702 | $arr = []; | ||
703 | $evals{$lvalue} = $arr; | ||
704 | } | ||
705 | |||
706 | push @{$arr}, $rvalue; | ||
707 | } | ||
708 | |||
665 | sub set_variable { | 709 | sub set_variable { |
666 | my ($lvalue, $rvalue) = @_; | 710 | my ($lvalue, $rvalue) = @_; |
667 | 711 | ||
@@ -947,6 +991,20 @@ sub __read_config { | |||
947 | $test_case = 1; | 991 | $test_case = 1; |
948 | } | 992 | } |
949 | 993 | ||
994 | } elsif (/^\s*([A-Z_\[\]\d]+)\s*=~\s*(.*?)\s*$/) { | ||
995 | |||
996 | next if ($skip); | ||
997 | |||
998 | my $lvalue = $1; | ||
999 | my $rvalue = $2; | ||
1000 | |||
1001 | if ($default || $lvalue =~ /\[\d+\]$/) { | ||
1002 | set_eval($lvalue, $rvalue, $name); | ||
1003 | } else { | ||
1004 | my $val = "$lvalue\[$test_num\]"; | ||
1005 | set_eval($val, $rvalue, $name); | ||
1006 | } | ||
1007 | |||
950 | } elsif (/^\s*([A-Z_\[\]\d]+)\s*=\s*(.*?)\s*$/) { | 1008 | } elsif (/^\s*([A-Z_\[\]\d]+)\s*=\s*(.*?)\s*$/) { |
951 | 1009 | ||
952 | next if ($skip); | 1010 | next if ($skip); |
@@ -1126,6 +1184,10 @@ sub __eval_option { | |||
1126 | } elsif (defined($opt{$var})) { | 1184 | } elsif (defined($opt{$var})) { |
1127 | $o = $opt{$var}; | 1185 | $o = $opt{$var}; |
1128 | $retval = "$retval$o"; | 1186 | $retval = "$retval$o"; |
1187 | } elsif ($var eq "KERNEL_VERSION" && defined($make)) { | ||
1188 | # special option KERNEL_VERSION uses kernel version | ||
1189 | get_version(); | ||
1190 | $retval = "$retval$version"; | ||
1129 | } else { | 1191 | } else { |
1130 | $retval = "$retval\$\{$var\}"; | 1192 | $retval = "$retval\$\{$var\}"; |
1131 | } | 1193 | } |
@@ -1140,6 +1202,33 @@ sub __eval_option { | |||
1140 | return $retval; | 1202 | return $retval; |
1141 | } | 1203 | } |
1142 | 1204 | ||
1205 | sub process_evals { | ||
1206 | my ($name, $option, $i) = @_; | ||
1207 | |||
1208 | my $option_name = "$name\[$i\]"; | ||
1209 | my $ev; | ||
1210 | |||
1211 | my $old_option = $option; | ||
1212 | |||
1213 | if (defined($evals{$option_name})) { | ||
1214 | $ev = $evals{$option_name}; | ||
1215 | } elsif (defined($evals{$name})) { | ||
1216 | $ev = $evals{$name}; | ||
1217 | } else { | ||
1218 | return $option; | ||
1219 | } | ||
1220 | |||
1221 | for my $e (@{$ev}) { | ||
1222 | eval "\$option =~ $e"; | ||
1223 | } | ||
1224 | |||
1225 | if ($option ne $old_option) { | ||
1226 | doprint("$name changed from '$old_option' to '$option'\n"); | ||
1227 | } | ||
1228 | |||
1229 | return $option; | ||
1230 | } | ||
1231 | |||
1143 | sub eval_option { | 1232 | sub eval_option { |
1144 | my ($name, $option, $i) = @_; | 1233 | my ($name, $option, $i) = @_; |
1145 | 1234 | ||
@@ -1160,28 +1249,9 @@ sub eval_option { | |||
1160 | $option = __eval_option($name, $option, $i); | 1249 | $option = __eval_option($name, $option, $i); |
1161 | } | 1250 | } |
1162 | 1251 | ||
1163 | return $option; | 1252 | $option = process_evals($name, $option, $i); |
1164 | } | ||
1165 | 1253 | ||
1166 | sub _logit { | 1254 | return $option; |
1167 | if (defined($opt{"LOG_FILE"})) { | ||
1168 | open(OUT, ">> $opt{LOG_FILE}") or die "Can't write to $opt{LOG_FILE}"; | ||
1169 | print OUT @_; | ||
1170 | close(OUT); | ||
1171 | } | ||
1172 | } | ||
1173 | |||
1174 | sub logit { | ||
1175 | if (defined($opt{"LOG_FILE"})) { | ||
1176 | _logit @_; | ||
1177 | } else { | ||
1178 | print @_; | ||
1179 | } | ||
1180 | } | ||
1181 | |||
1182 | sub doprint { | ||
1183 | print @_; | ||
1184 | _logit @_; | ||
1185 | } | 1255 | } |
1186 | 1256 | ||
1187 | sub run_command; | 1257 | sub run_command; |
@@ -1296,7 +1366,7 @@ sub close_console { | |||
1296 | my ($fp, $pid) = @_; | 1366 | my ($fp, $pid) = @_; |
1297 | 1367 | ||
1298 | doprint "kill child process $pid\n"; | 1368 | doprint "kill child process $pid\n"; |
1299 | kill 2, $pid; | 1369 | kill $close_console_signal, $pid; |
1300 | 1370 | ||
1301 | print "closing!\n"; | 1371 | print "closing!\n"; |
1302 | close($fp); | 1372 | close($fp); |
@@ -2517,12 +2587,29 @@ sub run_bisect { | |||
2517 | $buildtype = "useconfig:$minconfig"; | 2587 | $buildtype = "useconfig:$minconfig"; |
2518 | } | 2588 | } |
2519 | 2589 | ||
2520 | my $ret = run_bisect_test $type, $buildtype; | 2590 | # If the user sets bisect_tries to less than 1, then no tries |
2591 | # is a success. | ||
2592 | my $ret = 1; | ||
2521 | 2593 | ||
2522 | if ($bisect_manual) { | 2594 | # Still let the user manually decide that though. |
2595 | if ($bisect_tries < 1 && $bisect_manual) { | ||
2523 | $ret = answer_bisect; | 2596 | $ret = answer_bisect; |
2524 | } | 2597 | } |
2525 | 2598 | ||
2599 | for (my $i = 0; $i < $bisect_tries; $i++) { | ||
2600 | if ($bisect_tries > 1) { | ||
2601 | my $t = $i + 1; | ||
2602 | doprint("Running bisect trial $t of $bisect_tries:\n"); | ||
2603 | } | ||
2604 | $ret = run_bisect_test $type, $buildtype; | ||
2605 | |||
2606 | if ($bisect_manual) { | ||
2607 | $ret = answer_bisect; | ||
2608 | } | ||
2609 | |||
2610 | last if (!$ret); | ||
2611 | } | ||
2612 | |||
2526 | # Are we looking for where it worked, not failed? | 2613 | # Are we looking for where it worked, not failed? |
2527 | if ($reverse_bisect && $ret >= 0) { | 2614 | if ($reverse_bisect && $ret >= 0) { |
2528 | $ret = !$ret; | 2615 | $ret = !$ret; |
@@ -3916,6 +4003,18 @@ for (my $i = 1; $i <= $opt{"NUM_TESTS"}; $i++) { | |||
3916 | 4003 | ||
3917 | my $makecmd = set_test_option("MAKE_CMD", $i); | 4004 | my $makecmd = set_test_option("MAKE_CMD", $i); |
3918 | 4005 | ||
4006 | $outputdir = set_test_option("OUTPUT_DIR", $i); | ||
4007 | $builddir = set_test_option("BUILD_DIR", $i); | ||
4008 | |||
4009 | chdir $builddir || die "can't change directory to $builddir"; | ||
4010 | |||
4011 | if (!-d $outputdir) { | ||
4012 | mkpath($outputdir) or | ||
4013 | die "can't create $outputdir"; | ||
4014 | } | ||
4015 | |||
4016 | $make = "$makecmd O=$outputdir"; | ||
4017 | |||
3919 | # Load all the options into their mapped variable names | 4018 | # Load all the options into their mapped variable names |
3920 | foreach my $opt (keys %option_map) { | 4019 | foreach my $opt (keys %option_map) { |
3921 | ${$option_map{$opt}} = set_test_option($opt, $i); | 4020 | ${$option_map{$opt}} = set_test_option($opt, $i); |
@@ -3940,13 +4039,9 @@ for (my $i = 1; $i <= $opt{"NUM_TESTS"}; $i++) { | |||
3940 | $start_minconfig = $minconfig; | 4039 | $start_minconfig = $minconfig; |
3941 | } | 4040 | } |
3942 | 4041 | ||
3943 | chdir $builddir || die "can't change directory to $builddir"; | 4042 | if (!-d $tmpdir) { |
3944 | 4043 | mkpath($tmpdir) or | |
3945 | foreach my $dir ($tmpdir, $outputdir) { | 4044 | die "can't create $tmpdir"; |
3946 | if (!-d $dir) { | ||
3947 | mkpath($dir) or | ||
3948 | die "can't create $dir"; | ||
3949 | } | ||
3950 | } | 4045 | } |
3951 | 4046 | ||
3952 | $ENV{"SSH_USER"} = $ssh_user; | 4047 | $ENV{"SSH_USER"} = $ssh_user; |
@@ -3955,7 +4050,6 @@ for (my $i = 1; $i <= $opt{"NUM_TESTS"}; $i++) { | |||
3955 | $buildlog = "$tmpdir/buildlog-$machine"; | 4050 | $buildlog = "$tmpdir/buildlog-$machine"; |
3956 | $testlog = "$tmpdir/testlog-$machine"; | 4051 | $testlog = "$tmpdir/testlog-$machine"; |
3957 | $dmesg = "$tmpdir/dmesg-$machine"; | 4052 | $dmesg = "$tmpdir/dmesg-$machine"; |
3958 | $make = "$makecmd O=$outputdir"; | ||
3959 | $output_config = "$outputdir/.config"; | 4053 | $output_config = "$outputdir/.config"; |
3960 | 4054 | ||
3961 | if (!$buildonly) { | 4055 | if (!$buildonly) { |
diff --git a/tools/testing/ktest/sample.conf b/tools/testing/ktest/sample.conf index 0a290fb4cd5e..172eec4517fb 100644 --- a/tools/testing/ktest/sample.conf +++ b/tools/testing/ktest/sample.conf | |||
@@ -328,6 +328,13 @@ | |||
328 | # For a virtual machine with guest name "Guest". | 328 | # For a virtual machine with guest name "Guest". |
329 | #CONSOLE = virsh console Guest | 329 | #CONSOLE = virsh console Guest |
330 | 330 | ||
331 | # Signal to send to kill console. | ||
332 | # ktest.pl will create a child process to monitor the console. | ||
333 | # When the console is finished, ktest will kill the child process | ||
334 | # with this signal. | ||
335 | # (default INT) | ||
336 | #CLOSE_CONSOLE_SIGNAL = HUP | ||
337 | |||
331 | # Required version ending to differentiate the test | 338 | # Required version ending to differentiate the test |
332 | # from other linux builds on the system. | 339 | # from other linux builds on the system. |
333 | #LOCALVERSION = -test | 340 | #LOCALVERSION = -test |
@@ -1021,6 +1028,20 @@ | |||
1021 | # BISECT_BAD with BISECT_CHECK = good or | 1028 | # BISECT_BAD with BISECT_CHECK = good or |
1022 | # BISECT_CHECK = bad, respectively. | 1029 | # BISECT_CHECK = bad, respectively. |
1023 | # | 1030 | # |
1031 | # BISECT_TRIES = 5 (optional, default 1) | ||
1032 | # | ||
1033 | # For those cases that it takes several tries to hit a bug, | ||
1034 | # the BISECT_TRIES is useful. It is the number of times the | ||
1035 | # test is ran before it says the kernel is good. The first failure | ||
1036 | # will stop trying and mark the current SHA1 as bad. | ||
1037 | # | ||
1038 | # Note, as with all race bugs, there's no guarantee that if | ||
1039 | # it succeeds, it is really a good bisect. But it helps in case | ||
1040 | # the bug is some what reliable. | ||
1041 | # | ||
1042 | # You can set BISECT_TRIES to zero, and all tests will be considered | ||
1043 | # good, unless you also set BISECT_MANUAL. | ||
1044 | # | ||
1024 | # BISECT_RET_GOOD = 0 (optional, default undefined) | 1045 | # BISECT_RET_GOOD = 0 (optional, default undefined) |
1025 | # | 1046 | # |
1026 | # In case the specificed test returns something other than just | 1047 | # In case the specificed test returns something other than just |
diff --git a/tools/testing/selftests/rcutorture/.gitignore b/tools/testing/selftests/rcutorture/.gitignore new file mode 100644 index 000000000000..05838f6f2ebe --- /dev/null +++ b/tools/testing/selftests/rcutorture/.gitignore | |||
@@ -0,0 +1,6 @@ | |||
1 | initrd | ||
2 | linux-2.6 | ||
3 | b[0-9]* | ||
4 | rcu-test-image | ||
5 | res | ||
6 | *.swp | ||
diff --git a/tools/testing/selftests/rcutorture/bin/config2frag.sh b/tools/testing/selftests/rcutorture/bin/config2frag.sh new file mode 100644 index 000000000000..9f9ffcd427d3 --- /dev/null +++ b/tools/testing/selftests/rcutorture/bin/config2frag.sh | |||
@@ -0,0 +1,25 @@ | |||
1 | #!/bin/sh | ||
2 | # Usage: sh config2frag.sh < .config > configfrag | ||
3 | # | ||
4 | # Converts the "# CONFIG_XXX is not set" to "CONFIG_XXX=n" so that the | ||
5 | # resulting file becomes a legitimate Kconfig fragment. | ||
6 | # | ||
7 | # This program is free software; you can redistribute it and/or modify | ||
8 | # it under the terms of the GNU General Public License as published by | ||
9 | # the Free Software Foundation; either version 2 of the License, or | ||
10 | # (at your option) any later version. | ||
11 | # | ||
12 | # This program is distributed in the hope that it will be useful, | ||
13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
15 | # GNU General Public License for more details. | ||
16 | # | ||
17 | # You should have received a copy of the GNU General Public License | ||
18 | # along with this program; if not, you can access it online at | ||
19 | # http://www.gnu.org/licenses/gpl-2.0.html. | ||
20 | # | ||
21 | # Copyright (C) IBM Corporation, 2013 | ||
22 | # | ||
23 | # Authors: Paul E. McKenney <paulmck@linux.vnet.ibm.com> | ||
24 | |||
25 | LANG=C sed -e 's/^# CONFIG_\([a-zA-Z0-9_]*\) is not set$/CONFIG_\1=n/' | ||
diff --git a/tools/testing/selftests/rcutorture/bin/configNR_CPUS.sh b/tools/testing/selftests/rcutorture/bin/configNR_CPUS.sh new file mode 100755 index 000000000000..43540f1828cc --- /dev/null +++ b/tools/testing/selftests/rcutorture/bin/configNR_CPUS.sh | |||
@@ -0,0 +1,45 @@ | |||
1 | #!/bin/bash | ||
2 | # | ||
3 | # Extract the number of CPUs expected from the specified Kconfig-file | ||
4 | # fragment by checking CONFIG_SMP and CONFIG_NR_CPUS. If the specified | ||
5 | # file gives no clue, base the number on the number of idle CPUs on | ||
6 | # the system. | ||
7 | # | ||
8 | # Usage: configNR_CPUS.sh config-frag | ||
9 | # | ||
10 | # This program is free software; you can redistribute it and/or modify | ||
11 | # it under the terms of the GNU General Public License as published by | ||
12 | # the Free Software Foundation; either version 2 of the License, or | ||
13 | # (at your option) any later version. | ||
14 | # | ||
15 | # This program is distributed in the hope that it will be useful, | ||
16 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
17 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
18 | # GNU General Public License for more details. | ||
19 | # | ||
20 | # You should have received a copy of the GNU General Public License | ||
21 | # along with this program; if not, you can access it online at | ||
22 | # http://www.gnu.org/licenses/gpl-2.0.html. | ||
23 | # | ||
24 | # Copyright (C) IBM Corporation, 2013 | ||
25 | # | ||
26 | # Authors: Paul E. McKenney <paulmck@linux.vnet.ibm.com> | ||
27 | |||
28 | cf=$1 | ||
29 | if test ! -r $cf | ||
30 | then | ||
31 | echo Unreadable config fragment $cf 1>&2 | ||
32 | exit -1 | ||
33 | fi | ||
34 | if grep -q '^CONFIG_SMP=n$' $cf | ||
35 | then | ||
36 | echo 1 | ||
37 | exit 0 | ||
38 | fi | ||
39 | if grep -q '^CONFIG_NR_CPUS=' $cf | ||
40 | then | ||
41 | grep '^CONFIG_NR_CPUS=' $cf | | ||
42 | sed -e 's/^CONFIG_NR_CPUS=\([0-9]*\).*$/\1/' | ||
43 | exit 0 | ||
44 | fi | ||
45 | cpus2use.sh | ||
diff --git a/tools/testing/selftests/rcutorture/bin/configcheck.sh b/tools/testing/selftests/rcutorture/bin/configcheck.sh new file mode 100755 index 000000000000..d686537dd55c --- /dev/null +++ b/tools/testing/selftests/rcutorture/bin/configcheck.sh | |||
@@ -0,0 +1,54 @@ | |||
1 | #!/bin/sh | ||
2 | # Usage: sh configcheck.sh .config .config-template | ||
3 | # | ||
4 | # This program is free software; you can redistribute it and/or modify | ||
5 | # it under the terms of the GNU General Public License as published by | ||
6 | # the Free Software Foundation; either version 2 of the License, or | ||
7 | # (at your option) any later version. | ||
8 | # | ||
9 | # This program is distributed in the hope that it will be useful, | ||
10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
12 | # GNU General Public License for more details. | ||
13 | # | ||
14 | # You should have received a copy of the GNU General Public License | ||
15 | # along with this program; if not, you can access it online at | ||
16 | # http://www.gnu.org/licenses/gpl-2.0.html. | ||
17 | # | ||
18 | # Copyright (C) IBM Corporation, 2011 | ||
19 | # | ||
20 | # Authors: Paul E. McKenney <paulmck@linux.vnet.ibm.com> | ||
21 | |||
22 | T=/tmp/abat-chk-config.sh.$$ | ||
23 | trap 'rm -rf $T' 0 | ||
24 | mkdir $T | ||
25 | |||
26 | cat $1 > $T/.config | ||
27 | |||
28 | cat $2 | sed -e 's/\(.*\)=n/# \1 is not set/' -e 's/^#CHECK#//' | | ||
29 | awk ' | ||
30 | BEGIN { | ||
31 | print "if grep -q \"" $0 "\" < '"$T/.config"'"; | ||
32 | print "then"; | ||
33 | print "\t:"; | ||
34 | print "else"; | ||
35 | if ($1 == "#") { | ||
36 | print "\tif grep -q \"" $2 "\" < '"$T/.config"'"; | ||
37 | print "\tthen"; | ||
38 | print "\t\tif test \"$firsttime\" = \"\"" | ||
39 | print "\t\tthen" | ||
40 | print "\t\t\tfirsttime=1" | ||
41 | print "\t\tfi" | ||
42 | print "\t\techo \":" $2 ": improperly set\""; | ||
43 | print "\telse"; | ||
44 | print "\t\t:"; | ||
45 | print "\tfi"; | ||
46 | } else { | ||
47 | print "\tif test \"$firsttime\" = \"\"" | ||
48 | print "\tthen" | ||
49 | print "\t\tfirsttime=1" | ||
50 | print "\tfi" | ||
51 | print "\techo \":" $0 ": improperly set\""; | ||
52 | } | ||
53 | print "fi"; | ||
54 | }' | sh | ||
diff --git a/tools/testing/selftests/rcutorture/bin/configinit.sh b/tools/testing/selftests/rcutorture/bin/configinit.sh new file mode 100755 index 000000000000..a1be6e62add1 --- /dev/null +++ b/tools/testing/selftests/rcutorture/bin/configinit.sh | |||
@@ -0,0 +1,74 @@ | |||
1 | #!/bin/sh | ||
2 | # | ||
3 | # sh configinit.sh config-spec-file [ build output dir ] | ||
4 | # | ||
5 | # Create a .config file from the spec file. Run from the kernel source tree. | ||
6 | # Exits with 0 if all went well, with 1 if all went well but the config | ||
7 | # did not match, and some other number for other failures. | ||
8 | # | ||
9 | # The first argument is the .config specification file, which contains | ||
10 | # desired settings, for example, "CONFIG_NO_HZ=y". For best results, | ||
11 | # this should be a full pathname. | ||
12 | # | ||
13 | # The second argument is a optional path to a build output directory, | ||
14 | # for example, "O=/tmp/foo". If this argument is omitted, the .config | ||
15 | # file will be generated directly in the current directory. | ||
16 | # | ||
17 | # This program is free software; you can redistribute it and/or modify | ||
18 | # it under the terms of the GNU General Public License as published by | ||
19 | # the Free Software Foundation; either version 2 of the License, or | ||
20 | # (at your option) any later version. | ||
21 | # | ||
22 | # This program is distributed in the hope that it will be useful, | ||
23 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
24 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
25 | # GNU General Public License for more details. | ||
26 | # | ||
27 | # You should have received a copy of the GNU General Public License | ||
28 | # along with this program; if not, you can access it online at | ||
29 | # http://www.gnu.org/licenses/gpl-2.0.html. | ||
30 | # | ||
31 | # Copyright (C) IBM Corporation, 2013 | ||
32 | # | ||
33 | # Authors: Paul E. McKenney <paulmck@linux.vnet.ibm.com> | ||
34 | |||
35 | T=/tmp/configinit.sh.$$ | ||
36 | trap 'rm -rf $T' 0 | ||
37 | mkdir $T | ||
38 | |||
39 | # Capture config spec file. | ||
40 | |||
41 | c=$1 | ||
42 | buildloc=$2 | ||
43 | builddir= | ||
44 | if test -n $buildloc | ||
45 | then | ||
46 | if echo $buildloc | grep -q '^O=' | ||
47 | then | ||
48 | builddir=`echo $buildloc | sed -e 's/^O=//'` | ||
49 | if test ! -d $builddir | ||
50 | then | ||
51 | mkdir $builddir | ||
52 | fi | ||
53 | else | ||
54 | echo Bad build directory: \"$builddir\" | ||
55 | exit 2 | ||
56 | fi | ||
57 | fi | ||
58 | |||
59 | sed -e 's/^\(CONFIG[0-9A-Z_]*\)=.*$/grep -v "^# \1" |/' < $c > $T/u.sh | ||
60 | sed -e 's/^\(CONFIG[0-9A-Z_]*=\).*$/grep -v \1 |/' < $c >> $T/u.sh | ||
61 | grep '^grep' < $T/u.sh > $T/upd.sh | ||
62 | echo "cat - $c" >> $T/upd.sh | ||
63 | make mrproper | ||
64 | make $buildloc distclean > $builddir/Make.distclean 2>&1 | ||
65 | make $buildloc defconfig > $builddir/Make.defconfig.out 2>&1 | ||
66 | mv $builddir/.config $builddir/.config.sav | ||
67 | sh $T/upd.sh < $builddir/.config.sav > $builddir/.config | ||
68 | cp $builddir/.config $builddir/.config.new | ||
69 | yes '' | make $buildloc oldconfig > $builddir/Make.modconfig.out 2>&1 | ||
70 | |||
71 | # verify new config matches specification. | ||
72 | configcheck.sh $builddir/.config $c | ||
73 | |||
74 | exit 0 | ||
diff --git a/tools/testing/selftests/rcutorture/bin/cpus2use.sh b/tools/testing/selftests/rcutorture/bin/cpus2use.sh new file mode 100755 index 000000000000..abe14b7f36e9 --- /dev/null +++ b/tools/testing/selftests/rcutorture/bin/cpus2use.sh | |||
@@ -0,0 +1,41 @@ | |||
1 | #!/bin/bash | ||
2 | # | ||
3 | # Get an estimate of how CPU-hoggy to be. | ||
4 | # | ||
5 | # Usage: cpus2use.sh | ||
6 | # | ||
7 | # This program is free software; you can redistribute it and/or modify | ||
8 | # it under the terms of the GNU General Public License as published by | ||
9 | # the Free Software Foundation; either version 2 of the License, or | ||
10 | # (at your option) any later version. | ||
11 | # | ||
12 | # This program is distributed in the hope that it will be useful, | ||
13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
15 | # GNU General Public License for more details. | ||
16 | # | ||
17 | # You should have received a copy of the GNU General Public License | ||
18 | # along with this program; if not, you can access it online at | ||
19 | # http://www.gnu.org/licenses/gpl-2.0.html. | ||
20 | # | ||
21 | # Copyright (C) IBM Corporation, 2013 | ||
22 | # | ||
23 | # Authors: Paul E. McKenney <paulmck@linux.vnet.ibm.com> | ||
24 | |||
25 | ncpus=`grep '^processor' /proc/cpuinfo | wc -l` | ||
26 | idlecpus=`mpstat | tail -1 | \ | ||
27 | awk -v ncpus=$ncpus '{ print ncpus * ($7 + $12) / 100 }'` | ||
28 | awk -v ncpus=$ncpus -v idlecpus=$idlecpus < /dev/null ' | ||
29 | BEGIN { | ||
30 | cpus2use = idlecpus; | ||
31 | if (cpus2use < 1) | ||
32 | cpus2use = 1; | ||
33 | if (cpus2use < ncpus / 10) | ||
34 | cpus2use = ncpus / 10; | ||
35 | if (cpus2use == int(cpus2use)) | ||
36 | cpus2use = int(cpus2use) | ||
37 | else | ||
38 | cpus2use = int(cpus2use) + 1 | ||
39 | print cpus2use; | ||
40 | }' | ||
41 | |||
diff --git a/tools/testing/selftests/rcutorture/bin/functions.sh b/tools/testing/selftests/rcutorture/bin/functions.sh new file mode 100644 index 000000000000..587561d7c035 --- /dev/null +++ b/tools/testing/selftests/rcutorture/bin/functions.sh | |||
@@ -0,0 +1,198 @@ | |||
1 | #!/bin/bash | ||
2 | # | ||
3 | # Shell functions for the rest of the scripts. | ||
4 | # | ||
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. | ||
9 | # | ||
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. | ||
14 | # | ||
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. | ||
18 | # | ||
19 | # Copyright (C) IBM Corporation, 2013 | ||
20 | # | ||
21 | # Authors: Paul E. McKenney <paulmck@linux.vnet.ibm.com> | ||
22 | |||
23 | # bootparam_hotplug_cpu bootparam-string | ||
24 | # | ||
25 | # Returns 1 if the specified boot-parameter string tells rcutorture to | ||
26 | # test CPU-hotplug operations. | ||
27 | bootparam_hotplug_cpu () { | ||
28 | echo "$1" | grep -q "rcutorture\.onoff_" | ||
29 | } | ||
30 | |||
31 | # checkarg --argname argtype $# arg mustmatch cannotmatch | ||
32 | # | ||
33 | # Checks the specified argument "arg" against the mustmatch and cannotmatch | ||
34 | # patterns. | ||
35 | checkarg () { | ||
36 | if test $3 -le 1 | ||
37 | then | ||
38 | echo $1 needs argument $2 matching \"$5\" | ||
39 | usage | ||
40 | fi | ||
41 | if echo "$4" | grep -q -e "$5" | ||
42 | then | ||
43 | : | ||
44 | else | ||
45 | echo $1 $2 \"$4\" must match \"$5\" | ||
46 | usage | ||
47 | fi | ||
48 | if echo "$4" | grep -q -e "$6" | ||
49 | then | ||
50 | echo $1 $2 \"$4\" must not match \"$6\" | ||
51 | usage | ||
52 | fi | ||
53 | } | ||
54 | |||
55 | # configfrag_boot_params bootparam-string config-fragment-file | ||
56 | # | ||
57 | # Adds boot parameters from the .boot file, if any. | ||
58 | configfrag_boot_params () { | ||
59 | if test -r "$2.boot" | ||
60 | then | ||
61 | echo $1 `grep -v '^#' "$2.boot" | tr '\012' ' '` | ||
62 | else | ||
63 | echo $1 | ||
64 | fi | ||
65 | } | ||
66 | |||
67 | # configfrag_hotplug_cpu config-fragment-file | ||
68 | # | ||
69 | # Returns 1 if the config fragment specifies hotplug CPU. | ||
70 | configfrag_hotplug_cpu () { | ||
71 | if test ! -r "$1" | ||
72 | then | ||
73 | echo Unreadable config fragment "$1" 1>&2 | ||
74 | exit -1 | ||
75 | fi | ||
76 | grep -q '^CONFIG_HOTPLUG_CPU=y$' "$1" | ||
77 | } | ||
78 | |||
79 | # identify_qemu builddir | ||
80 | # | ||
81 | # Returns our best guess as to which qemu command is appropriate for | ||
82 | # the kernel at hand. Override with the RCU_QEMU_CMD environment variable. | ||
83 | identify_qemu () { | ||
84 | local u="`file "$1"`" | ||
85 | if test -n "$RCU_QEMU_CMD" | ||
86 | then | ||
87 | echo $RCU_QEMU_CMD | ||
88 | elif echo $u | grep -q x86-64 | ||
89 | then | ||
90 | echo qemu-system-x86_64 | ||
91 | elif echo $u | grep -q "Intel 80386" | ||
92 | then | ||
93 | echo qemu-system-i386 | ||
94 | elif uname -a | grep -q ppc64 | ||
95 | then | ||
96 | echo qemu-system-ppc64 | ||
97 | else | ||
98 | echo Cannot figure out what qemu command to use! 1>&2 | ||
99 | # Usually this will be one of /usr/bin/qemu-system-* | ||
100 | # Use RCU_QEMU_CMD environment variable or appropriate | ||
101 | # argument to top-level script. | ||
102 | exit 1 | ||
103 | fi | ||
104 | } | ||
105 | |||
106 | # identify_qemu_append qemu-cmd | ||
107 | # | ||
108 | # Output arguments for the qemu "-append" string based on CPU type | ||
109 | # and the RCU_QEMU_INTERACTIVE environment variable. | ||
110 | identify_qemu_append () { | ||
111 | case "$1" in | ||
112 | qemu-system-x86_64|qemu-system-i386) | ||
113 | echo noapic selinux=0 initcall_debug debug | ||
114 | ;; | ||
115 | esac | ||
116 | if test -n "$RCU_QEMU_INTERACTIVE" | ||
117 | then | ||
118 | echo root=/dev/sda | ||
119 | else | ||
120 | echo console=ttyS0 | ||
121 | fi | ||
122 | } | ||
123 | |||
124 | # identify_qemu_args qemu-cmd serial-file | ||
125 | # | ||
126 | # Output arguments for qemu arguments based on the RCU_QEMU_MAC | ||
127 | # and RCU_QEMU_INTERACTIVE environment variables. | ||
128 | identify_qemu_args () { | ||
129 | case "$1" in | ||
130 | qemu-system-x86_64|qemu-system-i386) | ||
131 | ;; | ||
132 | qemu-system-ppc64) | ||
133 | echo -enable-kvm -M pseries -cpu POWER7 -nodefaults | ||
134 | echo -device spapr-vscsi | ||
135 | if test -n "$RCU_QEMU_INTERACTIVE" -a -n "$RCU_QEMU_MAC" | ||
136 | then | ||
137 | echo -device spapr-vlan,netdev=net0,mac=$RCU_QEMU_MAC | ||
138 | echo -netdev bridge,br=br0,id=net0 | ||
139 | elif test -n "$RCU_QEMU_INTERACTIVE" | ||
140 | then | ||
141 | echo -net nic -net user | ||
142 | fi | ||
143 | ;; | ||
144 | esac | ||
145 | if test -n "$RCU_QEMU_INTERACTIVE" | ||
146 | then | ||
147 | echo -monitor stdio -serial pty -S | ||
148 | else | ||
149 | echo -serial file:$2 | ||
150 | fi | ||
151 | } | ||
152 | |||
153 | # identify_qemu_vcpus | ||
154 | # | ||
155 | # Returns the number of virtual CPUs available to the aggregate of the | ||
156 | # guest OSes. | ||
157 | identify_qemu_vcpus () { | ||
158 | lscpu | grep '^CPU(s):' | sed -e 's/CPU(s)://' | ||
159 | } | ||
160 | |||
161 | # print_bug | ||
162 | # | ||
163 | # Prints "BUG: " in red followed by remaining arguments | ||
164 | print_bug () { | ||
165 | printf '\033[031mBUG: \033[m' | ||
166 | echo $* | ||
167 | } | ||
168 | |||
169 | # print_warning | ||
170 | # | ||
171 | # Prints "WARNING: " in yellow followed by remaining arguments | ||
172 | print_warning () { | ||
173 | printf '\033[033mWARNING: \033[m' | ||
174 | echo $* | ||
175 | } | ||
176 | |||
177 | # specify_qemu_cpus qemu-cmd qemu-args #cpus | ||
178 | # | ||
179 | # Appends a string containing "-smp XXX" to qemu-args, unless the incoming | ||
180 | # qemu-args already contains "-smp". | ||
181 | specify_qemu_cpus () { | ||
182 | local nt; | ||
183 | |||
184 | if echo $2 | grep -q -e -smp | ||
185 | then | ||
186 | echo $2 | ||
187 | else | ||
188 | case "$1" in | ||
189 | qemu-system-x86_64|qemu-system-i386) | ||
190 | echo $2 -smp $3 | ||
191 | ;; | ||
192 | qemu-system-ppc64) | ||
193 | nt="`lscpu | grep '^NUMA node0' | sed -e 's/^[^,]*,\([0-9]*\),.*$/\1/'`" | ||
194 | echo $2 -smp cores=`expr \( $3 + $nt - 1 \) / $nt`,threads=$nt | ||
195 | ;; | ||
196 | esac | ||
197 | fi | ||
198 | } | ||
diff --git a/tools/testing/selftests/rcutorture/bin/kvm-build.sh b/tools/testing/selftests/rcutorture/bin/kvm-build.sh new file mode 100755 index 000000000000..197901ec10bf --- /dev/null +++ b/tools/testing/selftests/rcutorture/bin/kvm-build.sh | |||
@@ -0,0 +1,71 @@ | |||
1 | #!/bin/bash | ||
2 | # | ||
3 | # Build a kvm-ready Linux kernel from the tree in the current directory. | ||
4 | # | ||
5 | # Usage: sh kvm-build.sh config-template build-dir more-configs | ||
6 | # | ||
7 | # This program is free software; you can redistribute it and/or modify | ||
8 | # it under the terms of the GNU General Public License as published by | ||
9 | # the Free Software Foundation; either version 2 of the License, or | ||
10 | # (at your option) any later version. | ||
11 | # | ||
12 | # This program is distributed in the hope that it will be useful, | ||
13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
15 | # GNU General Public License for more details. | ||
16 | # | ||
17 | # You should have received a copy of the GNU General Public License | ||
18 | # along with this program; if not, you can access it online at | ||
19 | # http://www.gnu.org/licenses/gpl-2.0.html. | ||
20 | # | ||
21 | # Copyright (C) IBM Corporation, 2011 | ||
22 | # | ||
23 | # Authors: Paul E. McKenney <paulmck@linux.vnet.ibm.com> | ||
24 | |||
25 | config_template=${1} | ||
26 | if test -z "$config_template" -o ! -f "$config_template" -o ! -r "$config_template" | ||
27 | then | ||
28 | echo "kvm-build.sh :$config_template: Not a readable file" | ||
29 | exit 1 | ||
30 | fi | ||
31 | builddir=${2} | ||
32 | if test -z "$builddir" -o ! -d "$builddir" -o ! -w "$builddir" | ||
33 | then | ||
34 | echo "kvm-build.sh :$builddir: Not a writable directory, cannot build into it" | ||
35 | exit 1 | ||
36 | fi | ||
37 | moreconfigs=${3} | ||
38 | if test -z "$moreconfigs" -o ! -r "$moreconfigs" | ||
39 | then | ||
40 | echo "kvm-build.sh :$moreconfigs: Not a readable file" | ||
41 | exit 1 | ||
42 | fi | ||
43 | |||
44 | T=/tmp/test-linux.sh.$$ | ||
45 | trap 'rm -rf $T' 0 | ||
46 | mkdir $T | ||
47 | |||
48 | cat ${config_template} | grep -v CONFIG_RCU_TORTURE_TEST > $T/config | ||
49 | cat << ___EOF___ >> $T/config | ||
50 | CONFIG_INITRAMFS_SOURCE="$RCU_INITRD" | ||
51 | CONFIG_VIRTIO_PCI=y | ||
52 | CONFIG_VIRTIO_CONSOLE=y | ||
53 | ___EOF___ | ||
54 | cat $moreconfigs >> $T/config | ||
55 | |||
56 | configinit.sh $T/config O=$builddir | ||
57 | retval=$? | ||
58 | if test $retval -gt 1 | ||
59 | then | ||
60 | exit 2 | ||
61 | fi | ||
62 | ncpus=`cpus2use.sh` | ||
63 | make O=$builddir -j$ncpus $RCU_KMAKE_ARG > $builddir/Make.out 2>&1 | ||
64 | retval=$? | ||
65 | if test $retval -ne 0 || grep "rcu[^/]*": < $builddir/Make.out | egrep -q "Stop|Error|error:|warning:" || egrep -q "Stop|Error|error:" < $builddir/Make.out | ||
66 | then | ||
67 | echo Kernel build error | ||
68 | egrep "Stop|Error|error:|warning:" < $builddir/Make.out | ||
69 | echo Run aborted. | ||
70 | exit 3 | ||
71 | fi | ||
diff --git a/tools/testing/selftests/rcutorture/bin/kvm-recheck.sh b/tools/testing/selftests/rcutorture/bin/kvm-recheck.sh new file mode 100755 index 000000000000..baef09f3469b --- /dev/null +++ b/tools/testing/selftests/rcutorture/bin/kvm-recheck.sh | |||
@@ -0,0 +1,44 @@ | |||
1 | #!/bin/bash | ||
2 | # | ||
3 | # Given the results directories for previous KVM runs of rcutorture, | ||
4 | # check the build and console output for errors. Given a directory | ||
5 | # containing results directories, this recursively checks them all. | ||
6 | # | ||
7 | # Usage: sh kvm-recheck.sh resdir ... | ||
8 | # | ||
9 | # This program is free software; you can redistribute it and/or modify | ||
10 | # it under the terms of the GNU General Public License as published by | ||
11 | # the Free Software Foundation; either version 2 of the License, or | ||
12 | # (at your option) any later version. | ||
13 | # | ||
14 | # This program is distributed in the hope that it will be useful, | ||
15 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
16 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
17 | # GNU General Public License for more details. | ||
18 | # | ||
19 | # You should have received a copy of the GNU General Public License | ||
20 | # along with this program; if not, you can access it online at | ||
21 | # http://www.gnu.org/licenses/gpl-2.0.html. | ||
22 | # | ||
23 | # Copyright (C) IBM Corporation, 2011 | ||
24 | # | ||
25 | # Authors: Paul E. McKenney <paulmck@linux.vnet.ibm.com> | ||
26 | |||
27 | PATH=`pwd`/tools/testing/selftests/rcutorture/bin:$PATH; export PATH | ||
28 | for rd in "$@" | ||
29 | do | ||
30 | dirs=`find $rd -name Make.defconfig.out -print | sort | sed -e 's,/[^/]*$,,' | sort -u` | ||
31 | for i in $dirs | ||
32 | do | ||
33 | configfile=`echo $i | sed -e 's/^.*\///'` | ||
34 | echo $configfile | ||
35 | configcheck.sh $i/.config $i/ConfigFragment | ||
36 | parse-build.sh $i/Make.out $configfile | ||
37 | parse-rcutorture.sh $i/console.log $configfile | ||
38 | parse-console.sh $i/console.log $configfile | ||
39 | if test -r $i/Warnings | ||
40 | then | ||
41 | cat $i/Warnings | ||
42 | fi | ||
43 | done | ||
44 | done | ||
diff --git a/tools/testing/selftests/rcutorture/bin/kvm-test-1-rcu.sh b/tools/testing/selftests/rcutorture/bin/kvm-test-1-rcu.sh new file mode 100755 index 000000000000..151b23788935 --- /dev/null +++ b/tools/testing/selftests/rcutorture/bin/kvm-test-1-rcu.sh | |||
@@ -0,0 +1,192 @@ | |||
1 | #!/bin/bash | ||
2 | # | ||
3 | # Run a kvm-based test of the specified tree on the specified configs. | ||
4 | # Fully automated run and error checking, no graphics console. | ||
5 | # | ||
6 | # Execute this in the source tree. Do not run it as a background task | ||
7 | # because qemu does not seem to like that much. | ||
8 | # | ||
9 | # Usage: sh kvm-test-1-rcu.sh config builddir resdir minutes qemu-args bootargs | ||
10 | # | ||
11 | # qemu-args defaults to "" -- you will want "-nographic" if running headless. | ||
12 | # bootargs defaults to "root=/dev/sda noapic selinux=0 console=ttyS0" | ||
13 | # "initcall_debug debug rcutorture.stat_interval=15" | ||
14 | # "rcutorture.shutdown_secs=$((minutes * 60))" | ||
15 | # "rcutorture.rcutorture_runnable=1" | ||
16 | # | ||
17 | # Anything you specify for either qemu-args or bootargs is appended to | ||
18 | # the default values. The "-smp" value is deduced from the contents of | ||
19 | # the config fragment. | ||
20 | # | ||
21 | # More sophisticated argument parsing is clearly needed. | ||
22 | # | ||
23 | # This program is free software; you can redistribute it and/or modify | ||
24 | # it under the terms of the GNU General Public License as published by | ||
25 | # the Free Software Foundation; either version 2 of the License, or | ||
26 | # (at your option) any later version. | ||
27 | # | ||
28 | # This program is distributed in the hope that it will be useful, | ||
29 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
30 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
31 | # GNU General Public License for more details. | ||
32 | # | ||
33 | # You should have received a copy of the GNU General Public License | ||
34 | # along with this program; if not, you can access it online at | ||
35 | # http://www.gnu.org/licenses/gpl-2.0.html. | ||
36 | # | ||
37 | # Copyright (C) IBM Corporation, 2011 | ||
38 | # | ||
39 | # Authors: Paul E. McKenney <paulmck@linux.vnet.ibm.com> | ||
40 | |||
41 | grace=120 | ||
42 | |||
43 | T=/tmp/kvm-test-1-rcu.sh.$$ | ||
44 | trap 'rm -rf $T' 0 | ||
45 | |||
46 | . $KVM/bin/functions.sh | ||
47 | . $KVPATH/ver_functions.sh | ||
48 | |||
49 | config_template=${1} | ||
50 | title=`echo $config_template | sed -e 's/^.*\///'` | ||
51 | builddir=${2} | ||
52 | if test -z "$builddir" -o ! -d "$builddir" -o ! -w "$builddir" | ||
53 | then | ||
54 | echo "kvm-test-1-rcu.sh :$builddir: Not a writable directory, cannot build into it" | ||
55 | exit 1 | ||
56 | fi | ||
57 | resdir=${3} | ||
58 | if test -z "$resdir" -o ! -d "$resdir" -o ! -w "$resdir" | ||
59 | then | ||
60 | echo "kvm-test-1-rcu.sh :$resdir: Not a writable directory, cannot build into it" | ||
61 | exit 1 | ||
62 | fi | ||
63 | cp $config_template $resdir/ConfigFragment | ||
64 | echo ' ---' `date`: Starting build | ||
65 | echo ' ---' Kconfig fragment at: $config_template >> $resdir/log | ||
66 | cat << '___EOF___' >> $T | ||
67 | CONFIG_RCU_TORTURE_TEST=y | ||
68 | ___EOF___ | ||
69 | # Optimizations below this point | ||
70 | # CONFIG_USB=n | ||
71 | # CONFIG_SECURITY=n | ||
72 | # CONFIG_NFS_FS=n | ||
73 | # CONFIG_SOUND=n | ||
74 | # CONFIG_INPUT_JOYSTICK=n | ||
75 | # CONFIG_INPUT_TABLET=n | ||
76 | # CONFIG_INPUT_TOUCHSCREEN=n | ||
77 | # CONFIG_INPUT_MISC=n | ||
78 | # CONFIG_INPUT_MOUSE=n | ||
79 | # # CONFIG_NET=n # disables console access, so accept the slower build. | ||
80 | # CONFIG_SCSI=n | ||
81 | # CONFIG_ATA=n | ||
82 | # CONFIG_FAT_FS=n | ||
83 | # CONFIG_MSDOS_FS=n | ||
84 | # CONFIG_VFAT_FS=n | ||
85 | # CONFIG_ISO9660_FS=n | ||
86 | # CONFIG_QUOTA=n | ||
87 | # CONFIG_HID=n | ||
88 | # CONFIG_CRYPTO=n | ||
89 | # CONFIG_PCCARD=n | ||
90 | # CONFIG_PCMCIA=n | ||
91 | # CONFIG_CARDBUS=n | ||
92 | # CONFIG_YENTA=n | ||
93 | if kvm-build.sh $config_template $builddir $T | ||
94 | then | ||
95 | cp $builddir/Make*.out $resdir | ||
96 | cp $builddir/.config $resdir | ||
97 | cp $builddir/arch/x86/boot/bzImage $resdir | ||
98 | parse-build.sh $resdir/Make.out $title | ||
99 | else | ||
100 | cp $builddir/Make*.out $resdir | ||
101 | echo Build failed, not running KVM, see $resdir. | ||
102 | exit 1 | ||
103 | fi | ||
104 | minutes=$4 | ||
105 | seconds=$(($minutes * 60)) | ||
106 | qemu_args=$5 | ||
107 | boot_args=$6 | ||
108 | |||
109 | cd $KVM | ||
110 | kstarttime=`awk 'BEGIN { print systime() }' < /dev/null` | ||
111 | echo ' ---' `date`: Starting kernel | ||
112 | |||
113 | # Determine the appropriate flavor of qemu command. | ||
114 | QEMU="`identify_qemu $builddir/vmlinux.o`" | ||
115 | |||
116 | # Generate -smp qemu argument. | ||
117 | cpu_count=`configNR_CPUS.sh $config_template` | ||
118 | vcpus=`identify_qemu_vcpus` | ||
119 | if test $cpu_count -gt $vcpus | ||
120 | then | ||
121 | echo CPU count limited from $cpu_count to $vcpus | ||
122 | touch $resdir/Warnings | ||
123 | echo CPU count limited from $cpu_count to $vcpus >> $resdir/Warnings | ||
124 | cpu_count=$vcpus | ||
125 | fi | ||
126 | qemu_args="`specify_qemu_cpus "$QEMU" "$qemu_args" "$cpu_count"`" | ||
127 | |||
128 | # Generate architecture-specific and interaction-specific qemu arguments | ||
129 | qemu_args="$qemu_args `identify_qemu_args "$QEMU" "$builddir/console.log"`" | ||
130 | |||
131 | # Generate qemu -append arguments | ||
132 | qemu_append="`identify_qemu_append "$QEMU"`" | ||
133 | |||
134 | # Pull in Kconfig-fragment boot parameters | ||
135 | boot_args="`configfrag_boot_params "$boot_args" "$config_template"`" | ||
136 | # Generate CPU-hotplug boot parameters | ||
137 | boot_args="`rcutorture_param_onoff "$boot_args" $builddir/.config`" | ||
138 | # Generate rcu_barrier() boot parameter | ||
139 | boot_args="`rcutorture_param_n_barrier_cbs "$boot_args"`" | ||
140 | # Pull in standard rcutorture boot arguments | ||
141 | boot_args="$boot_args rcutorture.stat_interval=15 rcutorture.shutdown_secs=$seconds rcutorture.rcutorture_runnable=1" | ||
142 | |||
143 | echo $QEMU $qemu_args -m 512 -kernel $builddir/arch/x86/boot/bzImage -append \"$qemu_append $boot_args\" > $resdir/qemu-cmd | ||
144 | if test -n "$RCU_BUILDONLY" | ||
145 | then | ||
146 | echo Build-only run specified, boot/test omitted. | ||
147 | exit 0 | ||
148 | fi | ||
149 | $QEMU $qemu_args -m 512 -kernel $builddir/arch/x86/boot/bzImage -append "$qemu_append $boot_args" & | ||
150 | qemu_pid=$! | ||
151 | commandcompleted=0 | ||
152 | echo Monitoring qemu job at pid $qemu_pid | ||
153 | for ((i=0;i<$seconds;i++)) | ||
154 | do | ||
155 | if kill -0 $qemu_pid > /dev/null 2>&1 | ||
156 | then | ||
157 | sleep 1 | ||
158 | else | ||
159 | commandcompleted=1 | ||
160 | kruntime=`awk 'BEGIN { print systime() - '"$kstarttime"' }' < /dev/null` | ||
161 | if test $kruntime -lt $seconds | ||
162 | then | ||
163 | echo Completed in $kruntime vs. $seconds >> $resdir/Warnings 2>&1 | ||
164 | else | ||
165 | echo ' ---' `date`: Kernel done | ||
166 | fi | ||
167 | break | ||
168 | fi | ||
169 | done | ||
170 | if test $commandcompleted -eq 0 | ||
171 | then | ||
172 | echo Grace period for qemu job at pid $qemu_pid | ||
173 | for ((i=0;i<=$grace;i++)) | ||
174 | do | ||
175 | if kill -0 $qemu_pid > /dev/null 2>&1 | ||
176 | then | ||
177 | sleep 1 | ||
178 | else | ||
179 | break | ||
180 | fi | ||
181 | if test $i -eq $grace | ||
182 | then | ||
183 | kruntime=`awk 'BEGIN { print systime() - '"$kstarttime"' }'` | ||
184 | echo "!!! Hang at $kruntime vs. $seconds seconds" >> $resdir/Warnings 2>&1 | ||
185 | kill -KILL $qemu_pid | ||
186 | fi | ||
187 | done | ||
188 | fi | ||
189 | |||
190 | cp $builddir/console.log $resdir | ||
191 | parse-rcutorture.sh $resdir/console.log $title | ||
192 | parse-console.sh $resdir/console.log $title | ||
diff --git a/tools/testing/selftests/rcutorture/bin/kvm.sh b/tools/testing/selftests/rcutorture/bin/kvm.sh new file mode 100644 index 000000000000..1b7923bf6a70 --- /dev/null +++ b/tools/testing/selftests/rcutorture/bin/kvm.sh | |||
@@ -0,0 +1,210 @@ | |||
1 | #!/bin/bash | ||
2 | # | ||
3 | # Run a series of 14 tests under KVM. These are not particularly | ||
4 | # well-selected or well-tuned, but are the current set. Run from the | ||
5 | # top level of the source tree. | ||
6 | # | ||
7 | # Edit the definitions below to set the locations of the various directories, | ||
8 | # as well as the test duration. | ||
9 | # | ||
10 | # Usage: sh kvm.sh [ options ] | ||
11 | # | ||
12 | # This program is free software; you can redistribute it and/or modify | ||
13 | # it under the terms of the GNU General Public License as published by | ||
14 | # the Free Software Foundation; either version 2 of the License, or | ||
15 | # (at your option) any later version. | ||
16 | # | ||
17 | # This program is distributed in the hope that it will be useful, | ||
18 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
19 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
20 | # GNU General Public License for more details. | ||
21 | # | ||
22 | # You should have received a copy of the GNU General Public License | ||
23 | # along with this program; if not, you can access it online at | ||
24 | # http://www.gnu.org/licenses/gpl-2.0.html. | ||
25 | # | ||
26 | # Copyright (C) IBM Corporation, 2011 | ||
27 | # | ||
28 | # Authors: Paul E. McKenney <paulmck@linux.vnet.ibm.com> | ||
29 | |||
30 | scriptname=$0 | ||
31 | args="$*" | ||
32 | |||
33 | dur=30 | ||
34 | KVM="`pwd`/tools/testing/selftests/rcutorture"; export KVM | ||
35 | PATH=${KVM}/bin:$PATH; export PATH | ||
36 | builddir="${KVM}/b1" | ||
37 | RCU_INITRD="$KVM/initrd"; export RCU_INITRD | ||
38 | RCU_KMAKE_ARG=""; export RCU_KMAKE_ARG | ||
39 | resdir="" | ||
40 | configs="" | ||
41 | ds=`date +%Y.%m.%d-%H:%M:%S` | ||
42 | kversion="" | ||
43 | |||
44 | . functions.sh | ||
45 | |||
46 | usage () { | ||
47 | echo "Usage: $scriptname optional arguments:" | ||
48 | echo " --bootargs kernel-boot-arguments" | ||
49 | echo " --builddir absolute-pathname" | ||
50 | echo " --buildonly" | ||
51 | echo " --configs \"config-file list\"" | ||
52 | echo " --datestamp string" | ||
53 | echo " --duration minutes" | ||
54 | echo " --interactive" | ||
55 | echo " --kmake-arg kernel-make-arguments" | ||
56 | echo " --kversion vN.NN" | ||
57 | echo " --mac nn:nn:nn:nn:nn:nn" | ||
58 | echo " --no-initrd" | ||
59 | echo " --qemu-args qemu-system-..." | ||
60 | echo " --qemu-cmd qemu-system-..." | ||
61 | echo " --results absolute-pathname" | ||
62 | echo " --relbuilddir relative-pathname" | ||
63 | exit 1 | ||
64 | } | ||
65 | |||
66 | while test $# -gt 0 | ||
67 | do | ||
68 | case "$1" in | ||
69 | --bootargs) | ||
70 | checkarg --bootargs "(list of kernel boot arguments)" "$#" "$2" '.*' '^--' | ||
71 | RCU_BOOTARGS="$2" | ||
72 | shift | ||
73 | ;; | ||
74 | --builddir) | ||
75 | checkarg --builddir "(absolute pathname)" "$#" "$2" '^/' '^error' | ||
76 | builddir=$2 | ||
77 | gotbuilddir=1 | ||
78 | shift | ||
79 | ;; | ||
80 | --buildonly) | ||
81 | RCU_BUILDONLY=1; export RCU_BUILDONLY | ||
82 | ;; | ||
83 | --configs) | ||
84 | checkarg --configs "(list of config files)" "$#" "$2" '^[^/]*$' '^--' | ||
85 | configs="$2" | ||
86 | shift | ||
87 | ;; | ||
88 | --datestamp) | ||
89 | checkarg --datestamp "(relative pathname)" "$#" "$2" '^[^/]*$' '^--' | ||
90 | ds=$2 | ||
91 | shift | ||
92 | ;; | ||
93 | --duration) | ||
94 | checkarg --duration "(minutes)" $# "$2" '^[0-9]*$' '^error' | ||
95 | dur=$2 | ||
96 | shift | ||
97 | ;; | ||
98 | --interactive) | ||
99 | RCU_QEMU_INTERACTIVE=1; export RCU_QEMU_INTERACTIVE | ||
100 | ;; | ||
101 | --kmake-arg) | ||
102 | checkarg --kmake-arg "(kernel make arguments)" $# "$2" '.*' '^error$' | ||
103 | RCU_KMAKE_ARG="$2"; export RCU_KMAKE_ARG | ||
104 | shift | ||
105 | ;; | ||
106 | --kversion) | ||
107 | checkarg --kversion "(kernel version)" $# "$2" '^v[0-9.]*$' '^error' | ||
108 | kversion=$2 | ||
109 | shift | ||
110 | ;; | ||
111 | --mac) | ||
112 | checkarg --mac "(MAC address)" $# "$2" '^\([0-9a-fA-F]\{2\}:\)\{5\}[0-9a-fA-F]\{2\}$' error | ||
113 | RCU_QEMU_MAC=$2; export RCU_QEMU_MAC | ||
114 | shift | ||
115 | ;; | ||
116 | --no-initrd) | ||
117 | RCU_INITRD=""; export RCU_INITRD | ||
118 | ;; | ||
119 | --qemu-args) | ||
120 | checkarg --qemu-args "-qemu args" $# "$2" '^-' '^error' | ||
121 | RCU_QEMU_ARG="$2" | ||
122 | shift | ||
123 | ;; | ||
124 | --qemu-cmd) | ||
125 | checkarg --qemu-cmd "(qemu-system-...)" $# "$2" 'qemu-system-' '^--' | ||
126 | RCU_QEMU_CMD="$2"; export RCU_QEMU_CMD | ||
127 | shift | ||
128 | ;; | ||
129 | --relbuilddir) | ||
130 | checkarg --relbuilddir "(relative pathname)" "$#" "$2" '^[^/]*$' '^--' | ||
131 | relbuilddir=$2 | ||
132 | gotrelbuilddir=1 | ||
133 | builddir=${KVM}/${relbuilddir} | ||
134 | shift | ||
135 | ;; | ||
136 | --results) | ||
137 | checkarg --results "(absolute pathname)" "$#" "$2" '^/' '^error' | ||
138 | resdir=$2 | ||
139 | shift | ||
140 | ;; | ||
141 | *) | ||
142 | echo Unknown argument $1 | ||
143 | usage | ||
144 | ;; | ||
145 | esac | ||
146 | shift | ||
147 | done | ||
148 | |||
149 | CONFIGFRAG=${KVM}/configs; export CONFIGFRAG | ||
150 | KVPATH=${CONFIGFRAG}/$kversion; export KVPATH | ||
151 | |||
152 | if test -z "$configs" | ||
153 | then | ||
154 | configs="`cat $CONFIGFRAG/$kversion/CFLIST`" | ||
155 | fi | ||
156 | |||
157 | if test -z "$resdir" | ||
158 | then | ||
159 | resdir=$KVM/res | ||
160 | if ! test -e $resdir | ||
161 | then | ||
162 | mkdir $resdir || : | ||
163 | fi | ||
164 | else | ||
165 | if ! test -e $resdir | ||
166 | then | ||
167 | mkdir -p "$resdir" || : | ||
168 | fi | ||
169 | fi | ||
170 | mkdir $resdir/$ds | ||
171 | touch $resdir/$ds/log | ||
172 | echo $scriptname $args >> $resdir/$ds/log | ||
173 | |||
174 | pwd > $resdir/$ds/testid.txt | ||
175 | if test -d .git | ||
176 | then | ||
177 | git status >> $resdir/$ds/testid.txt | ||
178 | git rev-parse HEAD >> $resdir/$ds/testid.txt | ||
179 | fi | ||
180 | builddir=$KVM/b1 | ||
181 | if ! test -e $builddir | ||
182 | then | ||
183 | mkdir $builddir || : | ||
184 | fi | ||
185 | |||
186 | for CF in $configs | ||
187 | do | ||
188 | # Running TREE01 multiple times creates TREE01, TREE01.2, TREE01.3, ... | ||
189 | rd=$resdir/$ds/$CF | ||
190 | if test -d "${rd}" | ||
191 | then | ||
192 | n="`ls -d "${rd}"* | grep '\.[0-9]\+$' | | ||
193 | sed -e 's/^.*\.\([0-9]\+\)/\1/' | | ||
194 | sort -k1n | tail -1`" | ||
195 | if test -z "$n" | ||
196 | then | ||
197 | rd="${rd}.2" | ||
198 | else | ||
199 | n="`expr $n + 1`" | ||
200 | rd="${rd}.${n}" | ||
201 | fi | ||
202 | fi | ||
203 | mkdir "${rd}" | ||
204 | echo Results directory: $rd | ||
205 | kvm-test-1-rcu.sh $CONFIGFRAG/$kversion/$CF $builddir $rd $dur "-nographic $RCU_QEMU_ARG" "rcutorture.test_no_idle_hz=1 rcutorture.verbose=1 $RCU_BOOTARGS" | ||
206 | done | ||
207 | # Tracing: trace_event=rcu:rcu_grace_period,rcu:rcu_future_grace_period,rcu:rcu_grace_period_init,rcu:rcu_nocb_wake,rcu:rcu_preempt_task,rcu:rcu_unlock_preempted_task,rcu:rcu_quiescent_state_report,rcu:rcu_fqs,rcu:rcu_callback,rcu:rcu_kfree_callback,rcu:rcu_batch_start,rcu:rcu_invoke_callback,rcu:rcu_invoke_kfree_callback,rcu:rcu_batch_end,rcu:rcu_torture_read,rcu:rcu_barrier | ||
208 | |||
209 | echo " --- `date` Test summary:" | ||
210 | kvm-recheck.sh $resdir/$ds | ||
diff --git a/tools/testing/selftests/rcutorture/bin/parse-build.sh b/tools/testing/selftests/rcutorture/bin/parse-build.sh new file mode 100755 index 000000000000..543230951c38 --- /dev/null +++ b/tools/testing/selftests/rcutorture/bin/parse-build.sh | |||
@@ -0,0 +1,57 @@ | |||
1 | #!/bin/sh | ||
2 | # | ||
3 | # Check the build output from an rcutorture run for goodness. | ||
4 | # The "file" is a pathname on the local system, and "title" is | ||
5 | # a text string for error-message purposes. | ||
6 | # | ||
7 | # The file must contain kernel build output. | ||
8 | # | ||
9 | # Usage: | ||
10 | # sh parse-build.sh file title | ||
11 | # | ||
12 | # This program is free software; you can redistribute it and/or modify | ||
13 | # it under the terms of the GNU General Public License as published by | ||
14 | # the Free Software Foundation; either version 2 of the License, or | ||
15 | # (at your option) any later version. | ||
16 | # | ||
17 | # This program is distributed in the hope that it will be useful, | ||
18 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
19 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
20 | # GNU General Public License for more details. | ||
21 | # | ||
22 | # You should have received a copy of the GNU General Public License | ||
23 | # along with this program; if not, you can access it online at | ||
24 | # http://www.gnu.org/licenses/gpl-2.0.html. | ||
25 | # | ||
26 | # Copyright (C) IBM Corporation, 2011 | ||
27 | # | ||
28 | # Authors: Paul E. McKenney <paulmck@linux.vnet.ibm.com> | ||
29 | |||
30 | T=$1 | ||
31 | title=$2 | ||
32 | |||
33 | . functions.sh | ||
34 | |||
35 | if grep -q CC < $T | ||
36 | then | ||
37 | : | ||
38 | else | ||
39 | print_bug $title no build | ||
40 | exit 1 | ||
41 | fi | ||
42 | |||
43 | if grep -q "error:" < $T | ||
44 | then | ||
45 | print_bug $title build errors: | ||
46 | grep "error:" < $T | ||
47 | exit 2 | ||
48 | fi | ||
49 | exit 0 | ||
50 | |||
51 | if egrep -q "rcu[^/]*\.c.*warning:|rcu.*\.h.*warning:" < $T | ||
52 | then | ||
53 | print_warning $title build errors: | ||
54 | egrep "rcu[^/]*\.c.*warning:|rcu.*\.h.*warning:" < $T | ||
55 | exit 2 | ||
56 | fi | ||
57 | exit 0 | ||
diff --git a/tools/testing/selftests/rcutorture/bin/parse-console.sh b/tools/testing/selftests/rcutorture/bin/parse-console.sh new file mode 100755 index 000000000000..4185d4cab32e --- /dev/null +++ b/tools/testing/selftests/rcutorture/bin/parse-console.sh | |||
@@ -0,0 +1,41 @@ | |||
1 | #!/bin/sh | ||
2 | # | ||
3 | # Check the console output from an rcutorture run for oopses. | ||
4 | # The "file" is a pathname on the local system, and "title" is | ||
5 | # a text string for error-message purposes. | ||
6 | # | ||
7 | # Usage: | ||
8 | # sh parse-console.sh file title | ||
9 | # | ||
10 | # This program is free software; you can redistribute it and/or modify | ||
11 | # it under the terms of the GNU General Public License as published by | ||
12 | # the Free Software Foundation; either version 2 of the License, or | ||
13 | # (at your option) any later version. | ||
14 | # | ||
15 | # This program is distributed in the hope that it will be useful, | ||
16 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
17 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
18 | # GNU General Public License for more details. | ||
19 | # | ||
20 | # You should have received a copy of the GNU General Public License | ||
21 | # along with this program; if not, you can access it online at | ||
22 | # http://www.gnu.org/licenses/gpl-2.0.html. | ||
23 | # | ||
24 | # Copyright (C) IBM Corporation, 2011 | ||
25 | # | ||
26 | # Authors: Paul E. McKenney <paulmck@linux.vnet.ibm.com> | ||
27 | |||
28 | T=/tmp/abat-chk-badness.sh.$$ | ||
29 | trap 'rm -f $T' 0 | ||
30 | |||
31 | file="$1" | ||
32 | title="$2" | ||
33 | |||
34 | . functions.sh | ||
35 | |||
36 | egrep 'Badness|WARNING:|Warn|BUG|===========|Call Trace:|Oops:' < $file | grep -v 'ODEBUG: ' | grep -v 'Warning: unable to open an initial console' > $T | ||
37 | if test -s $T | ||
38 | then | ||
39 | print_warning Assertion failure in $file $title | ||
40 | cat $T | ||
41 | fi | ||
diff --git a/tools/testing/selftests/rcutorture/bin/parse-rcutorture.sh b/tools/testing/selftests/rcutorture/bin/parse-rcutorture.sh new file mode 100755 index 000000000000..dd0a275d9796 --- /dev/null +++ b/tools/testing/selftests/rcutorture/bin/parse-rcutorture.sh | |||
@@ -0,0 +1,106 @@ | |||
1 | #!/bin/sh | ||
2 | # | ||
3 | # Check the console output from an rcutorture run for goodness. | ||
4 | # The "file" is a pathname on the local system, and "title" is | ||
5 | # a text string for error-message purposes. | ||
6 | # | ||
7 | # The file must contain rcutorture output, but can be interspersed | ||
8 | # with other dmesg text. | ||
9 | # | ||
10 | # Usage: | ||
11 | # sh parse-rcutorture.sh file title | ||
12 | # | ||
13 | # This program is free software; you can redistribute it and/or modify | ||
14 | # it under the terms of the GNU General Public License as published by | ||
15 | # the Free Software Foundation; either version 2 of the License, or | ||
16 | # (at your option) any later version. | ||
17 | # | ||
18 | # This program is distributed in the hope that it will be useful, | ||
19 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
20 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
21 | # GNU General Public License for more details. | ||
22 | # | ||
23 | # You should have received a copy of the GNU General Public License | ||
24 | # along with this program; if not, you can access it online at | ||
25 | # http://www.gnu.org/licenses/gpl-2.0.html. | ||
26 | # | ||
27 | # Copyright (C) IBM Corporation, 2011 | ||
28 | # | ||
29 | # Authors: Paul E. McKenney <paulmck@linux.vnet.ibm.com> | ||
30 | |||
31 | T=/tmp/parse-rcutorture.sh.$$ | ||
32 | file="$1" | ||
33 | title="$2" | ||
34 | |||
35 | trap 'rm -f $T.seq' 0 | ||
36 | |||
37 | . functions.sh | ||
38 | |||
39 | # check for presence of rcutorture.txt file | ||
40 | |||
41 | if test -f "$file" -a -r "$file" | ||
42 | then | ||
43 | : | ||
44 | else | ||
45 | echo $title unreadable rcutorture.txt file: $file | ||
46 | exit 1 | ||
47 | fi | ||
48 | |||
49 | # check for abject failure | ||
50 | |||
51 | if grep -q FAILURE $file || grep -q -e '-torture.*!!!' $file | ||
52 | then | ||
53 | nerrs=`grep --binary-files=text '!!!' $file | tail -1 | awk '{for (i=NF-8;i<=NF;i++) sum+=$i; } END {print sum}'` | ||
54 | print_bug $title FAILURE, $nerrs instances | ||
55 | echo " " $url | ||
56 | exit | ||
57 | fi | ||
58 | |||
59 | grep --binary-files=text 'torture:.*ver:' $file | grep --binary-files=text -v '(null)' | sed -e 's/^(initramfs)[^]]*] //' -e 's/^\[[^]]*] //' | | ||
60 | awk ' | ||
61 | BEGIN { | ||
62 | ver = 0; | ||
63 | badseq = 0; | ||
64 | } | ||
65 | |||
66 | { | ||
67 | if (!badseq && ($5 + 0 != $5 || $5 <= ver)) { | ||
68 | badseqno1 = ver; | ||
69 | badseqno2 = $5; | ||
70 | badseqnr = NR; | ||
71 | badseq = 1; | ||
72 | } | ||
73 | ver = $5 | ||
74 | } | ||
75 | |||
76 | END { | ||
77 | if (badseq) { | ||
78 | if (badseqno1 == badseqno2 && badseqno2 == ver) | ||
79 | print "RCU GP HANG at " ver " rcutorture stat " badseqnr; | ||
80 | else | ||
81 | print "BAD SEQ " badseqno1 ":" badseqno2 " last:" ver " RCU version " badseqnr; | ||
82 | } | ||
83 | }' > $T.seq | ||
84 | |||
85 | if grep -q SUCCESS $file | ||
86 | then | ||
87 | if test -s $T.seq | ||
88 | then | ||
89 | print_warning $title $title `cat $T.seq` | ||
90 | echo " " $file | ||
91 | exit 2 | ||
92 | fi | ||
93 | else | ||
94 | if grep -q RCU_HOTPLUG $file | ||
95 | then | ||
96 | print_warning HOTPLUG FAILURES $title `cat $T.seq` | ||
97 | echo " " $file | ||
98 | exit 3 | ||
99 | fi | ||
100 | echo $title no success message, `grep --binary-files=text 'ver:' $file | wc -l` successful RCU version messages | ||
101 | if test -s $T.seq | ||
102 | then | ||
103 | print_warning $title `cat $T.seq` | ||
104 | fi | ||
105 | exit 2 | ||
106 | fi | ||
diff --git a/tools/testing/selftests/rcutorture/configs/CFLIST b/tools/testing/selftests/rcutorture/configs/CFLIST new file mode 100644 index 000000000000..cd3d29cb0a47 --- /dev/null +++ b/tools/testing/selftests/rcutorture/configs/CFLIST | |||
@@ -0,0 +1,13 @@ | |||
1 | TREE01 | ||
2 | TREE02 | ||
3 | TREE03 | ||
4 | TREE04 | ||
5 | TREE05 | ||
6 | TREE06 | ||
7 | TREE07 | ||
8 | TREE08 | ||
9 | TREE09 | ||
10 | SRCU-N | ||
11 | SRCU-P | ||
12 | TINY01 | ||
13 | TINY02 | ||
diff --git a/tools/testing/selftests/rcutorture/configs/SRCU-N b/tools/testing/selftests/rcutorture/configs/SRCU-N new file mode 100644 index 000000000000..10a0e27f4c75 --- /dev/null +++ b/tools/testing/selftests/rcutorture/configs/SRCU-N | |||
@@ -0,0 +1,8 @@ | |||
1 | CONFIG_RCU_TRACE=n | ||
2 | CONFIG_SMP=y | ||
3 | CONFIG_NR_CPUS=8 | ||
4 | CONFIG_HOTPLUG_CPU=y | ||
5 | CONFIG_PREEMPT_NONE=y | ||
6 | CONFIG_PREEMPT_VOLUNTARY=n | ||
7 | CONFIG_PREEMPT=n | ||
8 | CONFIG_PRINTK_TIME=y | ||
diff --git a/tools/testing/selftests/rcutorture/configs/SRCU-N.boot b/tools/testing/selftests/rcutorture/configs/SRCU-N.boot new file mode 100644 index 000000000000..238bfe3bd0cc --- /dev/null +++ b/tools/testing/selftests/rcutorture/configs/SRCU-N.boot | |||
@@ -0,0 +1 @@ | |||
rcutorture.torture_type=srcu | |||
diff --git a/tools/testing/selftests/rcutorture/configs/SRCU-P b/tools/testing/selftests/rcutorture/configs/SRCU-P new file mode 100644 index 000000000000..6650e00c6d91 --- /dev/null +++ b/tools/testing/selftests/rcutorture/configs/SRCU-P | |||
@@ -0,0 +1,8 @@ | |||
1 | CONFIG_RCU_TRACE=n | ||
2 | CONFIG_SMP=y | ||
3 | CONFIG_NR_CPUS=8 | ||
4 | CONFIG_HOTPLUG_CPU=y | ||
5 | CONFIG_PREEMPT_NONE=n | ||
6 | CONFIG_PREEMPT_VOLUNTARY=n | ||
7 | CONFIG_PREEMPT=y | ||
8 | CONFIG_PRINTK_TIME=y | ||
diff --git a/tools/testing/selftests/rcutorture/configs/SRCU-P.boot b/tools/testing/selftests/rcutorture/configs/SRCU-P.boot new file mode 100644 index 000000000000..238bfe3bd0cc --- /dev/null +++ b/tools/testing/selftests/rcutorture/configs/SRCU-P.boot | |||
@@ -0,0 +1 @@ | |||
rcutorture.torture_type=srcu | |||
diff --git a/tools/testing/selftests/rcutorture/configs/TINY01 b/tools/testing/selftests/rcutorture/configs/TINY01 new file mode 100644 index 000000000000..0c2823f21712 --- /dev/null +++ b/tools/testing/selftests/rcutorture/configs/TINY01 | |||
@@ -0,0 +1,13 @@ | |||
1 | CONFIG_SMP=n | ||
2 | CONFIG_PREEMPT_NONE=y | ||
3 | CONFIG_PREEMPT_VOLUNTARY=n | ||
4 | CONFIG_PREEMPT=n | ||
5 | #CHECK#CONFIG_TINY_RCU=y | ||
6 | CONFIG_HZ_PERIODIC=n | ||
7 | CONFIG_NO_HZ_IDLE=y | ||
8 | CONFIG_NO_HZ_FULL=n | ||
9 | CONFIG_RCU_TRACE=n | ||
10 | CONFIG_DEBUG_LOCK_ALLOC=n | ||
11 | CONFIG_DEBUG_OBJECTS_RCU_HEAD=n | ||
12 | CONFIG_PREEMPT_COUNT=n | ||
13 | CONFIG_PRINTK_TIME=y | ||
diff --git a/tools/testing/selftests/rcutorture/configs/TINY02 b/tools/testing/selftests/rcutorture/configs/TINY02 new file mode 100644 index 000000000000..e5072d7528b6 --- /dev/null +++ b/tools/testing/selftests/rcutorture/configs/TINY02 | |||
@@ -0,0 +1,13 @@ | |||
1 | CONFIG_SMP=n | ||
2 | CONFIG_PREEMPT_NONE=y | ||
3 | CONFIG_PREEMPT_VOLUNTARY=n | ||
4 | CONFIG_PREEMPT=n | ||
5 | #CHECK#CONFIG_TINY_RCU=y | ||
6 | CONFIG_HZ_PERIODIC=y | ||
7 | CONFIG_NO_HZ_IDLE=n | ||
8 | CONFIG_NO_HZ_FULL=n | ||
9 | CONFIG_RCU_TRACE=y | ||
10 | CONFIG_DEBUG_LOCK_ALLOC=y | ||
11 | CONFIG_DEBUG_OBJECTS_RCU_HEAD=n | ||
12 | CONFIG_PREEMPT_COUNT=y | ||
13 | CONFIG_PRINTK_TIME=y | ||
diff --git a/tools/testing/selftests/rcutorture/configs/TREE01 b/tools/testing/selftests/rcutorture/configs/TREE01 new file mode 100644 index 000000000000..141119a00044 --- /dev/null +++ b/tools/testing/selftests/rcutorture/configs/TREE01 | |||
@@ -0,0 +1,23 @@ | |||
1 | CONFIG_SMP=y | ||
2 | CONFIG_NR_CPUS=8 | ||
3 | CONFIG_PREEMPT_NONE=n | ||
4 | CONFIG_PREEMPT_VOLUNTARY=n | ||
5 | CONFIG_PREEMPT=y | ||
6 | #CHECK#CONFIG_TREE_PREEMPT_RCU=y | ||
7 | CONFIG_HZ_PERIODIC=n | ||
8 | CONFIG_NO_HZ_IDLE=y | ||
9 | CONFIG_NO_HZ_FULL=n | ||
10 | CONFIG_RCU_FAST_NO_HZ=y | ||
11 | CONFIG_RCU_TRACE=y | ||
12 | CONFIG_HOTPLUG_CPU=y | ||
13 | CONFIG_RCU_FANOUT=8 | ||
14 | CONFIG_RCU_FANOUT_EXACT=n | ||
15 | CONFIG_RCU_NOCB_CPU=y | ||
16 | CONFIG_RCU_NOCB_CPU_ZERO=y | ||
17 | CONFIG_DEBUG_LOCK_ALLOC=n | ||
18 | CONFIG_PROVE_RCU_DELAY=n | ||
19 | CONFIG_RCU_CPU_STALL_INFO=n | ||
20 | CONFIG_RCU_CPU_STALL_VERBOSE=n | ||
21 | CONFIG_RCU_BOOST=n | ||
22 | CONFIG_DEBUG_OBJECTS_RCU_HEAD=n | ||
23 | CONFIG_PRINTK_TIME=y | ||
diff --git a/tools/testing/selftests/rcutorture/configs/TREE01.boot b/tools/testing/selftests/rcutorture/configs/TREE01.boot new file mode 100644 index 000000000000..0fc8a3428938 --- /dev/null +++ b/tools/testing/selftests/rcutorture/configs/TREE01.boot | |||
@@ -0,0 +1 @@ | |||
rcutorture.torture_type=rcu_bh | |||
diff --git a/tools/testing/selftests/rcutorture/configs/TREE02 b/tools/testing/selftests/rcutorture/configs/TREE02 new file mode 100644 index 000000000000..2d4d09608528 --- /dev/null +++ b/tools/testing/selftests/rcutorture/configs/TREE02 | |||
@@ -0,0 +1,26 @@ | |||
1 | CONFIG_SMP=y | ||
2 | CONFIG_NR_CPUS=8 | ||
3 | CONFIG_PREEMPT_NONE=n | ||
4 | CONFIG_PREEMPT_VOLUNTARY=n | ||
5 | CONFIG_PREEMPT=y | ||
6 | #CHECK#CONFIG_TREE_PREEMPT_RCU=y | ||
7 | CONFIG_HZ_PERIODIC=n | ||
8 | CONFIG_NO_HZ_IDLE=y | ||
9 | CONFIG_NO_HZ_FULL=n | ||
10 | CONFIG_RCU_FAST_NO_HZ=n | ||
11 | CONFIG_RCU_TRACE=n | ||
12 | CONFIG_HOTPLUG_CPU=n | ||
13 | CONFIG_SUSPEND=n | ||
14 | CONFIG_HIBERNATION=n | ||
15 | CONFIG_RCU_FANOUT=3 | ||
16 | CONFIG_RCU_FANOUT_LEAF=3 | ||
17 | CONFIG_RCU_FANOUT_EXACT=n | ||
18 | CONFIG_RCU_NOCB_CPU=n | ||
19 | CONFIG_DEBUG_LOCK_ALLOC=y | ||
20 | CONFIG_PROVE_LOCKING=n | ||
21 | CONFIG_PROVE_RCU_DELAY=n | ||
22 | CONFIG_RCU_CPU_STALL_INFO=n | ||
23 | CONFIG_RCU_CPU_STALL_VERBOSE=y | ||
24 | CONFIG_RCU_BOOST=n | ||
25 | CONFIG_DEBUG_OBJECTS_RCU_HEAD=n | ||
26 | CONFIG_PRINTK_TIME=y | ||
diff --git a/tools/testing/selftests/rcutorture/configs/TREE03 b/tools/testing/selftests/rcutorture/configs/TREE03 new file mode 100644 index 000000000000..a47de5be8a04 --- /dev/null +++ b/tools/testing/selftests/rcutorture/configs/TREE03 | |||
@@ -0,0 +1,23 @@ | |||
1 | CONFIG_SMP=y | ||
2 | CONFIG_NR_CPUS=8 | ||
3 | CONFIG_PREEMPT_NONE=n | ||
4 | CONFIG_PREEMPT_VOLUNTARY=n | ||
5 | CONFIG_PREEMPT=y | ||
6 | #CHECK#CONFIG_TREE_PREEMPT_RCU=y | ||
7 | CONFIG_HZ_PERIODIC=y | ||
8 | CONFIG_NO_HZ_IDLE=n | ||
9 | CONFIG_NO_HZ_FULL=n | ||
10 | CONFIG_RCU_TRACE=y | ||
11 | CONFIG_HOTPLUG_CPU=y | ||
12 | CONFIG_RCU_FANOUT=4 | ||
13 | CONFIG_RCU_FANOUT_LEAF=4 | ||
14 | CONFIG_RCU_FANOUT_EXACT=n | ||
15 | CONFIG_RCU_NOCB_CPU=n | ||
16 | CONFIG_DEBUG_LOCK_ALLOC=n | ||
17 | CONFIG_PROVE_RCU_DELAY=n | ||
18 | CONFIG_RCU_CPU_STALL_INFO=n | ||
19 | CONFIG_RCU_CPU_STALL_VERBOSE=n | ||
20 | CONFIG_RCU_BOOST=y | ||
21 | CONFIG_RCU_BOOST_PRIO=2 | ||
22 | CONFIG_DEBUG_OBJECTS_RCU_HEAD=n | ||
23 | CONFIG_PRINTK_TIME=y | ||
diff --git a/tools/testing/selftests/rcutorture/configs/TREE04 b/tools/testing/selftests/rcutorture/configs/TREE04 new file mode 100644 index 000000000000..8d839b86a1d5 --- /dev/null +++ b/tools/testing/selftests/rcutorture/configs/TREE04 | |||
@@ -0,0 +1,25 @@ | |||
1 | CONFIG_SMP=y | ||
2 | CONFIG_NR_CPUS=8 | ||
3 | CONFIG_PREEMPT_NONE=y | ||
4 | CONFIG_PREEMPT_VOLUNTARY=n | ||
5 | CONFIG_PREEMPT=n | ||
6 | #CHECK#CONFIG_TREE_RCU=y | ||
7 | CONFIG_HZ_PERIODIC=n | ||
8 | CONFIG_NO_HZ_IDLE=n | ||
9 | CONFIG_NO_HZ_FULL=y | ||
10 | CONFIG_NO_HZ_FULL_ALL=y | ||
11 | CONFIG_RCU_FAST_NO_HZ=y | ||
12 | CONFIG_RCU_TRACE=y | ||
13 | CONFIG_HOTPLUG_CPU=n | ||
14 | CONFIG_SUSPEND=n | ||
15 | CONFIG_HIBERNATION=n | ||
16 | CONFIG_RCU_FANOUT=2 | ||
17 | CONFIG_RCU_FANOUT_LEAF=2 | ||
18 | CONFIG_RCU_FANOUT_EXACT=n | ||
19 | CONFIG_RCU_NOCB_CPU=n | ||
20 | CONFIG_DEBUG_LOCK_ALLOC=n | ||
21 | CONFIG_PROVE_RCU_DELAY=n | ||
22 | CONFIG_RCU_CPU_STALL_INFO=y | ||
23 | CONFIG_RCU_CPU_STALL_VERBOSE=y | ||
24 | CONFIG_DEBUG_OBJECTS_RCU_HEAD=n | ||
25 | CONFIG_PRINTK_TIME=y | ||
diff --git a/tools/testing/selftests/rcutorture/configs/TREE04.boot b/tools/testing/selftests/rcutorture/configs/TREE04.boot new file mode 100644 index 000000000000..0fc8a3428938 --- /dev/null +++ b/tools/testing/selftests/rcutorture/configs/TREE04.boot | |||
@@ -0,0 +1 @@ | |||
rcutorture.torture_type=rcu_bh | |||
diff --git a/tools/testing/selftests/rcutorture/configs/TREE05 b/tools/testing/selftests/rcutorture/configs/TREE05 new file mode 100644 index 000000000000..b5ba72ea25cb --- /dev/null +++ b/tools/testing/selftests/rcutorture/configs/TREE05 | |||
@@ -0,0 +1,25 @@ | |||
1 | CONFIG_SMP=y | ||
2 | CONFIG_NR_CPUS=8 | ||
3 | CONFIG_PREEMPT_NONE=y | ||
4 | CONFIG_PREEMPT_VOLUNTARY=n | ||
5 | CONFIG_PREEMPT=n | ||
6 | #CHECK#CONFIG_TREE_RCU=y | ||
7 | CONFIG_HZ_PERIODIC=n | ||
8 | CONFIG_NO_HZ_IDLE=y | ||
9 | CONFIG_NO_HZ_FULL=n | ||
10 | CONFIG_RCU_FAST_NO_HZ=n | ||
11 | CONFIG_RCU_TRACE=n | ||
12 | CONFIG_HOTPLUG_CPU=y | ||
13 | CONFIG_RCU_FANOUT=6 | ||
14 | CONFIG_RCU_FANOUT_LEAF=6 | ||
15 | CONFIG_RCU_FANOUT_EXACT=n | ||
16 | CONFIG_RCU_NOCB_CPU=y | ||
17 | CONFIG_RCU_NOCB_CPU_NONE=y | ||
18 | CONFIG_DEBUG_LOCK_ALLOC=y | ||
19 | CONFIG_PROVE_LOCKING=y | ||
20 | CONFIG_PROVE_RCU=y | ||
21 | CONFIG_PROVE_RCU_DELAY=y | ||
22 | CONFIG_RCU_CPU_STALL_INFO=n | ||
23 | CONFIG_RCU_CPU_STALL_VERBOSE=n | ||
24 | CONFIG_DEBUG_OBJECTS_RCU_HEAD=n | ||
25 | CONFIG_PRINTK_TIME=y | ||
diff --git a/tools/testing/selftests/rcutorture/configs/TREE05.boot b/tools/testing/selftests/rcutorture/configs/TREE05.boot new file mode 100644 index 000000000000..3b42b8b033cd --- /dev/null +++ b/tools/testing/selftests/rcutorture/configs/TREE05.boot | |||
@@ -0,0 +1 @@ | |||
rcutorture.torture_type=sched | |||
diff --git a/tools/testing/selftests/rcutorture/configs/TREE06 b/tools/testing/selftests/rcutorture/configs/TREE06 new file mode 100644 index 000000000000..7c95ab48d29f --- /dev/null +++ b/tools/testing/selftests/rcutorture/configs/TREE06 | |||
@@ -0,0 +1,26 @@ | |||
1 | CONFIG_SMP=y | ||
2 | CONFIG_NR_CPUS=8 | ||
3 | CONFIG_PREEMPT_NONE=y | ||
4 | CONFIG_PREEMPT_VOLUNTARY=n | ||
5 | CONFIG_PREEMPT=n | ||
6 | #CHECK#CONFIG_TREE_RCU=y | ||
7 | CONFIG_HZ_PERIODIC=n | ||
8 | CONFIG_NO_HZ_IDLE=y | ||
9 | CONFIG_NO_HZ_FULL=n | ||
10 | CONFIG_RCU_FAST_NO_HZ=n | ||
11 | CONFIG_RCU_TRACE=n | ||
12 | CONFIG_HOTPLUG_CPU=n | ||
13 | CONFIG_SUSPEND=n | ||
14 | CONFIG_HIBERNATION=n | ||
15 | CONFIG_RCU_FANOUT=6 | ||
16 | CONFIG_RCU_FANOUT_LEAF=6 | ||
17 | CONFIG_RCU_FANOUT_EXACT=y | ||
18 | CONFIG_RCU_NOCB_CPU=n | ||
19 | CONFIG_DEBUG_LOCK_ALLOC=y | ||
20 | CONFIG_PROVE_LOCKING=y | ||
21 | CONFIG_PROVE_RCU=y | ||
22 | CONFIG_PROVE_RCU_DELAY=n | ||
23 | CONFIG_RCU_CPU_STALL_INFO=n | ||
24 | CONFIG_RCU_CPU_STALL_VERBOSE=n | ||
25 | CONFIG_DEBUG_OBJECTS_RCU_HEAD=y | ||
26 | CONFIG_PRINTK_TIME=y | ||
diff --git a/tools/testing/selftests/rcutorture/configs/TREE07 b/tools/testing/selftests/rcutorture/configs/TREE07 new file mode 100644 index 000000000000..1467404bdec1 --- /dev/null +++ b/tools/testing/selftests/rcutorture/configs/TREE07 | |||
@@ -0,0 +1,24 @@ | |||
1 | CONFIG_SMP=y | ||
2 | CONFIG_NR_CPUS=16 | ||
3 | CONFIG_PREEMPT_NONE=y | ||
4 | CONFIG_PREEMPT_VOLUNTARY=n | ||
5 | CONFIG_PREEMPT=n | ||
6 | #CHECK#CONFIG_TREE_RCU=y | ||
7 | CONFIG_HZ_PERIODIC=n | ||
8 | CONFIG_NO_HZ_IDLE=n | ||
9 | CONFIG_NO_HZ_FULL=y | ||
10 | CONFIG_NO_HZ_FULL_ALL=y | ||
11 | CONFIG_NO_HZ_FULL_SYSIDLE=y | ||
12 | CONFIG_RCU_FAST_NO_HZ=n | ||
13 | CONFIG_RCU_TRACE=y | ||
14 | CONFIG_HOTPLUG_CPU=y | ||
15 | CONFIG_RCU_FANOUT=2 | ||
16 | CONFIG_RCU_FANOUT_LEAF=2 | ||
17 | CONFIG_RCU_FANOUT_EXACT=n | ||
18 | CONFIG_RCU_NOCB_CPU=n | ||
19 | CONFIG_DEBUG_LOCK_ALLOC=n | ||
20 | CONFIG_PROVE_RCU_DELAY=n | ||
21 | CONFIG_RCU_CPU_STALL_INFO=y | ||
22 | CONFIG_RCU_CPU_STALL_VERBOSE=n | ||
23 | CONFIG_DEBUG_OBJECTS_RCU_HEAD=n | ||
24 | CONFIG_PRINTK_TIME=y | ||
diff --git a/tools/testing/selftests/rcutorture/configs/TREE08 b/tools/testing/selftests/rcutorture/configs/TREE08 new file mode 100644 index 000000000000..7d097a61ac2a --- /dev/null +++ b/tools/testing/selftests/rcutorture/configs/TREE08 | |||
@@ -0,0 +1,26 @@ | |||
1 | CONFIG_SMP=y | ||
2 | CONFIG_NR_CPUS=16 | ||
3 | CONFIG_PREEMPT_NONE=n | ||
4 | CONFIG_PREEMPT_VOLUNTARY=n | ||
5 | CONFIG_PREEMPT=y | ||
6 | #CHECK#CONFIG_TREE_PREEMPT_RCU=y | ||
7 | CONFIG_HZ_PERIODIC=n | ||
8 | CONFIG_NO_HZ_IDLE=y | ||
9 | CONFIG_NO_HZ_FULL=n | ||
10 | CONFIG_RCU_FAST_NO_HZ=n | ||
11 | CONFIG_RCU_TRACE=n | ||
12 | CONFIG_HOTPLUG_CPU=n | ||
13 | CONFIG_SUSPEND=n | ||
14 | CONFIG_HIBERNATION=n | ||
15 | CONFIG_RCU_FANOUT=3 | ||
16 | CONFIG_RCU_FANOUT_EXACT=y | ||
17 | CONFIG_RCU_FANOUT_LEAF=2 | ||
18 | CONFIG_RCU_NOCB_CPU=y | ||
19 | CONFIG_RCU_NOCB_CPU_ALL=y | ||
20 | CONFIG_DEBUG_LOCK_ALLOC=n | ||
21 | CONFIG_PROVE_RCU_DELAY=n | ||
22 | CONFIG_RCU_CPU_STALL_INFO=n | ||
23 | CONFIG_RCU_CPU_STALL_VERBOSE=n | ||
24 | CONFIG_RCU_BOOST=n | ||
25 | CONFIG_DEBUG_OBJECTS_RCU_HEAD=n | ||
26 | CONFIG_PRINTK_TIME=y | ||
diff --git a/tools/testing/selftests/rcutorture/configs/TREE08-T b/tools/testing/selftests/rcutorture/configs/TREE08-T new file mode 100644 index 000000000000..442c4e450ab3 --- /dev/null +++ b/tools/testing/selftests/rcutorture/configs/TREE08-T | |||
@@ -0,0 +1,26 @@ | |||
1 | CONFIG_SMP=y | ||
2 | CONFIG_NR_CPUS=16 | ||
3 | CONFIG_PREEMPT_NONE=n | ||
4 | CONFIG_PREEMPT_VOLUNTARY=n | ||
5 | CONFIG_PREEMPT=y | ||
6 | #CHECK#CONFIG_TREE_PREEMPT_RCU=y | ||
7 | CONFIG_HZ_PERIODIC=n | ||
8 | CONFIG_NO_HZ_IDLE=y | ||
9 | CONFIG_NO_HZ_FULL=n | ||
10 | CONFIG_RCU_FAST_NO_HZ=n | ||
11 | CONFIG_RCU_TRACE=y | ||
12 | CONFIG_HOTPLUG_CPU=n | ||
13 | CONFIG_SUSPEND=n | ||
14 | CONFIG_HIBERNATION=n | ||
15 | CONFIG_RCU_FANOUT=3 | ||
16 | CONFIG_RCU_FANOUT_EXACT=y | ||
17 | CONFIG_RCU_FANOUT_LEAF=2 | ||
18 | CONFIG_RCU_NOCB_CPU=y | ||
19 | CONFIG_RCU_NOCB_CPU_ALL=y | ||
20 | CONFIG_DEBUG_LOCK_ALLOC=n | ||
21 | CONFIG_PROVE_RCU_DELAY=n | ||
22 | CONFIG_RCU_CPU_STALL_INFO=n | ||
23 | CONFIG_RCU_CPU_STALL_VERBOSE=n | ||
24 | CONFIG_RCU_BOOST=n | ||
25 | CONFIG_DEBUG_OBJECTS_RCU_HEAD=n | ||
26 | CONFIG_PRINTK_TIME=y | ||
diff --git a/tools/testing/selftests/rcutorture/configs/TREE09 b/tools/testing/selftests/rcutorture/configs/TREE09 new file mode 100644 index 000000000000..0d1ec0d3dfee --- /dev/null +++ b/tools/testing/selftests/rcutorture/configs/TREE09 | |||
@@ -0,0 +1,21 @@ | |||
1 | CONFIG_SMP=n | ||
2 | CONFIG_NR_CPUS=1 | ||
3 | CONFIG_PREEMPT_NONE=n | ||
4 | CONFIG_PREEMPT_VOLUNTARY=n | ||
5 | CONFIG_PREEMPT=y | ||
6 | #CHECK#CONFIG_TREE_PREEMPT_RCU=y | ||
7 | CONFIG_HZ_PERIODIC=n | ||
8 | CONFIG_NO_HZ_IDLE=y | ||
9 | CONFIG_NO_HZ_FULL=n | ||
10 | CONFIG_RCU_TRACE=n | ||
11 | CONFIG_HOTPLUG_CPU=n | ||
12 | CONFIG_SUSPEND=n | ||
13 | CONFIG_HIBERNATION=n | ||
14 | CONFIG_RCU_NOCB_CPU=n | ||
15 | CONFIG_DEBUG_LOCK_ALLOC=n | ||
16 | CONFIG_PROVE_RCU_DELAY=n | ||
17 | CONFIG_RCU_CPU_STALL_INFO=n | ||
18 | CONFIG_RCU_CPU_STALL_VERBOSE=n | ||
19 | CONFIG_RCU_BOOST=n | ||
20 | CONFIG_DEBUG_OBJECTS_RCU_HEAD=n | ||
21 | CONFIG_PRINTK_TIME=y | ||
diff --git a/tools/testing/selftests/rcutorture/configs/v0.0/CFLIST b/tools/testing/selftests/rcutorture/configs/v0.0/CFLIST new file mode 100644 index 000000000000..18223947bbcb --- /dev/null +++ b/tools/testing/selftests/rcutorture/configs/v0.0/CFLIST | |||
@@ -0,0 +1,14 @@ | |||
1 | P1-S-T-NH-SD-SMP-HP | ||
2 | P2-2-t-nh-sd-SMP-hp | ||
3 | P3-3-T-nh-SD-SMP-hp | ||
4 | P4-A-t-NH-sd-SMP-HP | ||
5 | P5-U-T-NH-sd-SMP-hp | ||
6 | N1-S-T-NH-SD-SMP-HP | ||
7 | N2-2-t-nh-sd-SMP-hp | ||
8 | N3-3-T-nh-SD-SMP-hp | ||
9 | N4-A-t-NH-sd-SMP-HP | ||
10 | N5-U-T-NH-sd-SMP-hp | ||
11 | PT1-nh | ||
12 | PT2-NH | ||
13 | NT1-nh | ||
14 | NT3-NH | ||
diff --git a/tools/testing/selftests/rcutorture/configs/v0.0/N1-S-T-NH-SD-SMP-HP b/tools/testing/selftests/rcutorture/configs/v0.0/N1-S-T-NH-SD-SMP-HP new file mode 100644 index 000000000000..d3ef873eb6e7 --- /dev/null +++ b/tools/testing/selftests/rcutorture/configs/v0.0/N1-S-T-NH-SD-SMP-HP | |||
@@ -0,0 +1,18 @@ | |||
1 | CONFIG_RCU_TRACE=y | ||
2 | CONFIG_NO_HZ=y | ||
3 | CONFIG_SMP=y | ||
4 | CONFIG_RCU_FANOUT=8 | ||
5 | CONFIG_NR_CPUS=8 | ||
6 | CONFIG_RCU_FANOUT_EXACT=n | ||
7 | CONFIG_HOTPLUG_CPU=y | ||
8 | CONFIG_PREEMPT_NONE=y | ||
9 | CONFIG_PREEMPT_VOLUNTARY=n | ||
10 | CONFIG_PREEMPT=n | ||
11 | #CHECK#CONFIG_TREE_RCU=y | ||
12 | CONFIG_RCU_TORTURE_TEST=m | ||
13 | CONFIG_MODULE_UNLOAD=y | ||
14 | CONFIG_SYSFS_DEPRECATED_V2=y | ||
15 | CONFIG_IKCONFIG=y | ||
16 | CONFIG_IKCONFIG_PROC=y | ||
17 | CONFIG_PRINTK_TIME=y | ||
18 | |||
diff --git a/tools/testing/selftests/rcutorture/configs/v0.0/N2-2-t-nh-sd-SMP-hp b/tools/testing/selftests/rcutorture/configs/v0.0/N2-2-t-nh-sd-SMP-hp new file mode 100644 index 000000000000..02e418572b1b --- /dev/null +++ b/tools/testing/selftests/rcutorture/configs/v0.0/N2-2-t-nh-sd-SMP-hp | |||
@@ -0,0 +1,20 @@ | |||
1 | CONFIG_RCU_TRACE=n | ||
2 | CONFIG_NO_HZ=n | ||
3 | CONFIG_SMP=y | ||
4 | CONFIG_RCU_FANOUT=4 | ||
5 | CONFIG_NR_CPUS=8 | ||
6 | CONFIG_RCU_FANOUT_EXACT=n | ||
7 | CONFIG_HOTPLUG_CPU=n | ||
8 | CONFIG_SUSPEND=n | ||
9 | CONFIG_HIBERNATION=n | ||
10 | CONFIG_PREEMPT_NONE=y | ||
11 | CONFIG_PREEMPT_VOLUNTARY=n | ||
12 | CONFIG_PREEMPT=n | ||
13 | #CHECK#CONFIG_TREE_RCU=y | ||
14 | CONFIG_RCU_TORTURE_TEST=m | ||
15 | CONFIG_MODULE_UNLOAD=y | ||
16 | CONFIG_SYSFS_DEPRECATED_V2=y | ||
17 | CONFIG_IKCONFIG=y | ||
18 | CONFIG_IKCONFIG_PROC=y | ||
19 | CONFIG_PRINTK_TIME=y | ||
20 | |||
diff --git a/tools/testing/selftests/rcutorture/configs/v0.0/N3-3-T-nh-SD-SMP-hp b/tools/testing/selftests/rcutorture/configs/v0.0/N3-3-T-nh-SD-SMP-hp new file mode 100644 index 000000000000..b3100f69c8cf --- /dev/null +++ b/tools/testing/selftests/rcutorture/configs/v0.0/N3-3-T-nh-SD-SMP-hp | |||
@@ -0,0 +1,22 @@ | |||
1 | CONFIG_RCU_TRACE=y | ||
2 | CONFIG_NO_HZ=n | ||
3 | CONFIG_SMP=y | ||
4 | CONFIG_RCU_FANOUT=2 | ||
5 | CONFIG_NR_CPUS=8 | ||
6 | CONFIG_RCU_FANOUT_EXACT=n | ||
7 | CONFIG_HOTPLUG_CPU=n | ||
8 | CONFIG_SUSPEND=n | ||
9 | CONFIG_HIBERNATION=n | ||
10 | CONFIG_PREEMPT_NONE=y | ||
11 | CONFIG_PREEMPT_VOLUNTARY=n | ||
12 | CONFIG_PREEMPT=n | ||
13 | #CHECK#CONFIG_TREE_RCU=y | ||
14 | CONFIG_RCU_TORTURE_TEST=m | ||
15 | CONFIG_MODULE_UNLOAD=y | ||
16 | CONFIG_PROVE_LOCKING=y | ||
17 | CONFIG_PROVE_RCU=y | ||
18 | CONFIG_SYSFS_DEPRECATED_V2=y | ||
19 | CONFIG_IKCONFIG=y | ||
20 | CONFIG_IKCONFIG_PROC=y | ||
21 | CONFIG_PRINTK_TIME=y | ||
22 | |||
diff --git a/tools/testing/selftests/rcutorture/configs/v0.0/N4-A-t-NH-sd-SMP-HP b/tools/testing/selftests/rcutorture/configs/v0.0/N4-A-t-NH-sd-SMP-HP new file mode 100644 index 000000000000..c56b44530725 --- /dev/null +++ b/tools/testing/selftests/rcutorture/configs/v0.0/N4-A-t-NH-sd-SMP-HP | |||
@@ -0,0 +1,18 @@ | |||
1 | CONFIG_RCU_TRACE=n | ||
2 | CONFIG_NO_HZ=y | ||
3 | CONFIG_SMP=y | ||
4 | CONFIG_RCU_FANOUT=6 | ||
5 | CONFIG_NR_CPUS=8 | ||
6 | CONFIG_RCU_FANOUT_EXACT=n | ||
7 | CONFIG_HOTPLUG_CPU=y | ||
8 | CONFIG_PREEMPT_NONE=y | ||
9 | CONFIG_PREEMPT_VOLUNTARY=n | ||
10 | CONFIG_PREEMPT=n | ||
11 | #CHECK#CONFIG_TREE_RCU=y | ||
12 | CONFIG_RCU_TORTURE_TEST=m | ||
13 | CONFIG_MODULE_UNLOAD=y | ||
14 | CONFIG_SYSFS_DEPRECATED_V2=y | ||
15 | CONFIG_IKCONFIG=y | ||
16 | CONFIG_IKCONFIG_PROC=y | ||
17 | CONFIG_PRINTK_TIME=y | ||
18 | |||
diff --git a/tools/testing/selftests/rcutorture/configs/v0.0/N5-U-T-NH-sd-SMP-hp b/tools/testing/selftests/rcutorture/configs/v0.0/N5-U-T-NH-sd-SMP-hp new file mode 100644 index 000000000000..90d924fea9e9 --- /dev/null +++ b/tools/testing/selftests/rcutorture/configs/v0.0/N5-U-T-NH-sd-SMP-hp | |||
@@ -0,0 +1,22 @@ | |||
1 | CONFIG_RCU_TRACE=y | ||
2 | CONFIG_DEBUG_KERNEL=y | ||
3 | CONFIG_RCU_CPU_STALL_INFO=y | ||
4 | CONFIG_NO_HZ=y | ||
5 | CONFIG_SMP=y | ||
6 | CONFIG_RCU_FANOUT=6 | ||
7 | CONFIG_NR_CPUS=8 | ||
8 | CONFIG_RCU_FANOUT_EXACT=y | ||
9 | CONFIG_HOTPLUG_CPU=n | ||
10 | CONFIG_SUSPEND=n | ||
11 | CONFIG_HIBERNATION=n | ||
12 | CONFIG_PREEMPT_NONE=y | ||
13 | CONFIG_PREEMPT_VOLUNTARY=n | ||
14 | CONFIG_PREEMPT=n | ||
15 | #CHECK#CONFIG_TREE_RCU=y | ||
16 | CONFIG_RCU_TORTURE_TEST=m | ||
17 | CONFIG_MODULE_UNLOAD=y | ||
18 | CONFIG_SYSFS_DEPRECATED_V2=y | ||
19 | CONFIG_IKCONFIG=y | ||
20 | CONFIG_IKCONFIG_PROC=y | ||
21 | CONFIG_PRINTK_TIME=y | ||
22 | |||
diff --git a/tools/testing/selftests/rcutorture/configs/v0.0/NT1-nh b/tools/testing/selftests/rcutorture/configs/v0.0/NT1-nh new file mode 100644 index 000000000000..023f312a931c --- /dev/null +++ b/tools/testing/selftests/rcutorture/configs/v0.0/NT1-nh | |||
@@ -0,0 +1,23 @@ | |||
1 | #CHECK#CONFIG_TINY_RCU=y | ||
2 | CONFIG_RCU_TRACE=y | ||
3 | CONFIG_RCU_TORTURE_TEST=m | ||
4 | CONFIG_MODULE_UNLOAD=y | ||
5 | CONFIG_SUSPEND=n | ||
6 | CONFIG_HIBERNATION=n | ||
7 | # | ||
8 | CONFIG_SMP=n | ||
9 | # | ||
10 | CONFIG_HOTPLUG_CPU=n | ||
11 | # | ||
12 | CONFIG_NO_HZ=n | ||
13 | # | ||
14 | CONFIG_PREEMPT_NONE=y | ||
15 | CONFIG_PREEMPT_VOLUNTARY=n | ||
16 | CONFIG_PREEMPT=n | ||
17 | CONFIG_PROVE_LOCKING=y | ||
18 | CONFIG_PROVE_RCU=y | ||
19 | CONFIG_SYSFS_DEPRECATED_V2=y | ||
20 | CONFIG_IKCONFIG=y | ||
21 | CONFIG_IKCONFIG_PROC=y | ||
22 | CONFIG_PRINTK_TIME=y | ||
23 | |||
diff --git a/tools/testing/selftests/rcutorture/configs/v0.0/NT3-NH b/tools/testing/selftests/rcutorture/configs/v0.0/NT3-NH new file mode 100644 index 000000000000..6fd0235dae73 --- /dev/null +++ b/tools/testing/selftests/rcutorture/configs/v0.0/NT3-NH | |||
@@ -0,0 +1,20 @@ | |||
1 | #CHECK#CONFIG_TINY_RCU=y | ||
2 | CONFIG_RCU_TORTURE_TEST=m | ||
3 | CONFIG_MODULE_UNLOAD=y | ||
4 | CONFIG_SUSPEND=n | ||
5 | CONFIG_HIBERNATION=n | ||
6 | # | ||
7 | CONFIG_SMP=n | ||
8 | # | ||
9 | CONFIG_HOTPLUG_CPU=n | ||
10 | # | ||
11 | CONFIG_NO_HZ=y | ||
12 | # | ||
13 | CONFIG_PREEMPT_NONE=y | ||
14 | CONFIG_PREEMPT_VOLUNTARY=n | ||
15 | CONFIG_PREEMPT=n | ||
16 | CONFIG_SYSFS_DEPRECATED_V2=y | ||
17 | CONFIG_IKCONFIG=y | ||
18 | CONFIG_IKCONFIG_PROC=y | ||
19 | CONFIG_PRINTK_TIME=y | ||
20 | |||
diff --git a/tools/testing/selftests/rcutorture/configs/v0.0/P1-S-T-NH-SD-SMP-HP b/tools/testing/selftests/rcutorture/configs/v0.0/P1-S-T-NH-SD-SMP-HP new file mode 100644 index 000000000000..f72402d7c13d --- /dev/null +++ b/tools/testing/selftests/rcutorture/configs/v0.0/P1-S-T-NH-SD-SMP-HP | |||
@@ -0,0 +1,19 @@ | |||
1 | CONFIG_RCU_TRACE=y | ||
2 | CONFIG_RCU_CPU_STALL_INFO=y | ||
3 | CONFIG_NO_HZ=y | ||
4 | CONFIG_SMP=y | ||
5 | CONFIG_RCU_FANOUT=8 | ||
6 | CONFIG_NR_CPUS=8 | ||
7 | CONFIG_RCU_FANOUT_EXACT=n | ||
8 | CONFIG_HOTPLUG_CPU=y | ||
9 | CONFIG_PREEMPT_NONE=n | ||
10 | CONFIG_PREEMPT_VOLUNTARY=n | ||
11 | CONFIG_PREEMPT=y | ||
12 | #CHECK#CONFIG_TREE_PREEMPT_RCU=y | ||
13 | CONFIG_RCU_TORTURE_TEST=m | ||
14 | CONFIG_MODULE_UNLOAD=y | ||
15 | CONFIG_SYSFS_DEPRECATED_V2=y | ||
16 | CONFIG_IKCONFIG=y | ||
17 | CONFIG_IKCONFIG_PROC=y | ||
18 | CONFIG_PRINTK_TIME=y | ||
19 | |||
diff --git a/tools/testing/selftests/rcutorture/configs/v0.0/P2-2-t-nh-sd-SMP-hp b/tools/testing/selftests/rcutorture/configs/v0.0/P2-2-t-nh-sd-SMP-hp new file mode 100644 index 000000000000..0f3b667d2a9f --- /dev/null +++ b/tools/testing/selftests/rcutorture/configs/v0.0/P2-2-t-nh-sd-SMP-hp | |||
@@ -0,0 +1,20 @@ | |||
1 | CONFIG_RCU_TRACE=n | ||
2 | CONFIG_NO_HZ=n | ||
3 | CONFIG_SMP=y | ||
4 | CONFIG_RCU_FANOUT=4 | ||
5 | CONFIG_NR_CPUS=8 | ||
6 | CONFIG_RCU_FANOUT_EXACT=n | ||
7 | CONFIG_HOTPLUG_CPU=n | ||
8 | CONFIG_SUSPEND=n | ||
9 | CONFIG_HIBERNATION=n | ||
10 | CONFIG_PREEMPT_NONE=n | ||
11 | CONFIG_PREEMPT_VOLUNTARY=n | ||
12 | CONFIG_PREEMPT=y | ||
13 | #CHECK#CONFIG_TREE_PREEMPT_RCU=y | ||
14 | CONFIG_RCU_TORTURE_TEST=m | ||
15 | CONFIG_MODULE_UNLOAD=y | ||
16 | CONFIG_SYSFS_DEPRECATED_V2=y | ||
17 | CONFIG_IKCONFIG=y | ||
18 | CONFIG_IKCONFIG_PROC=y | ||
19 | CONFIG_PRINTK_TIME=y | ||
20 | |||
diff --git a/tools/testing/selftests/rcutorture/configs/v0.0/P3-3-T-nh-SD-SMP-hp b/tools/testing/selftests/rcutorture/configs/v0.0/P3-3-T-nh-SD-SMP-hp new file mode 100644 index 000000000000..b035e141bf2a --- /dev/null +++ b/tools/testing/selftests/rcutorture/configs/v0.0/P3-3-T-nh-SD-SMP-hp | |||
@@ -0,0 +1,20 @@ | |||
1 | CONFIG_RCU_TRACE=y | ||
2 | CONFIG_NO_HZ=n | ||
3 | CONFIG_SMP=y | ||
4 | CONFIG_RCU_FANOUT=2 | ||
5 | CONFIG_NR_CPUS=8 | ||
6 | CONFIG_RCU_FANOUT_EXACT=n | ||
7 | CONFIG_HOTPLUG_CPU=n | ||
8 | CONFIG_SUSPEND=n | ||
9 | CONFIG_HIBERNATION=n | ||
10 | CONFIG_PREEMPT_NONE=n | ||
11 | CONFIG_PREEMPT_VOLUNTARY=n | ||
12 | CONFIG_PREEMPT=y | ||
13 | #CHECK#CONFIG_TREE_PREEMPT_RCU=y | ||
14 | CONFIG_RCU_TORTURE_TEST=m | ||
15 | CONFIG_MODULE_UNLOAD=y | ||
16 | CONFIG_SYSFS_DEPRECATED_V2=y | ||
17 | CONFIG_IKCONFIG=y | ||
18 | CONFIG_IKCONFIG_PROC=y | ||
19 | CONFIG_PRINTK_TIME=y | ||
20 | |||
diff --git a/tools/testing/selftests/rcutorture/configs/v0.0/P4-A-t-NH-sd-SMP-HP b/tools/testing/selftests/rcutorture/configs/v0.0/P4-A-t-NH-sd-SMP-HP new file mode 100644 index 000000000000..3ccf6a9447f5 --- /dev/null +++ b/tools/testing/selftests/rcutorture/configs/v0.0/P4-A-t-NH-sd-SMP-HP | |||
@@ -0,0 +1,22 @@ | |||
1 | CONFIG_RCU_TRACE=n | ||
2 | CONFIG_NO_HZ=y | ||
3 | CONFIG_SMP=y | ||
4 | CONFIG_RCU_FANOUT=6 | ||
5 | CONFIG_NR_CPUS=8 | ||
6 | CONFIG_RCU_FANOUT_EXACT=n | ||
7 | CONFIG_HOTPLUG_CPU=y | ||
8 | CONFIG_PREEMPT_NONE=n | ||
9 | CONFIG_PREEMPT_VOLUNTARY=n | ||
10 | CONFIG_PREEMPT=y | ||
11 | #CHECK#CONFIG_TREE_PREEMPT_RCU=y | ||
12 | CONFIG_RCU_TORTURE_TEST=m | ||
13 | CONFIG_MODULE_UNLOAD=y | ||
14 | CONFIG_RT_MUTEXES=y | ||
15 | CONFIG_RCU_BOOST=y | ||
16 | CONFIG_RCU_BOOST_PRIO=2 | ||
17 | CONFIG_PROVE_LOCKING=y | ||
18 | CONFIG_PROVE_RCU=y | ||
19 | CONFIG_IKCONFIG=y | ||
20 | CONFIG_IKCONFIG_PROC=y | ||
21 | CONFIG_PRINTK_TIME=y | ||
22 | |||
diff --git a/tools/testing/selftests/rcutorture/configs/v0.0/P5-U-T-NH-sd-SMP-hp b/tools/testing/selftests/rcutorture/configs/v0.0/P5-U-T-NH-sd-SMP-hp new file mode 100644 index 000000000000..ef624ce73d8e --- /dev/null +++ b/tools/testing/selftests/rcutorture/configs/v0.0/P5-U-T-NH-sd-SMP-hp | |||
@@ -0,0 +1,28 @@ | |||
1 | CONFIG_RCU_TRACE=y | ||
2 | CONFIG_RCU_CPU_STALL_INFO=y | ||
3 | CONFIG_NO_HZ=y | ||
4 | CONFIG_SMP=y | ||
5 | CONFIG_RCU_FANOUT=6 | ||
6 | CONFIG_NR_CPUS=8 | ||
7 | CONFIG_RCU_FANOUT_EXACT=y | ||
8 | CONFIG_HOTPLUG_CPU=n | ||
9 | CONFIG_SUSPEND=n | ||
10 | CONFIG_HIBERNATION=n | ||
11 | CONFIG_PREEMPT_NONE=n | ||
12 | CONFIG_PREEMPT_VOLUNTARY=n | ||
13 | CONFIG_PREEMPT=y | ||
14 | #CHECK#CONFIG_TREE_PREEMPT_RCU=y | ||
15 | CONFIG_DEBUG_KERNEL=y | ||
16 | CONFIG_PROVE_RCU_DELAY=y | ||
17 | CONFIG_DEBUG_OBJECTS=y | ||
18 | CONFIG_DEBUG_OBJECTS_RCU_HEAD=y | ||
19 | CONFIG_RT_MUTEXES=y | ||
20 | CONFIG_RCU_BOOST=y | ||
21 | CONFIG_RCU_BOOST_PRIO=2 | ||
22 | CONFIG_RCU_TORTURE_TEST=m | ||
23 | CONFIG_MODULE_UNLOAD=y | ||
24 | CONFIG_SYSFS_DEPRECATED_V2=y | ||
25 | CONFIG_IKCONFIG=y | ||
26 | CONFIG_IKCONFIG_PROC=y | ||
27 | CONFIG_PRINTK_TIME=y | ||
28 | |||
diff --git a/tools/testing/selftests/rcutorture/configs/v0.0/PT1-nh b/tools/testing/selftests/rcutorture/configs/v0.0/PT1-nh new file mode 100644 index 000000000000..e3361c3894a1 --- /dev/null +++ b/tools/testing/selftests/rcutorture/configs/v0.0/PT1-nh | |||
@@ -0,0 +1,23 @@ | |||
1 | CONFIG_TINY_PREEMPT_RCU=y | ||
2 | CONFIG_RCU_BOOST=y | ||
3 | CONFIG_RCU_BOOST_PRIO=2 | ||
4 | CONFIG_RCU_TRACE=y | ||
5 | CONFIG_RCU_TORTURE_TEST=m | ||
6 | CONFIG_MODULE_UNLOAD=y | ||
7 | CONFIG_SUSPEND=n | ||
8 | CONFIG_HIBERNATION=n | ||
9 | # | ||
10 | CONFIG_SMP=n | ||
11 | # | ||
12 | CONFIG_HOTPLUG_CPU=n | ||
13 | # | ||
14 | CONFIG_NO_HZ=n | ||
15 | # | ||
16 | CONFIG_PREEMPT_NONE=n | ||
17 | CONFIG_PREEMPT_VOLUNTARY=n | ||
18 | CONFIG_PREEMPT=y | ||
19 | CONFIG_SYSFS_DEPRECATED_V2=y | ||
20 | CONFIG_IKCONFIG=y | ||
21 | CONFIG_IKCONFIG_PROC=y | ||
22 | CONFIG_PRINTK_TIME=y | ||
23 | |||
diff --git a/tools/testing/selftests/rcutorture/configs/v0.0/PT2-NH b/tools/testing/selftests/rcutorture/configs/v0.0/PT2-NH new file mode 100644 index 000000000000..64abfc3b4d94 --- /dev/null +++ b/tools/testing/selftests/rcutorture/configs/v0.0/PT2-NH | |||
@@ -0,0 +1,22 @@ | |||
1 | CONFIG_TINY_PREEMPT_RCU=y | ||
2 | CONFIG_RCU_TORTURE_TEST=m | ||
3 | CONFIG_MODULE_UNLOAD=y | ||
4 | CONFIG_SUSPEND=n | ||
5 | CONFIG_HIBERNATION=n | ||
6 | # | ||
7 | CONFIG_SMP=n | ||
8 | # | ||
9 | CONFIG_HOTPLUG_CPU=n | ||
10 | # | ||
11 | CONFIG_NO_HZ=y | ||
12 | # | ||
13 | CONFIG_PREEMPT_NONE=n | ||
14 | CONFIG_PREEMPT_VOLUNTARY=n | ||
15 | CONFIG_PREEMPT=y | ||
16 | CONFIG_PROVE_LOCKING=y | ||
17 | CONFIG_PROVE_RCU=y | ||
18 | CONFIG_SYSFS_DEPRECATED_V2=y | ||
19 | CONFIG_IKCONFIG=y | ||
20 | CONFIG_IKCONFIG_PROC=y | ||
21 | CONFIG_PRINTK_TIME=y | ||
22 | |||
diff --git a/tools/testing/selftests/rcutorture/configs/v0.0/ver_functions.sh b/tools/testing/selftests/rcutorture/configs/v0.0/ver_functions.sh new file mode 100644 index 000000000000..e8052539af54 --- /dev/null +++ b/tools/testing/selftests/rcutorture/configs/v0.0/ver_functions.sh | |||
@@ -0,0 +1,35 @@ | |||
1 | #!/bin/bash | ||
2 | # | ||
3 | # Kernel-version-dependent shell functions for the rest of the scripts. | ||
4 | # | ||
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. | ||
9 | # | ||
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. | ||
14 | # | ||
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. | ||
18 | # | ||
19 | # Copyright (C) IBM Corporation, 2013 | ||
20 | # | ||
21 | # Authors: Paul E. McKenney <paulmck@linux.vnet.ibm.com> | ||
22 | |||
23 | # rcutorture_param_n_barrier_cbs bootparam-string | ||
24 | # | ||
25 | # Adds n_barrier_cbs rcutorture module parameter to kernels having it. | ||
26 | rcutorture_param_n_barrier_cbs () { | ||
27 | echo $1 | ||
28 | } | ||
29 | |||
30 | # rcutorture_param_onoff bootparam-string config-file | ||
31 | # | ||
32 | # Adds onoff rcutorture module parameters to kernels having it. | ||
33 | rcutorture_param_onoff () { | ||
34 | echo $1 | ||
35 | } | ||
diff --git a/tools/testing/selftests/rcutorture/configs/v3.12/CFLIST b/tools/testing/selftests/rcutorture/configs/v3.12/CFLIST new file mode 100644 index 000000000000..da4cbc668f2a --- /dev/null +++ b/tools/testing/selftests/rcutorture/configs/v3.12/CFLIST | |||
@@ -0,0 +1,17 @@ | |||
1 | sysidleY.2013.06.19a | ||
2 | sysidleN.2013.06.19a | ||
3 | P1-S-T-NH-SD-SMP-HP | ||
4 | P2-2-t-nh-sd-SMP-hp | ||
5 | P3-3-T-nh-SD-SMP-hp | ||
6 | P4-A-t-NH-sd-SMP-HP | ||
7 | P5-U-T-NH-sd-SMP-hp | ||
8 | P6---t-nh-SD-smp-hp | ||
9 | N1-S-T-NH-SD-SMP-HP | ||
10 | N2-2-t-nh-sd-SMP-hp | ||
11 | N3-3-T-nh-SD-SMP-hp | ||
12 | N4-A-t-NH-sd-SMP-HP | ||
13 | N5-U-T-NH-sd-SMP-hp | ||
14 | PT1-nh | ||
15 | PT2-NH | ||
16 | NT1-nh | ||
17 | NT3-NH | ||
diff --git a/tools/testing/selftests/rcutorture/configs/v3.12/N1-S-T-NH-SD-SMP-HP b/tools/testing/selftests/rcutorture/configs/v3.12/N1-S-T-NH-SD-SMP-HP new file mode 100644 index 000000000000..d81e11d280aa --- /dev/null +++ b/tools/testing/selftests/rcutorture/configs/v3.12/N1-S-T-NH-SD-SMP-HP | |||
@@ -0,0 +1,19 @@ | |||
1 | CONFIG_RCU_TRACE=y | ||
2 | CONFIG_RCU_FAST_NO_HZ=y | ||
3 | CONFIG_NO_HZ=y | ||
4 | CONFIG_SMP=y | ||
5 | CONFIG_RCU_FANOUT=8 | ||
6 | CONFIG_NR_CPUS=8 | ||
7 | CONFIG_RCU_FANOUT_EXACT=n | ||
8 | CONFIG_HOTPLUG_CPU=y | ||
9 | CONFIG_PREEMPT_NONE=y | ||
10 | CONFIG_PREEMPT_VOLUNTARY=n | ||
11 | CONFIG_PREEMPT=n | ||
12 | #CHECK#CONFIG_TREE_RCU=y | ||
13 | CONFIG_RCU_TORTURE_TEST=m | ||
14 | CONFIG_MODULE_UNLOAD=y | ||
15 | CONFIG_SYSFS_DEPRECATED_V2=y | ||
16 | CONFIG_IKCONFIG=y | ||
17 | CONFIG_IKCONFIG_PROC=y | ||
18 | CONFIG_PRINTK_TIME=y | ||
19 | |||
diff --git a/tools/testing/selftests/rcutorture/configs/v3.12/N2-2-t-nh-sd-SMP-hp b/tools/testing/selftests/rcutorture/configs/v3.12/N2-2-t-nh-sd-SMP-hp new file mode 100644 index 000000000000..02e418572b1b --- /dev/null +++ b/tools/testing/selftests/rcutorture/configs/v3.12/N2-2-t-nh-sd-SMP-hp | |||
@@ -0,0 +1,20 @@ | |||
1 | CONFIG_RCU_TRACE=n | ||
2 | CONFIG_NO_HZ=n | ||
3 | CONFIG_SMP=y | ||
4 | CONFIG_RCU_FANOUT=4 | ||
5 | CONFIG_NR_CPUS=8 | ||
6 | CONFIG_RCU_FANOUT_EXACT=n | ||
7 | CONFIG_HOTPLUG_CPU=n | ||
8 | CONFIG_SUSPEND=n | ||
9 | CONFIG_HIBERNATION=n | ||
10 | CONFIG_PREEMPT_NONE=y | ||
11 | CONFIG_PREEMPT_VOLUNTARY=n | ||
12 | CONFIG_PREEMPT=n | ||
13 | #CHECK#CONFIG_TREE_RCU=y | ||
14 | CONFIG_RCU_TORTURE_TEST=m | ||
15 | CONFIG_MODULE_UNLOAD=y | ||
16 | CONFIG_SYSFS_DEPRECATED_V2=y | ||
17 | CONFIG_IKCONFIG=y | ||
18 | CONFIG_IKCONFIG_PROC=y | ||
19 | CONFIG_PRINTK_TIME=y | ||
20 | |||
diff --git a/tools/testing/selftests/rcutorture/configs/v3.12/N3-3-T-nh-SD-SMP-hp b/tools/testing/selftests/rcutorture/configs/v3.12/N3-3-T-nh-SD-SMP-hp new file mode 100644 index 000000000000..b3100f69c8cf --- /dev/null +++ b/tools/testing/selftests/rcutorture/configs/v3.12/N3-3-T-nh-SD-SMP-hp | |||
@@ -0,0 +1,22 @@ | |||
1 | CONFIG_RCU_TRACE=y | ||
2 | CONFIG_NO_HZ=n | ||
3 | CONFIG_SMP=y | ||
4 | CONFIG_RCU_FANOUT=2 | ||
5 | CONFIG_NR_CPUS=8 | ||
6 | CONFIG_RCU_FANOUT_EXACT=n | ||
7 | CONFIG_HOTPLUG_CPU=n | ||
8 | CONFIG_SUSPEND=n | ||
9 | CONFIG_HIBERNATION=n | ||
10 | CONFIG_PREEMPT_NONE=y | ||
11 | CONFIG_PREEMPT_VOLUNTARY=n | ||
12 | CONFIG_PREEMPT=n | ||
13 | #CHECK#CONFIG_TREE_RCU=y | ||
14 | CONFIG_RCU_TORTURE_TEST=m | ||
15 | CONFIG_MODULE_UNLOAD=y | ||
16 | CONFIG_PROVE_LOCKING=y | ||
17 | CONFIG_PROVE_RCU=y | ||
18 | CONFIG_SYSFS_DEPRECATED_V2=y | ||
19 | CONFIG_IKCONFIG=y | ||
20 | CONFIG_IKCONFIG_PROC=y | ||
21 | CONFIG_PRINTK_TIME=y | ||
22 | |||
diff --git a/tools/testing/selftests/rcutorture/configs/v3.12/N4-A-t-NH-sd-SMP-HP b/tools/testing/selftests/rcutorture/configs/v3.12/N4-A-t-NH-sd-SMP-HP new file mode 100644 index 000000000000..c56b44530725 --- /dev/null +++ b/tools/testing/selftests/rcutorture/configs/v3.12/N4-A-t-NH-sd-SMP-HP | |||
@@ -0,0 +1,18 @@ | |||
1 | CONFIG_RCU_TRACE=n | ||
2 | CONFIG_NO_HZ=y | ||
3 | CONFIG_SMP=y | ||
4 | CONFIG_RCU_FANOUT=6 | ||
5 | CONFIG_NR_CPUS=8 | ||
6 | CONFIG_RCU_FANOUT_EXACT=n | ||
7 | CONFIG_HOTPLUG_CPU=y | ||
8 | CONFIG_PREEMPT_NONE=y | ||
9 | CONFIG_PREEMPT_VOLUNTARY=n | ||
10 | CONFIG_PREEMPT=n | ||
11 | #CHECK#CONFIG_TREE_RCU=y | ||
12 | CONFIG_RCU_TORTURE_TEST=m | ||
13 | CONFIG_MODULE_UNLOAD=y | ||
14 | CONFIG_SYSFS_DEPRECATED_V2=y | ||
15 | CONFIG_IKCONFIG=y | ||
16 | CONFIG_IKCONFIG_PROC=y | ||
17 | CONFIG_PRINTK_TIME=y | ||
18 | |||
diff --git a/tools/testing/selftests/rcutorture/configs/v3.12/N5-U-T-NH-sd-SMP-hp b/tools/testing/selftests/rcutorture/configs/v3.12/N5-U-T-NH-sd-SMP-hp new file mode 100644 index 000000000000..90d924fea9e9 --- /dev/null +++ b/tools/testing/selftests/rcutorture/configs/v3.12/N5-U-T-NH-sd-SMP-hp | |||
@@ -0,0 +1,22 @@ | |||
1 | CONFIG_RCU_TRACE=y | ||
2 | CONFIG_DEBUG_KERNEL=y | ||
3 | CONFIG_RCU_CPU_STALL_INFO=y | ||
4 | CONFIG_NO_HZ=y | ||
5 | CONFIG_SMP=y | ||
6 | CONFIG_RCU_FANOUT=6 | ||
7 | CONFIG_NR_CPUS=8 | ||
8 | CONFIG_RCU_FANOUT_EXACT=y | ||
9 | CONFIG_HOTPLUG_CPU=n | ||
10 | CONFIG_SUSPEND=n | ||
11 | CONFIG_HIBERNATION=n | ||
12 | CONFIG_PREEMPT_NONE=y | ||
13 | CONFIG_PREEMPT_VOLUNTARY=n | ||
14 | CONFIG_PREEMPT=n | ||
15 | #CHECK#CONFIG_TREE_RCU=y | ||
16 | CONFIG_RCU_TORTURE_TEST=m | ||
17 | CONFIG_MODULE_UNLOAD=y | ||
18 | CONFIG_SYSFS_DEPRECATED_V2=y | ||
19 | CONFIG_IKCONFIG=y | ||
20 | CONFIG_IKCONFIG_PROC=y | ||
21 | CONFIG_PRINTK_TIME=y | ||
22 | |||
diff --git a/tools/testing/selftests/rcutorture/configs/v3.12/N6---t-nh-SD-smp-hp b/tools/testing/selftests/rcutorture/configs/v3.12/N6---t-nh-SD-smp-hp new file mode 100644 index 000000000000..0ccc36d72738 --- /dev/null +++ b/tools/testing/selftests/rcutorture/configs/v3.12/N6---t-nh-SD-smp-hp | |||
@@ -0,0 +1,19 @@ | |||
1 | CONFIG_RCU_TRACE=n | ||
2 | CONFIG_NO_HZ=n | ||
3 | CONFIG_SMP=y | ||
4 | CONFIG_NR_CPUS=1 | ||
5 | CONFIG_RCU_FANOUT_EXACT=n | ||
6 | CONFIG_HOTPLUG_CPU=n | ||
7 | CONFIG_SUSPEND=n | ||
8 | CONFIG_HIBERNATION=n | ||
9 | CONFIG_PREEMPT_NONE=y | ||
10 | CONFIG_PREEMPT_VOLUNTARY=n | ||
11 | CONFIG_PREEMPT=n | ||
12 | #CHECK#CONFIG_TREE_RCU=y | ||
13 | CONFIG_RCU_TORTURE_TEST=m | ||
14 | CONFIG_MODULE_UNLOAD=y | ||
15 | CONFIG_SYSFS_DEPRECATED_V2=y | ||
16 | CONFIG_IKCONFIG=y | ||
17 | CONFIG_IKCONFIG_PROC=y | ||
18 | CONFIG_PRINTK_TIME=y | ||
19 | |||
diff --git a/tools/testing/selftests/rcutorture/configs/v3.12/N7-4-T-NH-SD-SMP-HP b/tools/testing/selftests/rcutorture/configs/v3.12/N7-4-T-NH-SD-SMP-HP new file mode 100644 index 000000000000..3f640cf84973 --- /dev/null +++ b/tools/testing/selftests/rcutorture/configs/v3.12/N7-4-T-NH-SD-SMP-HP | |||
@@ -0,0 +1,26 @@ | |||
1 | CONFIG_RCU_TRACE=y | ||
2 | CONFIG_DEBUG_KERNEL=y | ||
3 | CONFIG_RCU_CPU_STALL_INFO=y | ||
4 | CONFIG_NO_HZ=y | ||
5 | CONFIG_SMP=y | ||
6 | CONFIG_RCU_FANOUT=2 | ||
7 | CONFIG_NR_CPUS=16 | ||
8 | CONFIG_RCU_FANOUT_EXACT=n | ||
9 | CONFIG_HOTPLUG_CPU=y | ||
10 | CONFIG_RCU_NOCB_CPU=y | ||
11 | CONFIG_RCU_NOCB_CPU_NONE=y | ||
12 | CONFIG_RCU_NOCB_CPU_ZERO=n | ||
13 | CONFIG_RCU_NOCB_CPU_ALL=n | ||
14 | CONFIG_SUSPEND=n | ||
15 | CONFIG_HIBERNATION=n | ||
16 | CONFIG_PREEMPT_NONE=y | ||
17 | CONFIG_PREEMPT_VOLUNTARY=n | ||
18 | CONFIG_PREEMPT=n | ||
19 | #CHECK#CONFIG_TREE_RCU=y | ||
20 | CONFIG_RCU_TORTURE_TEST=m | ||
21 | CONFIG_MODULE_UNLOAD=y | ||
22 | CONFIG_SYSFS_DEPRECATED_V2=y | ||
23 | CONFIG_IKCONFIG=y | ||
24 | CONFIG_IKCONFIG_PROC=y | ||
25 | CONFIG_PRINTK_TIME=y | ||
26 | |||
diff --git a/tools/testing/selftests/rcutorture/configs/v3.12/N8-2-T-NH-SD-SMP-HP b/tools/testing/selftests/rcutorture/configs/v3.12/N8-2-T-NH-SD-SMP-HP new file mode 100644 index 000000000000..285da2dd8ac3 --- /dev/null +++ b/tools/testing/selftests/rcutorture/configs/v3.12/N8-2-T-NH-SD-SMP-HP | |||
@@ -0,0 +1,22 @@ | |||
1 | CONFIG_RCU_TRACE=y | ||
2 | CONFIG_DEBUG_KERNEL=y | ||
3 | CONFIG_RCU_CPU_STALL_INFO=y | ||
4 | CONFIG_NO_HZ=y | ||
5 | CONFIG_SMP=y | ||
6 | CONFIG_RCU_FANOUT=14 | ||
7 | CONFIG_NR_CPUS=16 | ||
8 | CONFIG_RCU_FANOUT_EXACT=y | ||
9 | CONFIG_HOTPLUG_CPU=y | ||
10 | CONFIG_SUSPEND=n | ||
11 | CONFIG_HIBERNATION=n | ||
12 | CONFIG_PREEMPT_NONE=y | ||
13 | CONFIG_PREEMPT_VOLUNTARY=n | ||
14 | CONFIG_PREEMPT=n | ||
15 | #CHECK#CONFIG_TREE_RCU=y | ||
16 | CONFIG_RCU_TORTURE_TEST=m | ||
17 | CONFIG_MODULE_UNLOAD=y | ||
18 | CONFIG_SYSFS_DEPRECATED_V2=y | ||
19 | CONFIG_IKCONFIG=y | ||
20 | CONFIG_IKCONFIG_PROC=y | ||
21 | CONFIG_PRINTK_TIME=y | ||
22 | |||
diff --git a/tools/testing/selftests/rcutorture/configs/v3.12/NT1-nh b/tools/testing/selftests/rcutorture/configs/v3.12/NT1-nh new file mode 100644 index 000000000000..023f312a931c --- /dev/null +++ b/tools/testing/selftests/rcutorture/configs/v3.12/NT1-nh | |||
@@ -0,0 +1,23 @@ | |||
1 | #CHECK#CONFIG_TINY_RCU=y | ||
2 | CONFIG_RCU_TRACE=y | ||
3 | CONFIG_RCU_TORTURE_TEST=m | ||
4 | CONFIG_MODULE_UNLOAD=y | ||
5 | CONFIG_SUSPEND=n | ||
6 | CONFIG_HIBERNATION=n | ||
7 | # | ||
8 | CONFIG_SMP=n | ||
9 | # | ||
10 | CONFIG_HOTPLUG_CPU=n | ||
11 | # | ||
12 | CONFIG_NO_HZ=n | ||
13 | # | ||
14 | CONFIG_PREEMPT_NONE=y | ||
15 | CONFIG_PREEMPT_VOLUNTARY=n | ||
16 | CONFIG_PREEMPT=n | ||
17 | CONFIG_PROVE_LOCKING=y | ||
18 | CONFIG_PROVE_RCU=y | ||
19 | CONFIG_SYSFS_DEPRECATED_V2=y | ||
20 | CONFIG_IKCONFIG=y | ||
21 | CONFIG_IKCONFIG_PROC=y | ||
22 | CONFIG_PRINTK_TIME=y | ||
23 | |||
diff --git a/tools/testing/selftests/rcutorture/configs/v3.12/NT3-NH b/tools/testing/selftests/rcutorture/configs/v3.12/NT3-NH new file mode 100644 index 000000000000..6fd0235dae73 --- /dev/null +++ b/tools/testing/selftests/rcutorture/configs/v3.12/NT3-NH | |||
@@ -0,0 +1,20 @@ | |||
1 | #CHECK#CONFIG_TINY_RCU=y | ||
2 | CONFIG_RCU_TORTURE_TEST=m | ||
3 | CONFIG_MODULE_UNLOAD=y | ||
4 | CONFIG_SUSPEND=n | ||
5 | CONFIG_HIBERNATION=n | ||
6 | # | ||
7 | CONFIG_SMP=n | ||
8 | # | ||
9 | CONFIG_HOTPLUG_CPU=n | ||
10 | # | ||
11 | CONFIG_NO_HZ=y | ||
12 | # | ||
13 | CONFIG_PREEMPT_NONE=y | ||
14 | CONFIG_PREEMPT_VOLUNTARY=n | ||
15 | CONFIG_PREEMPT=n | ||
16 | CONFIG_SYSFS_DEPRECATED_V2=y | ||
17 | CONFIG_IKCONFIG=y | ||
18 | CONFIG_IKCONFIG_PROC=y | ||
19 | CONFIG_PRINTK_TIME=y | ||
20 | |||
diff --git a/tools/testing/selftests/rcutorture/configs/v3.12/P1-S-T-NH-SD-SMP-HP b/tools/testing/selftests/rcutorture/configs/v3.12/P1-S-T-NH-SD-SMP-HP new file mode 100644 index 000000000000..9647c44cf4b7 --- /dev/null +++ b/tools/testing/selftests/rcutorture/configs/v3.12/P1-S-T-NH-SD-SMP-HP | |||
@@ -0,0 +1,20 @@ | |||
1 | CONFIG_RCU_TRACE=y | ||
2 | CONFIG_RCU_CPU_STALL_INFO=y | ||
3 | CONFIG_NO_HZ=y | ||
4 | CONFIG_RCU_FAST_NO_HZ=y | ||
5 | CONFIG_SMP=y | ||
6 | CONFIG_RCU_FANOUT=8 | ||
7 | CONFIG_NR_CPUS=8 | ||
8 | CONFIG_RCU_FANOUT_EXACT=n | ||
9 | CONFIG_HOTPLUG_CPU=y | ||
10 | CONFIG_PREEMPT_NONE=n | ||
11 | CONFIG_PREEMPT_VOLUNTARY=n | ||
12 | CONFIG_PREEMPT=y | ||
13 | #CHECK#CONFIG_TREE_PREEMPT_RCU=y | ||
14 | CONFIG_RCU_TORTURE_TEST=m | ||
15 | CONFIG_MODULE_UNLOAD=y | ||
16 | CONFIG_SYSFS_DEPRECATED_V2=y | ||
17 | CONFIG_IKCONFIG=y | ||
18 | CONFIG_IKCONFIG_PROC=y | ||
19 | CONFIG_PRINTK_TIME=y | ||
20 | |||
diff --git a/tools/testing/selftests/rcutorture/configs/v3.12/P2-2-t-nh-sd-SMP-hp b/tools/testing/selftests/rcutorture/configs/v3.12/P2-2-t-nh-sd-SMP-hp new file mode 100644 index 000000000000..0f3b667d2a9f --- /dev/null +++ b/tools/testing/selftests/rcutorture/configs/v3.12/P2-2-t-nh-sd-SMP-hp | |||
@@ -0,0 +1,20 @@ | |||
1 | CONFIG_RCU_TRACE=n | ||
2 | CONFIG_NO_HZ=n | ||
3 | CONFIG_SMP=y | ||
4 | CONFIG_RCU_FANOUT=4 | ||
5 | CONFIG_NR_CPUS=8 | ||
6 | CONFIG_RCU_FANOUT_EXACT=n | ||
7 | CONFIG_HOTPLUG_CPU=n | ||
8 | CONFIG_SUSPEND=n | ||
9 | CONFIG_HIBERNATION=n | ||
10 | CONFIG_PREEMPT_NONE=n | ||
11 | CONFIG_PREEMPT_VOLUNTARY=n | ||
12 | CONFIG_PREEMPT=y | ||
13 | #CHECK#CONFIG_TREE_PREEMPT_RCU=y | ||
14 | CONFIG_RCU_TORTURE_TEST=m | ||
15 | CONFIG_MODULE_UNLOAD=y | ||
16 | CONFIG_SYSFS_DEPRECATED_V2=y | ||
17 | CONFIG_IKCONFIG=y | ||
18 | CONFIG_IKCONFIG_PROC=y | ||
19 | CONFIG_PRINTK_TIME=y | ||
20 | |||
diff --git a/tools/testing/selftests/rcutorture/configs/v3.12/P3-3-T-nh-SD-SMP-hp b/tools/testing/selftests/rcutorture/configs/v3.12/P3-3-T-nh-SD-SMP-hp new file mode 100644 index 000000000000..b035e141bf2a --- /dev/null +++ b/tools/testing/selftests/rcutorture/configs/v3.12/P3-3-T-nh-SD-SMP-hp | |||
@@ -0,0 +1,20 @@ | |||
1 | CONFIG_RCU_TRACE=y | ||
2 | CONFIG_NO_HZ=n | ||
3 | CONFIG_SMP=y | ||
4 | CONFIG_RCU_FANOUT=2 | ||
5 | CONFIG_NR_CPUS=8 | ||
6 | CONFIG_RCU_FANOUT_EXACT=n | ||
7 | CONFIG_HOTPLUG_CPU=n | ||
8 | CONFIG_SUSPEND=n | ||
9 | CONFIG_HIBERNATION=n | ||
10 | CONFIG_PREEMPT_NONE=n | ||
11 | CONFIG_PREEMPT_VOLUNTARY=n | ||
12 | CONFIG_PREEMPT=y | ||
13 | #CHECK#CONFIG_TREE_PREEMPT_RCU=y | ||
14 | CONFIG_RCU_TORTURE_TEST=m | ||
15 | CONFIG_MODULE_UNLOAD=y | ||
16 | CONFIG_SYSFS_DEPRECATED_V2=y | ||
17 | CONFIG_IKCONFIG=y | ||
18 | CONFIG_IKCONFIG_PROC=y | ||
19 | CONFIG_PRINTK_TIME=y | ||
20 | |||
diff --git a/tools/testing/selftests/rcutorture/configs/v3.12/P4-A-t-NH-sd-SMP-HP b/tools/testing/selftests/rcutorture/configs/v3.12/P4-A-t-NH-sd-SMP-HP new file mode 100644 index 000000000000..3ccf6a9447f5 --- /dev/null +++ b/tools/testing/selftests/rcutorture/configs/v3.12/P4-A-t-NH-sd-SMP-HP | |||
@@ -0,0 +1,22 @@ | |||
1 | CONFIG_RCU_TRACE=n | ||
2 | CONFIG_NO_HZ=y | ||
3 | CONFIG_SMP=y | ||
4 | CONFIG_RCU_FANOUT=6 | ||
5 | CONFIG_NR_CPUS=8 | ||
6 | CONFIG_RCU_FANOUT_EXACT=n | ||
7 | CONFIG_HOTPLUG_CPU=y | ||
8 | CONFIG_PREEMPT_NONE=n | ||
9 | CONFIG_PREEMPT_VOLUNTARY=n | ||
10 | CONFIG_PREEMPT=y | ||
11 | #CHECK#CONFIG_TREE_PREEMPT_RCU=y | ||
12 | CONFIG_RCU_TORTURE_TEST=m | ||
13 | CONFIG_MODULE_UNLOAD=y | ||
14 | CONFIG_RT_MUTEXES=y | ||
15 | CONFIG_RCU_BOOST=y | ||
16 | CONFIG_RCU_BOOST_PRIO=2 | ||
17 | CONFIG_PROVE_LOCKING=y | ||
18 | CONFIG_PROVE_RCU=y | ||
19 | CONFIG_IKCONFIG=y | ||
20 | CONFIG_IKCONFIG_PROC=y | ||
21 | CONFIG_PRINTK_TIME=y | ||
22 | |||
diff --git a/tools/testing/selftests/rcutorture/configs/v3.12/P5-U-T-NH-sd-SMP-hp b/tools/testing/selftests/rcutorture/configs/v3.12/P5-U-T-NH-sd-SMP-hp new file mode 100644 index 000000000000..ef624ce73d8e --- /dev/null +++ b/tools/testing/selftests/rcutorture/configs/v3.12/P5-U-T-NH-sd-SMP-hp | |||
@@ -0,0 +1,28 @@ | |||
1 | CONFIG_RCU_TRACE=y | ||
2 | CONFIG_RCU_CPU_STALL_INFO=y | ||
3 | CONFIG_NO_HZ=y | ||
4 | CONFIG_SMP=y | ||
5 | CONFIG_RCU_FANOUT=6 | ||
6 | CONFIG_NR_CPUS=8 | ||
7 | CONFIG_RCU_FANOUT_EXACT=y | ||
8 | CONFIG_HOTPLUG_CPU=n | ||
9 | CONFIG_SUSPEND=n | ||
10 | CONFIG_HIBERNATION=n | ||
11 | CONFIG_PREEMPT_NONE=n | ||
12 | CONFIG_PREEMPT_VOLUNTARY=n | ||
13 | CONFIG_PREEMPT=y | ||
14 | #CHECK#CONFIG_TREE_PREEMPT_RCU=y | ||
15 | CONFIG_DEBUG_KERNEL=y | ||
16 | CONFIG_PROVE_RCU_DELAY=y | ||
17 | CONFIG_DEBUG_OBJECTS=y | ||
18 | CONFIG_DEBUG_OBJECTS_RCU_HEAD=y | ||
19 | CONFIG_RT_MUTEXES=y | ||
20 | CONFIG_RCU_BOOST=y | ||
21 | CONFIG_RCU_BOOST_PRIO=2 | ||
22 | CONFIG_RCU_TORTURE_TEST=m | ||
23 | CONFIG_MODULE_UNLOAD=y | ||
24 | CONFIG_SYSFS_DEPRECATED_V2=y | ||
25 | CONFIG_IKCONFIG=y | ||
26 | CONFIG_IKCONFIG_PROC=y | ||
27 | CONFIG_PRINTK_TIME=y | ||
28 | |||
diff --git a/tools/testing/selftests/rcutorture/configs/v3.12/P6---t-nh-SD-smp-hp b/tools/testing/selftests/rcutorture/configs/v3.12/P6---t-nh-SD-smp-hp new file mode 100644 index 000000000000..f4c9175828bf --- /dev/null +++ b/tools/testing/selftests/rcutorture/configs/v3.12/P6---t-nh-SD-smp-hp | |||
@@ -0,0 +1,18 @@ | |||
1 | CONFIG_RCU_TRACE=n | ||
2 | CONFIG_NO_HZ=n | ||
3 | CONFIG_SMP=n | ||
4 | CONFIG_RCU_FANOUT_EXACT=n | ||
5 | CONFIG_HOTPLUG_CPU=n | ||
6 | CONFIG_SUSPEND=n | ||
7 | CONFIG_HIBERNATION=n | ||
8 | CONFIG_PREEMPT_NONE=n | ||
9 | CONFIG_PREEMPT_VOLUNTARY=n | ||
10 | CONFIG_PREEMPT=y | ||
11 | CONFIG_TREE_PREEMPT_RCU=y | ||
12 | CONFIG_RCU_TORTURE_TEST=m | ||
13 | CONFIG_MODULE_UNLOAD=y | ||
14 | CONFIG_SYSFS_DEPRECATED_V2=y | ||
15 | CONFIG_IKCONFIG=y | ||
16 | CONFIG_IKCONFIG_PROC=y | ||
17 | CONFIG_PRINTK_TIME=y | ||
18 | |||
diff --git a/tools/testing/selftests/rcutorture/configs/v3.12/P7-4-T-NH-SD-SMP-HP b/tools/testing/selftests/rcutorture/configs/v3.12/P7-4-T-NH-SD-SMP-HP new file mode 100644 index 000000000000..77a8c5b75763 --- /dev/null +++ b/tools/testing/selftests/rcutorture/configs/v3.12/P7-4-T-NH-SD-SMP-HP | |||
@@ -0,0 +1,30 @@ | |||
1 | CONFIG_RCU_TRACE=y | ||
2 | CONFIG_NO_HZ=y | ||
3 | CONFIG_SMP=y | ||
4 | CONFIG_RCU_FANOUT=2 | ||
5 | CONFIG_NR_CPUS=16 | ||
6 | CONFIG_RCU_FANOUT_EXACT=n | ||
7 | CONFIG_HOTPLUG_CPU=y | ||
8 | CONFIG_RCU_NOCB_CPU=y | ||
9 | CONFIG_RCU_NOCB_CPU_NONE=n | ||
10 | CONFIG_RCU_NOCB_CPU_ZERO=n | ||
11 | CONFIG_RCU_NOCB_CPU_ALL=y | ||
12 | CONFIG_SUSPEND=n | ||
13 | CONFIG_HIBERNATION=n | ||
14 | CONFIG_PREEMPT_NONE=n | ||
15 | CONFIG_PREEMPT_VOLUNTARY=n | ||
16 | CONFIG_PREEMPT=y | ||
17 | #CHECK#CONFIG_TREE_PREEMPT_RCU=y | ||
18 | CONFIG_RCU_TORTURE_TEST=m | ||
19 | CONFIG_MODULE_UNLOAD=y | ||
20 | CONFIG_PROVE_LOCKING=y | ||
21 | CONFIG_PROVE_RCU=y | ||
22 | CONFIG_DEBUG_KERNEL=y | ||
23 | CONFIG_DEBUG_OBJECTS=y | ||
24 | CONFIG_DEBUG_OBJECTS_RCU_HEAD=y | ||
25 | CONFIG_SYSFS_DEPRECATED_V2=y | ||
26 | CONFIG_SLUB=y | ||
27 | CONFIG_IKCONFIG=y | ||
28 | CONFIG_IKCONFIG_PROC=y | ||
29 | CONFIG_PRINTK_TIME=y | ||
30 | |||
diff --git a/tools/testing/selftests/rcutorture/configs/v3.12/P7-4-T-NH-SD-SMP-HP-all b/tools/testing/selftests/rcutorture/configs/v3.12/P7-4-T-NH-SD-SMP-HP-all new file mode 100644 index 000000000000..0eecebc6e95f --- /dev/null +++ b/tools/testing/selftests/rcutorture/configs/v3.12/P7-4-T-NH-SD-SMP-HP-all | |||
@@ -0,0 +1,30 @@ | |||
1 | CONFIG_RCU_TRACE=y | ||
2 | CONFIG_NO_HZ=y | ||
3 | CONFIG_SMP=y | ||
4 | CONFIG_RCU_FANOUT=2 | ||
5 | CONFIG_NR_CPUS=16 | ||
6 | CONFIG_RCU_FANOUT_EXACT=n | ||
7 | CONFIG_HOTPLUG_CPU=y | ||
8 | CONFIG_RCU_NOCB_CPU=y | ||
9 | CONFIG_RCU_NOCB_CPU_NONE=y | ||
10 | CONFIG_RCU_NOCB_CPU_ZERO=n | ||
11 | CONFIG_RCU_NOCB_CPU_ALL=n | ||
12 | CONFIG_SUSPEND=n | ||
13 | CONFIG_HIBERNATION=n | ||
14 | CONFIG_PREEMPT_NONE=n | ||
15 | CONFIG_PREEMPT_VOLUNTARY=n | ||
16 | CONFIG_PREEMPT=y | ||
17 | #CHECK#CONFIG_TREE_PREEMPT_RCU=y | ||
18 | CONFIG_RCU_TORTURE_TEST=m | ||
19 | CONFIG_MODULE_UNLOAD=y | ||
20 | CONFIG_PROVE_LOCKING=y | ||
21 | CONFIG_PROVE_RCU=y | ||
22 | CONFIG_DEBUG_KERNEL=y | ||
23 | CONFIG_DEBUG_OBJECTS=y | ||
24 | CONFIG_DEBUG_OBJECTS_RCU_HEAD=y | ||
25 | CONFIG_SYSFS_DEPRECATED_V2=y | ||
26 | CONFIG_SLUB=y | ||
27 | CONFIG_IKCONFIG=y | ||
28 | CONFIG_IKCONFIG_PROC=y | ||
29 | CONFIG_PRINTK_TIME=y | ||
30 | |||
diff --git a/tools/testing/selftests/rcutorture/configs/v3.12/P7-4-T-NH-SD-SMP-HP-none b/tools/testing/selftests/rcutorture/configs/v3.12/P7-4-T-NH-SD-SMP-HP-none new file mode 100644 index 000000000000..0eecebc6e95f --- /dev/null +++ b/tools/testing/selftests/rcutorture/configs/v3.12/P7-4-T-NH-SD-SMP-HP-none | |||
@@ -0,0 +1,30 @@ | |||
1 | CONFIG_RCU_TRACE=y | ||
2 | CONFIG_NO_HZ=y | ||
3 | CONFIG_SMP=y | ||
4 | CONFIG_RCU_FANOUT=2 | ||
5 | CONFIG_NR_CPUS=16 | ||
6 | CONFIG_RCU_FANOUT_EXACT=n | ||
7 | CONFIG_HOTPLUG_CPU=y | ||
8 | CONFIG_RCU_NOCB_CPU=y | ||
9 | CONFIG_RCU_NOCB_CPU_NONE=y | ||
10 | CONFIG_RCU_NOCB_CPU_ZERO=n | ||
11 | CONFIG_RCU_NOCB_CPU_ALL=n | ||
12 | CONFIG_SUSPEND=n | ||
13 | CONFIG_HIBERNATION=n | ||
14 | CONFIG_PREEMPT_NONE=n | ||
15 | CONFIG_PREEMPT_VOLUNTARY=n | ||
16 | CONFIG_PREEMPT=y | ||
17 | #CHECK#CONFIG_TREE_PREEMPT_RCU=y | ||
18 | CONFIG_RCU_TORTURE_TEST=m | ||
19 | CONFIG_MODULE_UNLOAD=y | ||
20 | CONFIG_PROVE_LOCKING=y | ||
21 | CONFIG_PROVE_RCU=y | ||
22 | CONFIG_DEBUG_KERNEL=y | ||
23 | CONFIG_DEBUG_OBJECTS=y | ||
24 | CONFIG_DEBUG_OBJECTS_RCU_HEAD=y | ||
25 | CONFIG_SYSFS_DEPRECATED_V2=y | ||
26 | CONFIG_SLUB=y | ||
27 | CONFIG_IKCONFIG=y | ||
28 | CONFIG_IKCONFIG_PROC=y | ||
29 | CONFIG_PRINTK_TIME=y | ||
30 | |||
diff --git a/tools/testing/selftests/rcutorture/configs/v3.12/P7-4-T-NH-SD-SMP-hp b/tools/testing/selftests/rcutorture/configs/v3.12/P7-4-T-NH-SD-SMP-hp new file mode 100644 index 000000000000..588bc70420cd --- /dev/null +++ b/tools/testing/selftests/rcutorture/configs/v3.12/P7-4-T-NH-SD-SMP-hp | |||
@@ -0,0 +1,30 @@ | |||
1 | CONFIG_RCU_TRACE=y | ||
2 | CONFIG_NO_HZ=y | ||
3 | CONFIG_SMP=y | ||
4 | CONFIG_RCU_FANOUT=2 | ||
5 | CONFIG_NR_CPUS=16 | ||
6 | CONFIG_RCU_FANOUT_EXACT=n | ||
7 | CONFIG_HOTPLUG_CPU=n | ||
8 | CONFIG_RCU_NOCB_CPU=y | ||
9 | CONFIG_RCU_NOCB_CPU_NONE=n | ||
10 | CONFIG_RCU_NOCB_CPU_ZERO=y | ||
11 | CONFIG_RCU_NOCB_CPU_ALL=n | ||
12 | CONFIG_SUSPEND=n | ||
13 | CONFIG_HIBERNATION=n | ||
14 | CONFIG_PREEMPT_NONE=n | ||
15 | CONFIG_PREEMPT_VOLUNTARY=n | ||
16 | CONFIG_PREEMPT=y | ||
17 | #CHECK#CONFIG_TREE_PREEMPT_RCU=y | ||
18 | CONFIG_RCU_TORTURE_TEST=m | ||
19 | CONFIG_MODULE_UNLOAD=y | ||
20 | CONFIG_PROVE_LOCKING=y | ||
21 | CONFIG_PROVE_RCU=y | ||
22 | CONFIG_DEBUG_KERNEL=y | ||
23 | CONFIG_DEBUG_OBJECTS=y | ||
24 | CONFIG_DEBUG_OBJECTS_RCU_HEAD=y | ||
25 | CONFIG_SYSFS_DEPRECATED_V2=y | ||
26 | CONFIG_SLUB=y | ||
27 | CONFIG_IKCONFIG=y | ||
28 | CONFIG_IKCONFIG_PROC=y | ||
29 | CONFIG_PRINTK_TIME=y | ||
30 | |||
diff --git a/tools/testing/selftests/rcutorture/configs/v3.12/PT1-nh b/tools/testing/selftests/rcutorture/configs/v3.12/PT1-nh new file mode 100644 index 000000000000..e3361c3894a1 --- /dev/null +++ b/tools/testing/selftests/rcutorture/configs/v3.12/PT1-nh | |||
@@ -0,0 +1,23 @@ | |||
1 | CONFIG_TINY_PREEMPT_RCU=y | ||
2 | CONFIG_RCU_BOOST=y | ||
3 | CONFIG_RCU_BOOST_PRIO=2 | ||
4 | CONFIG_RCU_TRACE=y | ||
5 | CONFIG_RCU_TORTURE_TEST=m | ||
6 | CONFIG_MODULE_UNLOAD=y | ||
7 | CONFIG_SUSPEND=n | ||
8 | CONFIG_HIBERNATION=n | ||
9 | # | ||
10 | CONFIG_SMP=n | ||
11 | # | ||
12 | CONFIG_HOTPLUG_CPU=n | ||
13 | # | ||
14 | CONFIG_NO_HZ=n | ||
15 | # | ||
16 | CONFIG_PREEMPT_NONE=n | ||
17 | CONFIG_PREEMPT_VOLUNTARY=n | ||
18 | CONFIG_PREEMPT=y | ||
19 | CONFIG_SYSFS_DEPRECATED_V2=y | ||
20 | CONFIG_IKCONFIG=y | ||
21 | CONFIG_IKCONFIG_PROC=y | ||
22 | CONFIG_PRINTK_TIME=y | ||
23 | |||
diff --git a/tools/testing/selftests/rcutorture/configs/v3.12/PT2-NH b/tools/testing/selftests/rcutorture/configs/v3.12/PT2-NH new file mode 100644 index 000000000000..64abfc3b4d94 --- /dev/null +++ b/tools/testing/selftests/rcutorture/configs/v3.12/PT2-NH | |||
@@ -0,0 +1,22 @@ | |||
1 | CONFIG_TINY_PREEMPT_RCU=y | ||
2 | CONFIG_RCU_TORTURE_TEST=m | ||
3 | CONFIG_MODULE_UNLOAD=y | ||
4 | CONFIG_SUSPEND=n | ||
5 | CONFIG_HIBERNATION=n | ||
6 | # | ||
7 | CONFIG_SMP=n | ||
8 | # | ||
9 | CONFIG_HOTPLUG_CPU=n | ||
10 | # | ||
11 | CONFIG_NO_HZ=y | ||
12 | # | ||
13 | CONFIG_PREEMPT_NONE=n | ||
14 | CONFIG_PREEMPT_VOLUNTARY=n | ||
15 | CONFIG_PREEMPT=y | ||
16 | CONFIG_PROVE_LOCKING=y | ||
17 | CONFIG_PROVE_RCU=y | ||
18 | CONFIG_SYSFS_DEPRECATED_V2=y | ||
19 | CONFIG_IKCONFIG=y | ||
20 | CONFIG_IKCONFIG_PROC=y | ||
21 | CONFIG_PRINTK_TIME=y | ||
22 | |||
diff --git a/tools/testing/selftests/rcutorture/configs/v3.3/CFLIST b/tools/testing/selftests/rcutorture/configs/v3.3/CFLIST new file mode 100644 index 000000000000..18223947bbcb --- /dev/null +++ b/tools/testing/selftests/rcutorture/configs/v3.3/CFLIST | |||
@@ -0,0 +1,14 @@ | |||
1 | P1-S-T-NH-SD-SMP-HP | ||
2 | P2-2-t-nh-sd-SMP-hp | ||
3 | P3-3-T-nh-SD-SMP-hp | ||
4 | P4-A-t-NH-sd-SMP-HP | ||
5 | P5-U-T-NH-sd-SMP-hp | ||
6 | N1-S-T-NH-SD-SMP-HP | ||
7 | N2-2-t-nh-sd-SMP-hp | ||
8 | N3-3-T-nh-SD-SMP-hp | ||
9 | N4-A-t-NH-sd-SMP-HP | ||
10 | N5-U-T-NH-sd-SMP-hp | ||
11 | PT1-nh | ||
12 | PT2-NH | ||
13 | NT1-nh | ||
14 | NT3-NH | ||
diff --git a/tools/testing/selftests/rcutorture/configs/v3.3/N1-S-T-NH-SD-SMP-HP b/tools/testing/selftests/rcutorture/configs/v3.3/N1-S-T-NH-SD-SMP-HP new file mode 100644 index 000000000000..d81e11d280aa --- /dev/null +++ b/tools/testing/selftests/rcutorture/configs/v3.3/N1-S-T-NH-SD-SMP-HP | |||
@@ -0,0 +1,19 @@ | |||
1 | CONFIG_RCU_TRACE=y | ||
2 | CONFIG_RCU_FAST_NO_HZ=y | ||
3 | CONFIG_NO_HZ=y | ||
4 | CONFIG_SMP=y | ||
5 | CONFIG_RCU_FANOUT=8 | ||
6 | CONFIG_NR_CPUS=8 | ||
7 | CONFIG_RCU_FANOUT_EXACT=n | ||
8 | CONFIG_HOTPLUG_CPU=y | ||
9 | CONFIG_PREEMPT_NONE=y | ||
10 | CONFIG_PREEMPT_VOLUNTARY=n | ||
11 | CONFIG_PREEMPT=n | ||
12 | #CHECK#CONFIG_TREE_RCU=y | ||
13 | CONFIG_RCU_TORTURE_TEST=m | ||
14 | CONFIG_MODULE_UNLOAD=y | ||
15 | CONFIG_SYSFS_DEPRECATED_V2=y | ||
16 | CONFIG_IKCONFIG=y | ||
17 | CONFIG_IKCONFIG_PROC=y | ||
18 | CONFIG_PRINTK_TIME=y | ||
19 | |||
diff --git a/tools/testing/selftests/rcutorture/configs/v3.3/N2-2-t-nh-sd-SMP-hp b/tools/testing/selftests/rcutorture/configs/v3.3/N2-2-t-nh-sd-SMP-hp new file mode 100644 index 000000000000..02e418572b1b --- /dev/null +++ b/tools/testing/selftests/rcutorture/configs/v3.3/N2-2-t-nh-sd-SMP-hp | |||
@@ -0,0 +1,20 @@ | |||
1 | CONFIG_RCU_TRACE=n | ||
2 | CONFIG_NO_HZ=n | ||
3 | CONFIG_SMP=y | ||
4 | CONFIG_RCU_FANOUT=4 | ||
5 | CONFIG_NR_CPUS=8 | ||
6 | CONFIG_RCU_FANOUT_EXACT=n | ||
7 | CONFIG_HOTPLUG_CPU=n | ||
8 | CONFIG_SUSPEND=n | ||
9 | CONFIG_HIBERNATION=n | ||
10 | CONFIG_PREEMPT_NONE=y | ||
11 | CONFIG_PREEMPT_VOLUNTARY=n | ||
12 | CONFIG_PREEMPT=n | ||
13 | #CHECK#CONFIG_TREE_RCU=y | ||
14 | CONFIG_RCU_TORTURE_TEST=m | ||
15 | CONFIG_MODULE_UNLOAD=y | ||
16 | CONFIG_SYSFS_DEPRECATED_V2=y | ||
17 | CONFIG_IKCONFIG=y | ||
18 | CONFIG_IKCONFIG_PROC=y | ||
19 | CONFIG_PRINTK_TIME=y | ||
20 | |||
diff --git a/tools/testing/selftests/rcutorture/configs/v3.3/N3-3-T-nh-SD-SMP-hp b/tools/testing/selftests/rcutorture/configs/v3.3/N3-3-T-nh-SD-SMP-hp new file mode 100644 index 000000000000..b3100f69c8cf --- /dev/null +++ b/tools/testing/selftests/rcutorture/configs/v3.3/N3-3-T-nh-SD-SMP-hp | |||
@@ -0,0 +1,22 @@ | |||
1 | CONFIG_RCU_TRACE=y | ||
2 | CONFIG_NO_HZ=n | ||
3 | CONFIG_SMP=y | ||
4 | CONFIG_RCU_FANOUT=2 | ||
5 | CONFIG_NR_CPUS=8 | ||
6 | CONFIG_RCU_FANOUT_EXACT=n | ||
7 | CONFIG_HOTPLUG_CPU=n | ||
8 | CONFIG_SUSPEND=n | ||
9 | CONFIG_HIBERNATION=n | ||
10 | CONFIG_PREEMPT_NONE=y | ||
11 | CONFIG_PREEMPT_VOLUNTARY=n | ||
12 | CONFIG_PREEMPT=n | ||
13 | #CHECK#CONFIG_TREE_RCU=y | ||
14 | CONFIG_RCU_TORTURE_TEST=m | ||
15 | CONFIG_MODULE_UNLOAD=y | ||
16 | CONFIG_PROVE_LOCKING=y | ||
17 | CONFIG_PROVE_RCU=y | ||
18 | CONFIG_SYSFS_DEPRECATED_V2=y | ||
19 | CONFIG_IKCONFIG=y | ||
20 | CONFIG_IKCONFIG_PROC=y | ||
21 | CONFIG_PRINTK_TIME=y | ||
22 | |||
diff --git a/tools/testing/selftests/rcutorture/configs/v3.3/N4-A-t-NH-sd-SMP-HP b/tools/testing/selftests/rcutorture/configs/v3.3/N4-A-t-NH-sd-SMP-HP new file mode 100644 index 000000000000..c56b44530725 --- /dev/null +++ b/tools/testing/selftests/rcutorture/configs/v3.3/N4-A-t-NH-sd-SMP-HP | |||
@@ -0,0 +1,18 @@ | |||
1 | CONFIG_RCU_TRACE=n | ||
2 | CONFIG_NO_HZ=y | ||
3 | CONFIG_SMP=y | ||
4 | CONFIG_RCU_FANOUT=6 | ||
5 | CONFIG_NR_CPUS=8 | ||
6 | CONFIG_RCU_FANOUT_EXACT=n | ||
7 | CONFIG_HOTPLUG_CPU=y | ||
8 | CONFIG_PREEMPT_NONE=y | ||
9 | CONFIG_PREEMPT_VOLUNTARY=n | ||
10 | CONFIG_PREEMPT=n | ||
11 | #CHECK#CONFIG_TREE_RCU=y | ||
12 | CONFIG_RCU_TORTURE_TEST=m | ||
13 | CONFIG_MODULE_UNLOAD=y | ||
14 | CONFIG_SYSFS_DEPRECATED_V2=y | ||
15 | CONFIG_IKCONFIG=y | ||
16 | CONFIG_IKCONFIG_PROC=y | ||
17 | CONFIG_PRINTK_TIME=y | ||
18 | |||
diff --git a/tools/testing/selftests/rcutorture/configs/v3.3/N5-U-T-NH-sd-SMP-hp b/tools/testing/selftests/rcutorture/configs/v3.3/N5-U-T-NH-sd-SMP-hp new file mode 100644 index 000000000000..90d924fea9e9 --- /dev/null +++ b/tools/testing/selftests/rcutorture/configs/v3.3/N5-U-T-NH-sd-SMP-hp | |||
@@ -0,0 +1,22 @@ | |||
1 | CONFIG_RCU_TRACE=y | ||
2 | CONFIG_DEBUG_KERNEL=y | ||
3 | CONFIG_RCU_CPU_STALL_INFO=y | ||
4 | CONFIG_NO_HZ=y | ||
5 | CONFIG_SMP=y | ||
6 | CONFIG_RCU_FANOUT=6 | ||
7 | CONFIG_NR_CPUS=8 | ||
8 | CONFIG_RCU_FANOUT_EXACT=y | ||
9 | CONFIG_HOTPLUG_CPU=n | ||
10 | CONFIG_SUSPEND=n | ||
11 | CONFIG_HIBERNATION=n | ||
12 | CONFIG_PREEMPT_NONE=y | ||
13 | CONFIG_PREEMPT_VOLUNTARY=n | ||
14 | CONFIG_PREEMPT=n | ||
15 | #CHECK#CONFIG_TREE_RCU=y | ||
16 | CONFIG_RCU_TORTURE_TEST=m | ||
17 | CONFIG_MODULE_UNLOAD=y | ||
18 | CONFIG_SYSFS_DEPRECATED_V2=y | ||
19 | CONFIG_IKCONFIG=y | ||
20 | CONFIG_IKCONFIG_PROC=y | ||
21 | CONFIG_PRINTK_TIME=y | ||
22 | |||
diff --git a/tools/testing/selftests/rcutorture/configs/v3.3/NT1-nh b/tools/testing/selftests/rcutorture/configs/v3.3/NT1-nh new file mode 100644 index 000000000000..023f312a931c --- /dev/null +++ b/tools/testing/selftests/rcutorture/configs/v3.3/NT1-nh | |||
@@ -0,0 +1,23 @@ | |||
1 | #CHECK#CONFIG_TINY_RCU=y | ||
2 | CONFIG_RCU_TRACE=y | ||
3 | CONFIG_RCU_TORTURE_TEST=m | ||
4 | CONFIG_MODULE_UNLOAD=y | ||
5 | CONFIG_SUSPEND=n | ||
6 | CONFIG_HIBERNATION=n | ||
7 | # | ||
8 | CONFIG_SMP=n | ||
9 | # | ||
10 | CONFIG_HOTPLUG_CPU=n | ||
11 | # | ||
12 | CONFIG_NO_HZ=n | ||
13 | # | ||
14 | CONFIG_PREEMPT_NONE=y | ||
15 | CONFIG_PREEMPT_VOLUNTARY=n | ||
16 | CONFIG_PREEMPT=n | ||
17 | CONFIG_PROVE_LOCKING=y | ||
18 | CONFIG_PROVE_RCU=y | ||
19 | CONFIG_SYSFS_DEPRECATED_V2=y | ||
20 | CONFIG_IKCONFIG=y | ||
21 | CONFIG_IKCONFIG_PROC=y | ||
22 | CONFIG_PRINTK_TIME=y | ||
23 | |||
diff --git a/tools/testing/selftests/rcutorture/configs/v3.3/NT3-NH b/tools/testing/selftests/rcutorture/configs/v3.3/NT3-NH new file mode 100644 index 000000000000..6fd0235dae73 --- /dev/null +++ b/tools/testing/selftests/rcutorture/configs/v3.3/NT3-NH | |||
@@ -0,0 +1,20 @@ | |||
1 | #CHECK#CONFIG_TINY_RCU=y | ||
2 | CONFIG_RCU_TORTURE_TEST=m | ||
3 | CONFIG_MODULE_UNLOAD=y | ||
4 | CONFIG_SUSPEND=n | ||
5 | CONFIG_HIBERNATION=n | ||
6 | # | ||
7 | CONFIG_SMP=n | ||
8 | # | ||
9 | CONFIG_HOTPLUG_CPU=n | ||
10 | # | ||
11 | CONFIG_NO_HZ=y | ||
12 | # | ||
13 | CONFIG_PREEMPT_NONE=y | ||
14 | CONFIG_PREEMPT_VOLUNTARY=n | ||
15 | CONFIG_PREEMPT=n | ||
16 | CONFIG_SYSFS_DEPRECATED_V2=y | ||
17 | CONFIG_IKCONFIG=y | ||
18 | CONFIG_IKCONFIG_PROC=y | ||
19 | CONFIG_PRINTK_TIME=y | ||
20 | |||
diff --git a/tools/testing/selftests/rcutorture/configs/v3.3/P1-S-T-NH-SD-SMP-HP b/tools/testing/selftests/rcutorture/configs/v3.3/P1-S-T-NH-SD-SMP-HP new file mode 100644 index 000000000000..9647c44cf4b7 --- /dev/null +++ b/tools/testing/selftests/rcutorture/configs/v3.3/P1-S-T-NH-SD-SMP-HP | |||
@@ -0,0 +1,20 @@ | |||
1 | CONFIG_RCU_TRACE=y | ||
2 | CONFIG_RCU_CPU_STALL_INFO=y | ||
3 | CONFIG_NO_HZ=y | ||
4 | CONFIG_RCU_FAST_NO_HZ=y | ||
5 | CONFIG_SMP=y | ||
6 | CONFIG_RCU_FANOUT=8 | ||
7 | CONFIG_NR_CPUS=8 | ||
8 | CONFIG_RCU_FANOUT_EXACT=n | ||
9 | CONFIG_HOTPLUG_CPU=y | ||
10 | CONFIG_PREEMPT_NONE=n | ||
11 | CONFIG_PREEMPT_VOLUNTARY=n | ||
12 | CONFIG_PREEMPT=y | ||
13 | #CHECK#CONFIG_TREE_PREEMPT_RCU=y | ||
14 | CONFIG_RCU_TORTURE_TEST=m | ||
15 | CONFIG_MODULE_UNLOAD=y | ||
16 | CONFIG_SYSFS_DEPRECATED_V2=y | ||
17 | CONFIG_IKCONFIG=y | ||
18 | CONFIG_IKCONFIG_PROC=y | ||
19 | CONFIG_PRINTK_TIME=y | ||
20 | |||
diff --git a/tools/testing/selftests/rcutorture/configs/v3.3/P2-2-t-nh-sd-SMP-hp b/tools/testing/selftests/rcutorture/configs/v3.3/P2-2-t-nh-sd-SMP-hp new file mode 100644 index 000000000000..0f3b667d2a9f --- /dev/null +++ b/tools/testing/selftests/rcutorture/configs/v3.3/P2-2-t-nh-sd-SMP-hp | |||
@@ -0,0 +1,20 @@ | |||
1 | CONFIG_RCU_TRACE=n | ||
2 | CONFIG_NO_HZ=n | ||
3 | CONFIG_SMP=y | ||
4 | CONFIG_RCU_FANOUT=4 | ||
5 | CONFIG_NR_CPUS=8 | ||
6 | CONFIG_RCU_FANOUT_EXACT=n | ||
7 | CONFIG_HOTPLUG_CPU=n | ||
8 | CONFIG_SUSPEND=n | ||
9 | CONFIG_HIBERNATION=n | ||
10 | CONFIG_PREEMPT_NONE=n | ||
11 | CONFIG_PREEMPT_VOLUNTARY=n | ||
12 | CONFIG_PREEMPT=y | ||
13 | #CHECK#CONFIG_TREE_PREEMPT_RCU=y | ||
14 | CONFIG_RCU_TORTURE_TEST=m | ||
15 | CONFIG_MODULE_UNLOAD=y | ||
16 | CONFIG_SYSFS_DEPRECATED_V2=y | ||
17 | CONFIG_IKCONFIG=y | ||
18 | CONFIG_IKCONFIG_PROC=y | ||
19 | CONFIG_PRINTK_TIME=y | ||
20 | |||
diff --git a/tools/testing/selftests/rcutorture/configs/v3.3/P3-3-T-nh-SD-SMP-hp b/tools/testing/selftests/rcutorture/configs/v3.3/P3-3-T-nh-SD-SMP-hp new file mode 100644 index 000000000000..b035e141bf2a --- /dev/null +++ b/tools/testing/selftests/rcutorture/configs/v3.3/P3-3-T-nh-SD-SMP-hp | |||
@@ -0,0 +1,20 @@ | |||
1 | CONFIG_RCU_TRACE=y | ||
2 | CONFIG_NO_HZ=n | ||
3 | CONFIG_SMP=y | ||
4 | CONFIG_RCU_FANOUT=2 | ||
5 | CONFIG_NR_CPUS=8 | ||
6 | CONFIG_RCU_FANOUT_EXACT=n | ||
7 | CONFIG_HOTPLUG_CPU=n | ||
8 | CONFIG_SUSPEND=n | ||
9 | CONFIG_HIBERNATION=n | ||
10 | CONFIG_PREEMPT_NONE=n | ||
11 | CONFIG_PREEMPT_VOLUNTARY=n | ||
12 | CONFIG_PREEMPT=y | ||
13 | #CHECK#CONFIG_TREE_PREEMPT_RCU=y | ||
14 | CONFIG_RCU_TORTURE_TEST=m | ||
15 | CONFIG_MODULE_UNLOAD=y | ||
16 | CONFIG_SYSFS_DEPRECATED_V2=y | ||
17 | CONFIG_IKCONFIG=y | ||
18 | CONFIG_IKCONFIG_PROC=y | ||
19 | CONFIG_PRINTK_TIME=y | ||
20 | |||
diff --git a/tools/testing/selftests/rcutorture/configs/v3.3/P4-A-t-NH-sd-SMP-HP b/tools/testing/selftests/rcutorture/configs/v3.3/P4-A-t-NH-sd-SMP-HP new file mode 100644 index 000000000000..3ccf6a9447f5 --- /dev/null +++ b/tools/testing/selftests/rcutorture/configs/v3.3/P4-A-t-NH-sd-SMP-HP | |||
@@ -0,0 +1,22 @@ | |||
1 | CONFIG_RCU_TRACE=n | ||
2 | CONFIG_NO_HZ=y | ||
3 | CONFIG_SMP=y | ||
4 | CONFIG_RCU_FANOUT=6 | ||
5 | CONFIG_NR_CPUS=8 | ||
6 | CONFIG_RCU_FANOUT_EXACT=n | ||
7 | CONFIG_HOTPLUG_CPU=y | ||
8 | CONFIG_PREEMPT_NONE=n | ||
9 | CONFIG_PREEMPT_VOLUNTARY=n | ||
10 | CONFIG_PREEMPT=y | ||
11 | #CHECK#CONFIG_TREE_PREEMPT_RCU=y | ||
12 | CONFIG_RCU_TORTURE_TEST=m | ||
13 | CONFIG_MODULE_UNLOAD=y | ||
14 | CONFIG_RT_MUTEXES=y | ||
15 | CONFIG_RCU_BOOST=y | ||
16 | CONFIG_RCU_BOOST_PRIO=2 | ||
17 | CONFIG_PROVE_LOCKING=y | ||
18 | CONFIG_PROVE_RCU=y | ||
19 | CONFIG_IKCONFIG=y | ||
20 | CONFIG_IKCONFIG_PROC=y | ||
21 | CONFIG_PRINTK_TIME=y | ||
22 | |||
diff --git a/tools/testing/selftests/rcutorture/configs/v3.3/P5-U-T-NH-sd-SMP-hp b/tools/testing/selftests/rcutorture/configs/v3.3/P5-U-T-NH-sd-SMP-hp new file mode 100644 index 000000000000..ef624ce73d8e --- /dev/null +++ b/tools/testing/selftests/rcutorture/configs/v3.3/P5-U-T-NH-sd-SMP-hp | |||
@@ -0,0 +1,28 @@ | |||
1 | CONFIG_RCU_TRACE=y | ||
2 | CONFIG_RCU_CPU_STALL_INFO=y | ||
3 | CONFIG_NO_HZ=y | ||
4 | CONFIG_SMP=y | ||
5 | CONFIG_RCU_FANOUT=6 | ||
6 | CONFIG_NR_CPUS=8 | ||
7 | CONFIG_RCU_FANOUT_EXACT=y | ||
8 | CONFIG_HOTPLUG_CPU=n | ||
9 | CONFIG_SUSPEND=n | ||
10 | CONFIG_HIBERNATION=n | ||
11 | CONFIG_PREEMPT_NONE=n | ||
12 | CONFIG_PREEMPT_VOLUNTARY=n | ||
13 | CONFIG_PREEMPT=y | ||
14 | #CHECK#CONFIG_TREE_PREEMPT_RCU=y | ||
15 | CONFIG_DEBUG_KERNEL=y | ||
16 | CONFIG_PROVE_RCU_DELAY=y | ||
17 | CONFIG_DEBUG_OBJECTS=y | ||
18 | CONFIG_DEBUG_OBJECTS_RCU_HEAD=y | ||
19 | CONFIG_RT_MUTEXES=y | ||
20 | CONFIG_RCU_BOOST=y | ||
21 | CONFIG_RCU_BOOST_PRIO=2 | ||
22 | CONFIG_RCU_TORTURE_TEST=m | ||
23 | CONFIG_MODULE_UNLOAD=y | ||
24 | CONFIG_SYSFS_DEPRECATED_V2=y | ||
25 | CONFIG_IKCONFIG=y | ||
26 | CONFIG_IKCONFIG_PROC=y | ||
27 | CONFIG_PRINTK_TIME=y | ||
28 | |||
diff --git a/tools/testing/selftests/rcutorture/configs/v3.3/PT1-nh b/tools/testing/selftests/rcutorture/configs/v3.3/PT1-nh new file mode 100644 index 000000000000..e3361c3894a1 --- /dev/null +++ b/tools/testing/selftests/rcutorture/configs/v3.3/PT1-nh | |||
@@ -0,0 +1,23 @@ | |||
1 | CONFIG_TINY_PREEMPT_RCU=y | ||
2 | CONFIG_RCU_BOOST=y | ||
3 | CONFIG_RCU_BOOST_PRIO=2 | ||
4 | CONFIG_RCU_TRACE=y | ||
5 | CONFIG_RCU_TORTURE_TEST=m | ||
6 | CONFIG_MODULE_UNLOAD=y | ||
7 | CONFIG_SUSPEND=n | ||
8 | CONFIG_HIBERNATION=n | ||
9 | # | ||
10 | CONFIG_SMP=n | ||
11 | # | ||
12 | CONFIG_HOTPLUG_CPU=n | ||
13 | # | ||
14 | CONFIG_NO_HZ=n | ||
15 | # | ||
16 | CONFIG_PREEMPT_NONE=n | ||
17 | CONFIG_PREEMPT_VOLUNTARY=n | ||
18 | CONFIG_PREEMPT=y | ||
19 | CONFIG_SYSFS_DEPRECATED_V2=y | ||
20 | CONFIG_IKCONFIG=y | ||
21 | CONFIG_IKCONFIG_PROC=y | ||
22 | CONFIG_PRINTK_TIME=y | ||
23 | |||
diff --git a/tools/testing/selftests/rcutorture/configs/v3.3/PT2-NH b/tools/testing/selftests/rcutorture/configs/v3.3/PT2-NH new file mode 100644 index 000000000000..64abfc3b4d94 --- /dev/null +++ b/tools/testing/selftests/rcutorture/configs/v3.3/PT2-NH | |||
@@ -0,0 +1,22 @@ | |||
1 | CONFIG_TINY_PREEMPT_RCU=y | ||
2 | CONFIG_RCU_TORTURE_TEST=m | ||
3 | CONFIG_MODULE_UNLOAD=y | ||
4 | CONFIG_SUSPEND=n | ||
5 | CONFIG_HIBERNATION=n | ||
6 | # | ||
7 | CONFIG_SMP=n | ||
8 | # | ||
9 | CONFIG_HOTPLUG_CPU=n | ||
10 | # | ||
11 | CONFIG_NO_HZ=y | ||
12 | # | ||
13 | CONFIG_PREEMPT_NONE=n | ||
14 | CONFIG_PREEMPT_VOLUNTARY=n | ||
15 | CONFIG_PREEMPT=y | ||
16 | CONFIG_PROVE_LOCKING=y | ||
17 | CONFIG_PROVE_RCU=y | ||
18 | CONFIG_SYSFS_DEPRECATED_V2=y | ||
19 | CONFIG_IKCONFIG=y | ||
20 | CONFIG_IKCONFIG_PROC=y | ||
21 | CONFIG_PRINTK_TIME=y | ||
22 | |||
diff --git a/tools/testing/selftests/rcutorture/configs/v3.3/ver_functions.sh b/tools/testing/selftests/rcutorture/configs/v3.3/ver_functions.sh new file mode 100644 index 000000000000..c37432f3572c --- /dev/null +++ b/tools/testing/selftests/rcutorture/configs/v3.3/ver_functions.sh | |||
@@ -0,0 +1,41 @@ | |||
1 | #!/bin/bash | ||
2 | # | ||
3 | # Kernel-version-dependent shell functions for the rest of the scripts. | ||
4 | # | ||
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. | ||
9 | # | ||
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. | ||
14 | # | ||
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. | ||
18 | # | ||
19 | # Copyright (C) IBM Corporation, 2013 | ||
20 | # | ||
21 | # Authors: Paul E. McKenney <paulmck@linux.vnet.ibm.com> | ||
22 | |||
23 | # rcutorture_param_n_barrier_cbs bootparam-string | ||
24 | # | ||
25 | # Adds n_barrier_cbs rcutorture module parameter to kernels having it. | ||
26 | rcutorture_param_n_barrier_cbs () { | ||
27 | echo $1 | ||
28 | } | ||
29 | |||
30 | # rcutorture_param_onoff bootparam-string config-file | ||
31 | # | ||
32 | # Adds onoff rcutorture module parameters to kernels having it. | ||
33 | rcutorture_param_onoff () { | ||
34 | if ! bootparam_hotplug_cpu "$1" && configfrag_hotplug_cpu "$2" | ||
35 | then | ||
36 | echo CPU-hotplug kernel, adding rcutorture onoff. | ||
37 | echo $1 rcutorture.onoff_interval=3 rcutorture.onoff_holdoff=30 | ||
38 | else | ||
39 | echo $1 | ||
40 | fi | ||
41 | } | ||
diff --git a/tools/testing/selftests/rcutorture/configs/v3.5/CFLIST b/tools/testing/selftests/rcutorture/configs/v3.5/CFLIST new file mode 100644 index 000000000000..18223947bbcb --- /dev/null +++ b/tools/testing/selftests/rcutorture/configs/v3.5/CFLIST | |||
@@ -0,0 +1,14 @@ | |||
1 | P1-S-T-NH-SD-SMP-HP | ||
2 | P2-2-t-nh-sd-SMP-hp | ||
3 | P3-3-T-nh-SD-SMP-hp | ||
4 | P4-A-t-NH-sd-SMP-HP | ||
5 | P5-U-T-NH-sd-SMP-hp | ||
6 | N1-S-T-NH-SD-SMP-HP | ||
7 | N2-2-t-nh-sd-SMP-hp | ||
8 | N3-3-T-nh-SD-SMP-hp | ||
9 | N4-A-t-NH-sd-SMP-HP | ||
10 | N5-U-T-NH-sd-SMP-hp | ||
11 | PT1-nh | ||
12 | PT2-NH | ||
13 | NT1-nh | ||
14 | NT3-NH | ||
diff --git a/tools/testing/selftests/rcutorture/configs/v3.5/N1-S-T-NH-SD-SMP-HP b/tools/testing/selftests/rcutorture/configs/v3.5/N1-S-T-NH-SD-SMP-HP new file mode 100644 index 000000000000..d81e11d280aa --- /dev/null +++ b/tools/testing/selftests/rcutorture/configs/v3.5/N1-S-T-NH-SD-SMP-HP | |||
@@ -0,0 +1,19 @@ | |||
1 | CONFIG_RCU_TRACE=y | ||
2 | CONFIG_RCU_FAST_NO_HZ=y | ||
3 | CONFIG_NO_HZ=y | ||
4 | CONFIG_SMP=y | ||
5 | CONFIG_RCU_FANOUT=8 | ||
6 | CONFIG_NR_CPUS=8 | ||
7 | CONFIG_RCU_FANOUT_EXACT=n | ||
8 | CONFIG_HOTPLUG_CPU=y | ||
9 | CONFIG_PREEMPT_NONE=y | ||
10 | CONFIG_PREEMPT_VOLUNTARY=n | ||
11 | CONFIG_PREEMPT=n | ||
12 | #CHECK#CONFIG_TREE_RCU=y | ||
13 | CONFIG_RCU_TORTURE_TEST=m | ||
14 | CONFIG_MODULE_UNLOAD=y | ||
15 | CONFIG_SYSFS_DEPRECATED_V2=y | ||
16 | CONFIG_IKCONFIG=y | ||
17 | CONFIG_IKCONFIG_PROC=y | ||
18 | CONFIG_PRINTK_TIME=y | ||
19 | |||
diff --git a/tools/testing/selftests/rcutorture/configs/v3.5/N2-2-t-nh-sd-SMP-hp b/tools/testing/selftests/rcutorture/configs/v3.5/N2-2-t-nh-sd-SMP-hp new file mode 100644 index 000000000000..02e418572b1b --- /dev/null +++ b/tools/testing/selftests/rcutorture/configs/v3.5/N2-2-t-nh-sd-SMP-hp | |||
@@ -0,0 +1,20 @@ | |||
1 | CONFIG_RCU_TRACE=n | ||
2 | CONFIG_NO_HZ=n | ||
3 | CONFIG_SMP=y | ||
4 | CONFIG_RCU_FANOUT=4 | ||
5 | CONFIG_NR_CPUS=8 | ||
6 | CONFIG_RCU_FANOUT_EXACT=n | ||
7 | CONFIG_HOTPLUG_CPU=n | ||
8 | CONFIG_SUSPEND=n | ||
9 | CONFIG_HIBERNATION=n | ||
10 | CONFIG_PREEMPT_NONE=y | ||
11 | CONFIG_PREEMPT_VOLUNTARY=n | ||
12 | CONFIG_PREEMPT=n | ||
13 | #CHECK#CONFIG_TREE_RCU=y | ||
14 | CONFIG_RCU_TORTURE_TEST=m | ||
15 | CONFIG_MODULE_UNLOAD=y | ||
16 | CONFIG_SYSFS_DEPRECATED_V2=y | ||
17 | CONFIG_IKCONFIG=y | ||
18 | CONFIG_IKCONFIG_PROC=y | ||
19 | CONFIG_PRINTK_TIME=y | ||
20 | |||
diff --git a/tools/testing/selftests/rcutorture/configs/v3.5/N3-3-T-nh-SD-SMP-hp b/tools/testing/selftests/rcutorture/configs/v3.5/N3-3-T-nh-SD-SMP-hp new file mode 100644 index 000000000000..b3100f69c8cf --- /dev/null +++ b/tools/testing/selftests/rcutorture/configs/v3.5/N3-3-T-nh-SD-SMP-hp | |||
@@ -0,0 +1,22 @@ | |||
1 | CONFIG_RCU_TRACE=y | ||
2 | CONFIG_NO_HZ=n | ||
3 | CONFIG_SMP=y | ||
4 | CONFIG_RCU_FANOUT=2 | ||
5 | CONFIG_NR_CPUS=8 | ||
6 | CONFIG_RCU_FANOUT_EXACT=n | ||
7 | CONFIG_HOTPLUG_CPU=n | ||
8 | CONFIG_SUSPEND=n | ||
9 | CONFIG_HIBERNATION=n | ||
10 | CONFIG_PREEMPT_NONE=y | ||
11 | CONFIG_PREEMPT_VOLUNTARY=n | ||
12 | CONFIG_PREEMPT=n | ||
13 | #CHECK#CONFIG_TREE_RCU=y | ||
14 | CONFIG_RCU_TORTURE_TEST=m | ||
15 | CONFIG_MODULE_UNLOAD=y | ||
16 | CONFIG_PROVE_LOCKING=y | ||
17 | CONFIG_PROVE_RCU=y | ||
18 | CONFIG_SYSFS_DEPRECATED_V2=y | ||
19 | CONFIG_IKCONFIG=y | ||
20 | CONFIG_IKCONFIG_PROC=y | ||
21 | CONFIG_PRINTK_TIME=y | ||
22 | |||
diff --git a/tools/testing/selftests/rcutorture/configs/v3.5/N4-A-t-NH-sd-SMP-HP b/tools/testing/selftests/rcutorture/configs/v3.5/N4-A-t-NH-sd-SMP-HP new file mode 100644 index 000000000000..c56b44530725 --- /dev/null +++ b/tools/testing/selftests/rcutorture/configs/v3.5/N4-A-t-NH-sd-SMP-HP | |||
@@ -0,0 +1,18 @@ | |||
1 | CONFIG_RCU_TRACE=n | ||
2 | CONFIG_NO_HZ=y | ||
3 | CONFIG_SMP=y | ||
4 | CONFIG_RCU_FANOUT=6 | ||
5 | CONFIG_NR_CPUS=8 | ||
6 | CONFIG_RCU_FANOUT_EXACT=n | ||
7 | CONFIG_HOTPLUG_CPU=y | ||
8 | CONFIG_PREEMPT_NONE=y | ||
9 | CONFIG_PREEMPT_VOLUNTARY=n | ||
10 | CONFIG_PREEMPT=n | ||
11 | #CHECK#CONFIG_TREE_RCU=y | ||
12 | CONFIG_RCU_TORTURE_TEST=m | ||
13 | CONFIG_MODULE_UNLOAD=y | ||
14 | CONFIG_SYSFS_DEPRECATED_V2=y | ||
15 | CONFIG_IKCONFIG=y | ||
16 | CONFIG_IKCONFIG_PROC=y | ||
17 | CONFIG_PRINTK_TIME=y | ||
18 | |||
diff --git a/tools/testing/selftests/rcutorture/configs/v3.5/N5-U-T-NH-sd-SMP-hp b/tools/testing/selftests/rcutorture/configs/v3.5/N5-U-T-NH-sd-SMP-hp new file mode 100644 index 000000000000..90d924fea9e9 --- /dev/null +++ b/tools/testing/selftests/rcutorture/configs/v3.5/N5-U-T-NH-sd-SMP-hp | |||
@@ -0,0 +1,22 @@ | |||
1 | CONFIG_RCU_TRACE=y | ||
2 | CONFIG_DEBUG_KERNEL=y | ||
3 | CONFIG_RCU_CPU_STALL_INFO=y | ||
4 | CONFIG_NO_HZ=y | ||
5 | CONFIG_SMP=y | ||
6 | CONFIG_RCU_FANOUT=6 | ||
7 | CONFIG_NR_CPUS=8 | ||
8 | CONFIG_RCU_FANOUT_EXACT=y | ||
9 | CONFIG_HOTPLUG_CPU=n | ||
10 | CONFIG_SUSPEND=n | ||
11 | CONFIG_HIBERNATION=n | ||
12 | CONFIG_PREEMPT_NONE=y | ||
13 | CONFIG_PREEMPT_VOLUNTARY=n | ||
14 | CONFIG_PREEMPT=n | ||
15 | #CHECK#CONFIG_TREE_RCU=y | ||
16 | CONFIG_RCU_TORTURE_TEST=m | ||
17 | CONFIG_MODULE_UNLOAD=y | ||
18 | CONFIG_SYSFS_DEPRECATED_V2=y | ||
19 | CONFIG_IKCONFIG=y | ||
20 | CONFIG_IKCONFIG_PROC=y | ||
21 | CONFIG_PRINTK_TIME=y | ||
22 | |||
diff --git a/tools/testing/selftests/rcutorture/configs/v3.5/NT1-nh b/tools/testing/selftests/rcutorture/configs/v3.5/NT1-nh new file mode 100644 index 000000000000..023f312a931c --- /dev/null +++ b/tools/testing/selftests/rcutorture/configs/v3.5/NT1-nh | |||
@@ -0,0 +1,23 @@ | |||
1 | #CHECK#CONFIG_TINY_RCU=y | ||
2 | CONFIG_RCU_TRACE=y | ||
3 | CONFIG_RCU_TORTURE_TEST=m | ||
4 | CONFIG_MODULE_UNLOAD=y | ||
5 | CONFIG_SUSPEND=n | ||
6 | CONFIG_HIBERNATION=n | ||
7 | # | ||
8 | CONFIG_SMP=n | ||
9 | # | ||
10 | CONFIG_HOTPLUG_CPU=n | ||
11 | # | ||
12 | CONFIG_NO_HZ=n | ||
13 | # | ||
14 | CONFIG_PREEMPT_NONE=y | ||
15 | CONFIG_PREEMPT_VOLUNTARY=n | ||
16 | CONFIG_PREEMPT=n | ||
17 | CONFIG_PROVE_LOCKING=y | ||
18 | CONFIG_PROVE_RCU=y | ||
19 | CONFIG_SYSFS_DEPRECATED_V2=y | ||
20 | CONFIG_IKCONFIG=y | ||
21 | CONFIG_IKCONFIG_PROC=y | ||
22 | CONFIG_PRINTK_TIME=y | ||
23 | |||
diff --git a/tools/testing/selftests/rcutorture/configs/v3.5/NT3-NH b/tools/testing/selftests/rcutorture/configs/v3.5/NT3-NH new file mode 100644 index 000000000000..6fd0235dae73 --- /dev/null +++ b/tools/testing/selftests/rcutorture/configs/v3.5/NT3-NH | |||
@@ -0,0 +1,20 @@ | |||
1 | #CHECK#CONFIG_TINY_RCU=y | ||
2 | CONFIG_RCU_TORTURE_TEST=m | ||
3 | CONFIG_MODULE_UNLOAD=y | ||
4 | CONFIG_SUSPEND=n | ||
5 | CONFIG_HIBERNATION=n | ||
6 | # | ||
7 | CONFIG_SMP=n | ||
8 | # | ||
9 | CONFIG_HOTPLUG_CPU=n | ||
10 | # | ||
11 | CONFIG_NO_HZ=y | ||
12 | # | ||
13 | CONFIG_PREEMPT_NONE=y | ||
14 | CONFIG_PREEMPT_VOLUNTARY=n | ||
15 | CONFIG_PREEMPT=n | ||
16 | CONFIG_SYSFS_DEPRECATED_V2=y | ||
17 | CONFIG_IKCONFIG=y | ||
18 | CONFIG_IKCONFIG_PROC=y | ||
19 | CONFIG_PRINTK_TIME=y | ||
20 | |||
diff --git a/tools/testing/selftests/rcutorture/configs/v3.5/P1-S-T-NH-SD-SMP-HP b/tools/testing/selftests/rcutorture/configs/v3.5/P1-S-T-NH-SD-SMP-HP new file mode 100644 index 000000000000..9647c44cf4b7 --- /dev/null +++ b/tools/testing/selftests/rcutorture/configs/v3.5/P1-S-T-NH-SD-SMP-HP | |||
@@ -0,0 +1,20 @@ | |||
1 | CONFIG_RCU_TRACE=y | ||
2 | CONFIG_RCU_CPU_STALL_INFO=y | ||
3 | CONFIG_NO_HZ=y | ||
4 | CONFIG_RCU_FAST_NO_HZ=y | ||
5 | CONFIG_SMP=y | ||
6 | CONFIG_RCU_FANOUT=8 | ||
7 | CONFIG_NR_CPUS=8 | ||
8 | CONFIG_RCU_FANOUT_EXACT=n | ||
9 | CONFIG_HOTPLUG_CPU=y | ||
10 | CONFIG_PREEMPT_NONE=n | ||
11 | CONFIG_PREEMPT_VOLUNTARY=n | ||
12 | CONFIG_PREEMPT=y | ||
13 | #CHECK#CONFIG_TREE_PREEMPT_RCU=y | ||
14 | CONFIG_RCU_TORTURE_TEST=m | ||
15 | CONFIG_MODULE_UNLOAD=y | ||
16 | CONFIG_SYSFS_DEPRECATED_V2=y | ||
17 | CONFIG_IKCONFIG=y | ||
18 | CONFIG_IKCONFIG_PROC=y | ||
19 | CONFIG_PRINTK_TIME=y | ||
20 | |||
diff --git a/tools/testing/selftests/rcutorture/configs/v3.5/P2-2-t-nh-sd-SMP-hp b/tools/testing/selftests/rcutorture/configs/v3.5/P2-2-t-nh-sd-SMP-hp new file mode 100644 index 000000000000..0f3b667d2a9f --- /dev/null +++ b/tools/testing/selftests/rcutorture/configs/v3.5/P2-2-t-nh-sd-SMP-hp | |||
@@ -0,0 +1,20 @@ | |||
1 | CONFIG_RCU_TRACE=n | ||
2 | CONFIG_NO_HZ=n | ||
3 | CONFIG_SMP=y | ||
4 | CONFIG_RCU_FANOUT=4 | ||
5 | CONFIG_NR_CPUS=8 | ||
6 | CONFIG_RCU_FANOUT_EXACT=n | ||
7 | CONFIG_HOTPLUG_CPU=n | ||
8 | CONFIG_SUSPEND=n | ||
9 | CONFIG_HIBERNATION=n | ||
10 | CONFIG_PREEMPT_NONE=n | ||
11 | CONFIG_PREEMPT_VOLUNTARY=n | ||
12 | CONFIG_PREEMPT=y | ||
13 | #CHECK#CONFIG_TREE_PREEMPT_RCU=y | ||
14 | CONFIG_RCU_TORTURE_TEST=m | ||
15 | CONFIG_MODULE_UNLOAD=y | ||
16 | CONFIG_SYSFS_DEPRECATED_V2=y | ||
17 | CONFIG_IKCONFIG=y | ||
18 | CONFIG_IKCONFIG_PROC=y | ||
19 | CONFIG_PRINTK_TIME=y | ||
20 | |||
diff --git a/tools/testing/selftests/rcutorture/configs/v3.5/P3-3-T-nh-SD-SMP-hp b/tools/testing/selftests/rcutorture/configs/v3.5/P3-3-T-nh-SD-SMP-hp new file mode 100644 index 000000000000..b035e141bf2a --- /dev/null +++ b/tools/testing/selftests/rcutorture/configs/v3.5/P3-3-T-nh-SD-SMP-hp | |||
@@ -0,0 +1,20 @@ | |||
1 | CONFIG_RCU_TRACE=y | ||
2 | CONFIG_NO_HZ=n | ||
3 | CONFIG_SMP=y | ||
4 | CONFIG_RCU_FANOUT=2 | ||
5 | CONFIG_NR_CPUS=8 | ||
6 | CONFIG_RCU_FANOUT_EXACT=n | ||
7 | CONFIG_HOTPLUG_CPU=n | ||
8 | CONFIG_SUSPEND=n | ||
9 | CONFIG_HIBERNATION=n | ||
10 | CONFIG_PREEMPT_NONE=n | ||
11 | CONFIG_PREEMPT_VOLUNTARY=n | ||
12 | CONFIG_PREEMPT=y | ||
13 | #CHECK#CONFIG_TREE_PREEMPT_RCU=y | ||
14 | CONFIG_RCU_TORTURE_TEST=m | ||
15 | CONFIG_MODULE_UNLOAD=y | ||
16 | CONFIG_SYSFS_DEPRECATED_V2=y | ||
17 | CONFIG_IKCONFIG=y | ||
18 | CONFIG_IKCONFIG_PROC=y | ||
19 | CONFIG_PRINTK_TIME=y | ||
20 | |||
diff --git a/tools/testing/selftests/rcutorture/configs/v3.5/P4-A-t-NH-sd-SMP-HP b/tools/testing/selftests/rcutorture/configs/v3.5/P4-A-t-NH-sd-SMP-HP new file mode 100644 index 000000000000..3ccf6a9447f5 --- /dev/null +++ b/tools/testing/selftests/rcutorture/configs/v3.5/P4-A-t-NH-sd-SMP-HP | |||
@@ -0,0 +1,22 @@ | |||
1 | CONFIG_RCU_TRACE=n | ||
2 | CONFIG_NO_HZ=y | ||
3 | CONFIG_SMP=y | ||
4 | CONFIG_RCU_FANOUT=6 | ||
5 | CONFIG_NR_CPUS=8 | ||
6 | CONFIG_RCU_FANOUT_EXACT=n | ||
7 | CONFIG_HOTPLUG_CPU=y | ||
8 | CONFIG_PREEMPT_NONE=n | ||
9 | CONFIG_PREEMPT_VOLUNTARY=n | ||
10 | CONFIG_PREEMPT=y | ||
11 | #CHECK#CONFIG_TREE_PREEMPT_RCU=y | ||
12 | CONFIG_RCU_TORTURE_TEST=m | ||
13 | CONFIG_MODULE_UNLOAD=y | ||
14 | CONFIG_RT_MUTEXES=y | ||
15 | CONFIG_RCU_BOOST=y | ||
16 | CONFIG_RCU_BOOST_PRIO=2 | ||
17 | CONFIG_PROVE_LOCKING=y | ||
18 | CONFIG_PROVE_RCU=y | ||
19 | CONFIG_IKCONFIG=y | ||
20 | CONFIG_IKCONFIG_PROC=y | ||
21 | CONFIG_PRINTK_TIME=y | ||
22 | |||
diff --git a/tools/testing/selftests/rcutorture/configs/v3.5/P5-U-T-NH-sd-SMP-hp b/tools/testing/selftests/rcutorture/configs/v3.5/P5-U-T-NH-sd-SMP-hp new file mode 100644 index 000000000000..ef624ce73d8e --- /dev/null +++ b/tools/testing/selftests/rcutorture/configs/v3.5/P5-U-T-NH-sd-SMP-hp | |||
@@ -0,0 +1,28 @@ | |||
1 | CONFIG_RCU_TRACE=y | ||
2 | CONFIG_RCU_CPU_STALL_INFO=y | ||
3 | CONFIG_NO_HZ=y | ||
4 | CONFIG_SMP=y | ||
5 | CONFIG_RCU_FANOUT=6 | ||
6 | CONFIG_NR_CPUS=8 | ||
7 | CONFIG_RCU_FANOUT_EXACT=y | ||
8 | CONFIG_HOTPLUG_CPU=n | ||
9 | CONFIG_SUSPEND=n | ||
10 | CONFIG_HIBERNATION=n | ||
11 | CONFIG_PREEMPT_NONE=n | ||
12 | CONFIG_PREEMPT_VOLUNTARY=n | ||
13 | CONFIG_PREEMPT=y | ||
14 | #CHECK#CONFIG_TREE_PREEMPT_RCU=y | ||
15 | CONFIG_DEBUG_KERNEL=y | ||
16 | CONFIG_PROVE_RCU_DELAY=y | ||
17 | CONFIG_DEBUG_OBJECTS=y | ||
18 | CONFIG_DEBUG_OBJECTS_RCU_HEAD=y | ||
19 | CONFIG_RT_MUTEXES=y | ||
20 | CONFIG_RCU_BOOST=y | ||
21 | CONFIG_RCU_BOOST_PRIO=2 | ||
22 | CONFIG_RCU_TORTURE_TEST=m | ||
23 | CONFIG_MODULE_UNLOAD=y | ||
24 | CONFIG_SYSFS_DEPRECATED_V2=y | ||
25 | CONFIG_IKCONFIG=y | ||
26 | CONFIG_IKCONFIG_PROC=y | ||
27 | CONFIG_PRINTK_TIME=y | ||
28 | |||
diff --git a/tools/testing/selftests/rcutorture/configs/v3.5/PT1-nh b/tools/testing/selftests/rcutorture/configs/v3.5/PT1-nh new file mode 100644 index 000000000000..e3361c3894a1 --- /dev/null +++ b/tools/testing/selftests/rcutorture/configs/v3.5/PT1-nh | |||
@@ -0,0 +1,23 @@ | |||
1 | CONFIG_TINY_PREEMPT_RCU=y | ||
2 | CONFIG_RCU_BOOST=y | ||
3 | CONFIG_RCU_BOOST_PRIO=2 | ||
4 | CONFIG_RCU_TRACE=y | ||
5 | CONFIG_RCU_TORTURE_TEST=m | ||
6 | CONFIG_MODULE_UNLOAD=y | ||
7 | CONFIG_SUSPEND=n | ||
8 | CONFIG_HIBERNATION=n | ||
9 | # | ||
10 | CONFIG_SMP=n | ||
11 | # | ||
12 | CONFIG_HOTPLUG_CPU=n | ||
13 | # | ||
14 | CONFIG_NO_HZ=n | ||
15 | # | ||
16 | CONFIG_PREEMPT_NONE=n | ||
17 | CONFIG_PREEMPT_VOLUNTARY=n | ||
18 | CONFIG_PREEMPT=y | ||
19 | CONFIG_SYSFS_DEPRECATED_V2=y | ||
20 | CONFIG_IKCONFIG=y | ||
21 | CONFIG_IKCONFIG_PROC=y | ||
22 | CONFIG_PRINTK_TIME=y | ||
23 | |||
diff --git a/tools/testing/selftests/rcutorture/configs/v3.5/PT2-NH b/tools/testing/selftests/rcutorture/configs/v3.5/PT2-NH new file mode 100644 index 000000000000..64abfc3b4d94 --- /dev/null +++ b/tools/testing/selftests/rcutorture/configs/v3.5/PT2-NH | |||
@@ -0,0 +1,22 @@ | |||
1 | CONFIG_TINY_PREEMPT_RCU=y | ||
2 | CONFIG_RCU_TORTURE_TEST=m | ||
3 | CONFIG_MODULE_UNLOAD=y | ||
4 | CONFIG_SUSPEND=n | ||
5 | CONFIG_HIBERNATION=n | ||
6 | # | ||
7 | CONFIG_SMP=n | ||
8 | # | ||
9 | CONFIG_HOTPLUG_CPU=n | ||
10 | # | ||
11 | CONFIG_NO_HZ=y | ||
12 | # | ||
13 | CONFIG_PREEMPT_NONE=n | ||
14 | CONFIG_PREEMPT_VOLUNTARY=n | ||
15 | CONFIG_PREEMPT=y | ||
16 | CONFIG_PROVE_LOCKING=y | ||
17 | CONFIG_PROVE_RCU=y | ||
18 | CONFIG_SYSFS_DEPRECATED_V2=y | ||
19 | CONFIG_IKCONFIG=y | ||
20 | CONFIG_IKCONFIG_PROC=y | ||
21 | CONFIG_PRINTK_TIME=y | ||
22 | |||
diff --git a/tools/testing/selftests/rcutorture/configs/v3.5/ver_functions.sh b/tools/testing/selftests/rcutorture/configs/v3.5/ver_functions.sh new file mode 100644 index 000000000000..6a5f13aab44d --- /dev/null +++ b/tools/testing/selftests/rcutorture/configs/v3.5/ver_functions.sh | |||
@@ -0,0 +1,46 @@ | |||
1 | #!/bin/bash | ||
2 | # | ||
3 | # Kernel-version-dependent shell functions for the rest of the scripts. | ||
4 | # | ||
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. | ||
9 | # | ||
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. | ||
14 | # | ||
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. | ||
18 | # | ||
19 | # Copyright (C) IBM Corporation, 2013 | ||
20 | # | ||
21 | # Authors: Paul E. McKenney <paulmck@linux.vnet.ibm.com> | ||
22 | |||
23 | # rcutorture_param_n_barrier_cbs bootparam-string | ||
24 | # | ||
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 | ||
29 | echo $1 | ||
30 | else | ||
31 | echo $1 rcutorture.n_barrier_cbs=4 | ||
32 | fi | ||
33 | } | ||
34 | |||
35 | # rcutorture_param_onoff bootparam-string config-file | ||
36 | # | ||
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. | ||
42 | echo $1 rcutorture.onoff_interval=3 rcutorture.onoff_holdoff=30 | ||
43 | else | ||
44 | echo $1 | ||
45 | fi | ||
46 | } | ||
diff --git a/tools/testing/selftests/rcutorture/configs/ver_functions.sh b/tools/testing/selftests/rcutorture/configs/ver_functions.sh new file mode 100644 index 000000000000..5e40eadea777 --- /dev/null +++ b/tools/testing/selftests/rcutorture/configs/ver_functions.sh | |||
@@ -0,0 +1,46 @@ | |||
1 | #!/bin/bash | ||
2 | # | ||
3 | # Kernel-version-dependent shell functions for the rest of the scripts. | ||
4 | # | ||
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. | ||
9 | # | ||
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. | ||
14 | # | ||
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. | ||
18 | # | ||
19 | # Copyright (C) IBM Corporation, 2013 | ||
20 | # | ||
21 | # Authors: Paul E. McKenney <paulmck@linux.vnet.ibm.com> | ||
22 | |||
23 | # rcutorture_param_n_barrier_cbs bootparam-string | ||
24 | # | ||
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 | ||
29 | echo $1 | ||
30 | else | ||
31 | echo $1 rcutorture.n_barrier_cbs=4 | ||
32 | fi | ||
33 | } | ||
34 | |||
35 | # rcutorture_param_onoff bootparam-string config-file | ||
36 | # | ||
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 $1 rcutorture.onoff_interval=3 rcutorture.onoff_holdoff=30 | ||
43 | else | ||
44 | echo $1 | ||
45 | fi | ||
46 | } | ||
diff --git a/tools/testing/selftests/rcutorture/doc/TINY_RCU.txt b/tools/testing/selftests/rcutorture/doc/TINY_RCU.txt new file mode 100644 index 000000000000..28db67b54e55 --- /dev/null +++ b/tools/testing/selftests/rcutorture/doc/TINY_RCU.txt | |||
@@ -0,0 +1,40 @@ | |||
1 | This document gives a brief rationale for the TINY_RCU test cases. | ||
2 | |||
3 | |||
4 | Kconfig Parameters: | ||
5 | |||
6 | CONFIG_DEBUG_LOCK_ALLOC -- Do all three and none of the three. | ||
7 | CONFIG_PREEMPT_COUNT | ||
8 | CONFIG_RCU_TRACE | ||
9 | |||
10 | The theory here is that randconfig testing will hit the other six possible | ||
11 | combinations of these parameters. | ||
12 | |||
13 | |||
14 | Kconfig Parameters Ignored: | ||
15 | |||
16 | CONFIG_DEBUG_OBJECTS_RCU_HEAD | ||
17 | CONFIG_PROVE_RCU | ||
18 | |||
19 | In common code tested by TREE_RCU test cases. | ||
20 | |||
21 | CONFIG_NO_HZ_FULL_SYSIDLE | ||
22 | CONFIG_RCU_NOCB_CPU | ||
23 | CONFIG_RCU_USER_QS | ||
24 | |||
25 | Meaningless for TINY_RCU. | ||
26 | |||
27 | CONFIG_RCU_STALL_COMMON | ||
28 | CONFIG_RCU_TORTURE_TEST | ||
29 | |||
30 | Redundant with CONFIG_RCU_TRACE. | ||
31 | |||
32 | CONFIG_HOTPLUG_CPU | ||
33 | CONFIG_PREEMPT | ||
34 | CONFIG_PREEMPT_RCU | ||
35 | CONFIG_SMP | ||
36 | CONFIG_TINY_RCU | ||
37 | CONFIG_TREE_PREEMPT_RCU | ||
38 | CONFIG_TREE_RCU | ||
39 | |||
40 | All forced by CONFIG_TINY_RCU. | ||
diff --git a/tools/testing/selftests/rcutorture/doc/TREE_RCU-Kconfig.txt b/tools/testing/selftests/rcutorture/doc/TREE_RCU-Kconfig.txt new file mode 100644 index 000000000000..adbb76cffb49 --- /dev/null +++ b/tools/testing/selftests/rcutorture/doc/TREE_RCU-Kconfig.txt | |||
@@ -0,0 +1,95 @@ | |||
1 | This document gives a brief rationale for the TREE_RCU-related test | ||
2 | cases, a group that includes TREE_PREEMPT_RCU. | ||
3 | |||
4 | |||
5 | Kconfig Parameters: | ||
6 | |||
7 | CONFIG_DEBUG_LOCK_ALLOC -- Do three, covering CONFIG_PROVE_LOCKING & not. | ||
8 | CONFIG_DEBUG_OBJECTS_RCU_HEAD -- Do one. | ||
9 | CONFIG_HOTPLUG_CPU -- Do half. (Every second.) | ||
10 | CONFIG_HZ_PERIODIC -- Do one. | ||
11 | CONFIG_NO_HZ_IDLE -- Do those not otherwise specified. (Groups of two.) | ||
12 | CONFIG_NO_HZ_FULL -- Do two, one with CONFIG_NO_HZ_FULL_SYSIDLE. | ||
13 | CONFIG_NO_HZ_FULL_SYSIDLE -- Do one. | ||
14 | CONFIG_PREEMPT -- Do half. (First three and #8.) | ||
15 | CONFIG_PROVE_LOCKING -- Do all but two, covering CONFIG_PROVE_RCU and not. | ||
16 | CONFIG_PROVE_RCU -- Do all but one under CONFIG_PROVE_LOCKING. | ||
17 | CONFIG_PROVE_RCU_DELAY -- Do one. | ||
18 | CONFIG_RCU_BOOST -- one of TREE_PREEMPT_RCU. | ||
19 | CONFIG_RCU_BOOST_PRIO -- set to 2 for _BOOST testing. | ||
20 | CONFIG_RCU_CPU_STALL_INFO -- do one with and without _VERBOSE. | ||
21 | CONFIG_RCU_CPU_STALL_VERBOSE -- do one with and without _INFO. | ||
22 | CONFIG_RCU_FANOUT -- Cover hierarchy as currently, but overlap with others. | ||
23 | CONFIG_RCU_FANOUT_EXACT -- Do one. | ||
24 | CONFIG_RCU_FANOUT_LEAF -- Do one non-default. | ||
25 | CONFIG_RCU_FAST_NO_HZ -- Do one, but not with CONFIG_RCU_NOCB_CPU_ALL. | ||
26 | CONFIG_RCU_NOCB_CPU -- Do three, see below. | ||
27 | CONFIG_RCU_NOCB_CPU_ALL -- Do one. | ||
28 | CONFIG_RCU_NOCB_CPU_NONE -- Do one. | ||
29 | CONFIG_RCU_NOCB_CPU_ZERO -- Do one. | ||
30 | CONFIG_RCU_TRACE -- Do half. | ||
31 | CONFIG_SMP -- Need one !SMP for TREE_PREEMPT_RCU. | ||
32 | RCU-bh: Do one with PREEMPT and one with !PREEMPT. | ||
33 | RCU-sched: Do one with PREEMPT but not BOOST. | ||
34 | |||
35 | |||
36 | Hierarchy: | ||
37 | |||
38 | TREE01. CONFIG_NR_CPUS=8, CONFIG_RCU_FANOUT=8, CONFIG_RCU_FANOUT_EXACT=n. | ||
39 | TREE02. CONFIG_NR_CPUS=8, CONFIG_RCU_FANOUT=3, CONFIG_RCU_FANOUT_EXACT=n, | ||
40 | CONFIG_RCU_FANOUT_LEAF=3. | ||
41 | TREE03. CONFIG_NR_CPUS=8, CONFIG_RCU_FANOUT=4, CONFIG_RCU_FANOUT_EXACT=n, | ||
42 | CONFIG_RCU_FANOUT_LEAF=4. | ||
43 | TREE04. CONFIG_NR_CPUS=8, CONFIG_RCU_FANOUT=2, CONFIG_RCU_FANOUT_EXACT=n, | ||
44 | CONFIG_RCU_FANOUT_LEAF=2. | ||
45 | TREE05. CONFIG_NR_CPUS=8, CONFIG_RCU_FANOUT=6, CONFIG_RCU_FANOUT_EXACT=n | ||
46 | CONFIG_RCU_FANOUT_LEAF=6. | ||
47 | TREE06. CONFIG_NR_CPUS=8, CONFIG_RCU_FANOUT=6, CONFIG_RCU_FANOUT_EXACT=y | ||
48 | CONFIG_RCU_FANOUT_LEAF=6. | ||
49 | TREE07. CONFIG_NR_CPUS=16, CONFIG_RCU_FANOUT=2, CONFIG_RCU_FANOUT_EXACT=n, | ||
50 | CONFIG_RCU_FANOUT_LEAF=2. | ||
51 | TREE08. CONFIG_NR_CPUS=16, CONFIG_RCU_FANOUT=3, CONFIG_RCU_FANOUT_EXACT=y, | ||
52 | CONFIG_RCU_FANOUT_LEAF=2. | ||
53 | TREE09. CONFIG_NR_CPUS=1. | ||
54 | |||
55 | |||
56 | Kconfig Parameters Ignored: | ||
57 | |||
58 | CONFIG_64BIT | ||
59 | |||
60 | Used only to check CONFIG_RCU_FANOUT value, inspection suffices. | ||
61 | |||
62 | CONFIG_NO_HZ_FULL_SYSIDLE_SMALL | ||
63 | |||
64 | Defer until Frederic uses this. | ||
65 | |||
66 | CONFIG_PREEMPT_COUNT | ||
67 | CONFIG_PREEMPT_RCU | ||
68 | |||
69 | Redundant with CONFIG_PREEMPT, ignore. | ||
70 | |||
71 | CONFIG_RCU_BOOST_DELAY | ||
72 | |||
73 | Inspection suffices, ignore. | ||
74 | |||
75 | CONFIG_RCU_CPU_STALL_TIMEOUT | ||
76 | |||
77 | Inspection suffices, ignore. | ||
78 | |||
79 | CONFIG_RCU_STALL_COMMON | ||
80 | |||
81 | Implied by TREE_RCU and TREE_PREEMPT_RCU. | ||
82 | |||
83 | CONFIG_RCU_TORTURE_TEST | ||
84 | CONFIG_RCU_TORTURE_TEST_RUNNABLE | ||
85 | |||
86 | Always used in KVM testing. | ||
87 | |||
88 | CONFIG_RCU_USER_QS | ||
89 | |||
90 | Redundant with CONFIG_NO_HZ_FULL. | ||
91 | |||
92 | CONFIG_TREE_PREEMPT_RCU | ||
93 | CONFIG_TREE_RCU | ||
94 | |||
95 | These are controlled by CONFIG_PREEMPT. | ||
diff --git a/tools/testing/selftests/rcutorture/doc/initrd.txt b/tools/testing/selftests/rcutorture/doc/initrd.txt new file mode 100644 index 000000000000..49d134c25c04 --- /dev/null +++ b/tools/testing/selftests/rcutorture/doc/initrd.txt | |||
@@ -0,0 +1,90 @@ | |||
1 | This document describes one way to create the initrd directory hierarchy | ||
2 | in order to allow an initrd to be built into your kernel. The trick | ||
3 | here is to steal the initrd file used on your Linux laptop, Ubuntu in | ||
4 | this case. There are probably much better ways of doing this. | ||
5 | |||
6 | That said, here are the commands: | ||
7 | |||
8 | ------------------------------------------------------------------------ | ||
9 | zcat /initrd.img > /tmp/initrd.img.zcat | ||
10 | mkdir initrd | ||
11 | cd initrd | ||
12 | cpio -id < /tmp/initrd.img.zcat | ||
13 | ------------------------------------------------------------------------ | ||
14 | |||
15 | Interestingly enough, if you are running rcutorture, you don't really | ||
16 | need userspace in many cases. Running without userspace has the | ||
17 | advantage of allowing you to test your kernel independently of the | ||
18 | distro in place, the root-filesystem layout, and so on. To make this | ||
19 | happen, put the following script in the initrd's tree's "/init" file, | ||
20 | with 0755 mode. | ||
21 | |||
22 | ------------------------------------------------------------------------ | ||
23 | #!/bin/sh | ||
24 | |||
25 | [ -d /dev ] || mkdir -m 0755 /dev | ||
26 | [ -d /root ] || mkdir -m 0700 /root | ||
27 | [ -d /sys ] || mkdir /sys | ||
28 | [ -d /proc ] || mkdir /proc | ||
29 | [ -d /tmp ] || mkdir /tmp | ||
30 | mkdir -p /var/lock | ||
31 | mount -t sysfs -o nodev,noexec,nosuid sysfs /sys | ||
32 | mount -t proc -o nodev,noexec,nosuid proc /proc | ||
33 | # Some things don't work properly without /etc/mtab. | ||
34 | ln -sf /proc/mounts /etc/mtab | ||
35 | |||
36 | # Note that this only becomes /dev on the real filesystem if udev's scripts | ||
37 | # are used; which they will be, but it's worth pointing out | ||
38 | if ! mount -t devtmpfs -o mode=0755 udev /dev; then | ||
39 | echo "W: devtmpfs not available, falling back to tmpfs for /dev" | ||
40 | mount -t tmpfs -o mode=0755 udev /dev | ||
41 | [ -e /dev/console ] || mknod --mode=600 /dev/console c 5 1 | ||
42 | [ -e /dev/kmsg ] || mknod --mode=644 /dev/kmsg c 1 11 | ||
43 | [ -e /dev/null ] || mknod --mode=666 /dev/null c 1 3 | ||
44 | fi | ||
45 | |||
46 | mkdir /dev/pts | ||
47 | mount -t devpts -o noexec,nosuid,gid=5,mode=0620 devpts /dev/pts || true | ||
48 | mount -t tmpfs -o "nosuid,size=20%,mode=0755" tmpfs /run | ||
49 | mkdir /run/initramfs | ||
50 | # compatibility symlink for the pre-oneiric locations | ||
51 | ln -s /run/initramfs /dev/.initramfs | ||
52 | |||
53 | # Export relevant variables | ||
54 | export ROOT= | ||
55 | export ROOTDELAY= | ||
56 | export ROOTFLAGS= | ||
57 | export ROOTFSTYPE= | ||
58 | export IP= | ||
59 | export BOOT= | ||
60 | export BOOTIF= | ||
61 | export UBIMTD= | ||
62 | export break= | ||
63 | export init=/sbin/init | ||
64 | export quiet=n | ||
65 | export readonly=y | ||
66 | export rootmnt=/root | ||
67 | export debug= | ||
68 | export panic= | ||
69 | export blacklist= | ||
70 | export resume= | ||
71 | export resume_offset= | ||
72 | export recovery= | ||
73 | |||
74 | for i in /sys/devices/system/cpu/cpu*/online | ||
75 | do | ||
76 | case $i in | ||
77 | '/sys/devices/system/cpu/cpu0/online') | ||
78 | ;; | ||
79 | '/sys/devices/system/cpu/cpu*/online') | ||
80 | ;; | ||
81 | *) | ||
82 | echo 1 > $i | ||
83 | ;; | ||
84 | esac | ||
85 | done | ||
86 | |||
87 | while : | ||
88 | do | ||
89 | sleep 10 | ||
90 | done | ||
diff --git a/tools/testing/selftests/rcutorture/doc/rcu-test-image.txt b/tools/testing/selftests/rcutorture/doc/rcu-test-image.txt new file mode 100644 index 000000000000..66efb59a1bd1 --- /dev/null +++ b/tools/testing/selftests/rcutorture/doc/rcu-test-image.txt | |||
@@ -0,0 +1,42 @@ | |||
1 | This document describes one way to created the rcu-test-image file | ||
2 | that contains the filesystem used by the guest-OS kernel. There are | ||
3 | probably much better ways of doing this, and this filesystem could no | ||
4 | doubt be smaller. It is probably also possible to simply download | ||
5 | an appropriate image from any number of places. | ||
6 | |||
7 | That said, here are the commands: | ||
8 | |||
9 | ------------------------------------------------------------------------ | ||
10 | dd if=/dev/zero of=rcu-test-image bs=400M count=1 | ||
11 | mkfs.ext3 ./rcu-test-image | ||
12 | sudo mount -o loop ./rcu-test-image /mnt | ||
13 | |||
14 | # Replace "precise" below with your favorite Ubuntu release. | ||
15 | # Empirical evidence says this image will work for 64-bit, but... | ||
16 | # Note that debootstrap does take a few minutes to run. Or longer. | ||
17 | sudo debootstrap --verbose --arch i386 precise /mnt http://archive.ubuntu.com/ubuntu | ||
18 | cat << '___EOF___' | sudo dd of=/mnt/etc/fstab | ||
19 | # UNCONFIGURED FSTAB FOR BASE SYSTEM | ||
20 | # | ||
21 | /dev/vda / ext3 defaults 1 1 | ||
22 | dev /dev tmpfs rw 0 0 | ||
23 | tmpfs /dev/shm tmpfs defaults 0 0 | ||
24 | devpts /dev/pts devpts gid=5,mode=620 0 0 | ||
25 | sysfs /sys sysfs defaults 0 0 | ||
26 | proc /proc proc defaults 0 0 | ||
27 | ___EOF___ | ||
28 | sudo umount /mnt | ||
29 | ------------------------------------------------------------------------ | ||
30 | |||
31 | |||
32 | References: | ||
33 | |||
34 | http://sripathikodi.blogspot.com/2010/02/creating-kvm-bootable-fedora-system.html | ||
35 | https://help.ubuntu.com/community/KVM/CreateGuests | ||
36 | https://help.ubuntu.com/community/JeOSVMBuilder | ||
37 | http://wiki.libvirt.org/page/UbuntuKVMWalkthrough | ||
38 | http://www.moe.co.uk/2011/01/07/pci_add_option_rom-failed-to-find-romfile-pxe-rtl8139-bin/ -- "apt-get install kvm-pxe" | ||
39 | http://www.landley.net/writing/rootfs-howto.html | ||
40 | http://en.wikipedia.org/wiki/Initrd | ||
41 | http://en.wikipedia.org/wiki/Cpio | ||
42 | http://wiki.libvirt.org/page/UbuntuKVMWalkthrough | ||