Pull RCU updates from Ingo Molnar: "The main RCU related changes in this cycle were: - Additional cleanups after RCU flavor consolidation - Grace-period forward-progress cleanups and improvements - Documentation updates - Miscellaneous fixes - spin_is_locked() conversions to lockdep - SPDX changes to RCU source and header files - SRCU updates - Torture-test updates, including nolibc updates and moving nolibc to tools/include" * 'core-rcu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (71 commits) locking/locktorture: Convert to SPDX license identifier linux/torture: Convert to SPDX license identifier torture: Convert to SPDX license identifier linux/srcu: Convert to SPDX license identifier linux/rcutree: Convert to SPDX license identifier linux/rcutiny: Convert to SPDX license identifier linux/rcu_sync: Convert to SPDX license identifier linux/rcu_segcblist: Convert to SPDX license identifier linux/rcupdate: Convert to SPDX license identifier linux/rcu_node_tree: Convert to SPDX license identifier rcu/update: Convert to SPDX license identifier rcu/tree: Convert to SPDX license identifier rcu/tiny: Convert to SPDX license identifier rcu/sync: Convert to SPDX license identifier rcu/srcu: Convert to SPDX license identifier rcu/rcutorture: Convert to SPDX license identifier rcu/rcu_segcblist: Convert to SPDX license identifier rcu/rcuperf: Convert to SPDX license identifier rcu/rcu.h: Convert to SPDX license identifier RCU/torture.txt: Remove section MODULE PARAMETERS ...
Showing the changes to include/linux (10 of 63 files). Show all
Unified · Split
| @@ -1,3 +1,4 @@ | ||
| 1 | +/* SPDX-License-Identifier: GPL-2.0+ */ | |
| 1 | 2 | /* |
| 2 | 3 | * RCU node combining tree definitions. These are used to compute |
| 3 | 4 | * global attributes while avoiding common-case global contention. A key |
| @@ -11,23 +12,9 @@ · 7 unmodified lines | ||
| 11 | 12 | * because the size of the TREE SRCU srcu_struct structure depends |
| 12 | 13 | * on these definitions. |
| 13 | 14 | * |
| 14 | − * This program is free software; you can redistribute it and/or modify | |
| 15 | − * it under the terms of the GNU General Public License as published by | |
| 16 | − * the Free Software Foundation; either version 2 of the License, or | |
| 17 | − * (at your option) any later version. | |
| 18 | − * | |
| 19 | − * This program is distributed in the hope that it will be useful, | |
| 20 | − * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| 21 | − * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
| 22 | − * GNU General Public License for more details. | |
| 23 | − * | |
| 24 | − * You should have received a copy of the GNU General Public License | |
| 25 | − * along with this program; if not, you can access it online at | |
| 26 | − * http://www.gnu.org/licenses/gpl-2.0.html. | |
| 27 | − * | |
| 28 | 15 | * Copyright IBM Corporation, 2017 |
| 29 | 16 | * |
| 30 | − * Author: Paul E. McKenney <paulmck@linux.vnet.ibm.com> | |
| 17 | + * Author: Paul E. McKenney <paulmck@linux.ibm.com> | |
| 31 | 18 | */ |
| 32 | 19 | |
| 33 | 20 | #ifndef __LINUX_RCU_NODE_TREE_H |
| @@ -1,3 +1,4 @@ | ||
| 1 | +/* SPDX-License-Identifier: GPL-2.0+ */ | |
| 1 | 2 | /* |
| 2 | 3 | * RCU segmented callback lists |
| 3 | 4 | * |
| @@ -5,23 +6,9 @@ · 1 unmodified line | ||
| 5 | 6 | * because the size of the TREE SRCU srcu_struct structure depends |
| 6 | 7 | * on these definitions. |
| 7 | 8 | * |
| 8 | − * This program is free software; you can redistribute it and/or modify | |
| 9 | − * it under the terms of the GNU General Public License as published by | |
| 10 | − * the Free Software Foundation; either version 2 of the License, or | |
| 11 | − * (at your option) any later version. | |
| 12 | − * | |
| 13 | − * This program is distributed in the hope that it will be useful, | |
| 14 | − * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| 15 | − * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
| 16 | − * GNU General Public License for more details. | |
| 17 | − * | |
| 18 | − * You should have received a copy of the GNU General Public License | |
| 19 | − * along with this program; if not, you can access it online at | |
| 20 | − * http://www.gnu.org/licenses/gpl-2.0.html. | |
| 21 | − * | |
| 22 | 9 | * Copyright IBM Corporation, 2017 |
| 23 | 10 | * |
| 24 | − * Authors: Paul E. McKenney <paulmck@linux.vnet.ibm.com> | |
| 11 | + * Authors: Paul E. McKenney <paulmck@linux.net.ibm.com> | |
| 25 | 12 | */ |
| 26 | 13 | |
| 27 | 14 | #ifndef __INCLUDE_LINUX_RCU_SEGCBLIST_H |
| @@ -1,20 +1,7 @@ | ||
| 1 | +/* SPDX-License-Identifier: GPL-2.0+ */ | |
| 1 | 2 | /* |
| 2 | 3 | * RCU-based infrastructure for lightweight reader-writer locking |
| 3 | 4 | * |
| 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 | 5 | * Copyright (c) 2015, Red Hat, Inc. |
| 19 | 6 | * |
| 20 | 7 | * Author: Oleg Nesterov <oleg@redhat.com> |
| @@ -1,25 +1,12 @@ | ||
| 1 | +/* SPDX-License-Identifier: GPL-2.0+ */ | |
| 1 | 2 | /* |
| 2 | 3 | * Read-Copy Update mechanism for mutual exclusion |
| 3 | 4 | * |
| 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 | 5 | * Copyright IBM Corporation, 2001 |
| 19 | 6 | * |
| 20 | 7 | * Author: Dipankar Sarma <dipankar@in.ibm.com> |
| 21 | 8 | * |
| 22 | − * Based on the original work by Paul McKenney <paulmck@us.ibm.com> | |
| 9 | + * Based on the original work by Paul McKenney <paulmck@vnet.ibm.com> | |
| 23 | 10 | * and inputs from Rusty Russell, Andrea Arcangeli and Andi Kleen. |
| 24 | 11 | * Papers: |
| 25 | 12 | * http://www.rdrop.com/users/paulmck/paper/rclockpdcsproof.pdf |
| @@ -89,7 +76,7 @@ static inline int rcu_preempt_depth(void) · 63 unmodified lines | ||
| 89 | 76 | /* Internal to kernel */ |
| 90 | 77 | void rcu_init(void); |
| 91 | 78 | extern int rcu_scheduler_active __read_mostly; |
| 92 | −void rcu_check_callbacks(int user); | |
| 79 | +void rcu_sched_clock_irq(int user); | |
| 93 | 80 | void rcu_report_dead(unsigned int cpu); |
| 94 | 81 | void rcutree_migrate_callbacks(int cpu); |
| 95 | 82 | |
| @@ -309,16 +296,16 @@ static inline void rcu_preempt_sleep_check(void) { } · 213 unmodified lines | ||
| 309 | 296 | */ |
| 310 | 297 | |
| 311 | 298 | #ifdef __CHECKER__ |
| 312 | −#define rcu_dereference_sparse(p, space) \ | |
| 299 | +#define rcu_check_sparse(p, space) \ | |
| 313 | 300 | ((void)(((typeof(*p) space *)p) == p)) |
| 314 | 301 | #else /* #ifdef __CHECKER__ */ |
| 315 | −#define rcu_dereference_sparse(p, space) | |
| 302 | +#define rcu_check_sparse(p, space) | |
| 316 | 303 | #endif /* #else #ifdef __CHECKER__ */ |
| 317 | 304 | |
| 318 | 305 | #define __rcu_access_pointer(p, space) \ |
| 319 | 306 | ({ \ |
| 320 | 307 | typeof(*p) *_________p1 = (typeof(*p) *__force)READ_ONCE(p); \ |
| 321 | − rcu_dereference_sparse(p, space); \ | |
| 308 | + rcu_check_sparse(p, space); \ | |
| 322 | 309 | ((typeof(*p) __force __kernel *)(_________p1)); \ |
| 323 | 310 | }) |
| 324 | 311 | #define __rcu_dereference_check(p, c, space) \ |
| @@ -326,13 +313,13 @@ static inline void rcu_preempt_sleep_check(void) { } · 1 unmodified line | ||
| 326 | 313 | /* Dependency order vs. p above. */ \ |
| 327 | 314 | typeof(*p) *________p1 = (typeof(*p) *__force)READ_ONCE(p); \ |
| 328 | 315 | RCU_LOCKDEP_WARN(!(c), "suspicious rcu_dereference_check() usage"); \ |
| 329 | − rcu_dereference_sparse(p, space); \ | |
| 316 | + rcu_check_sparse(p, space); \ | |
| 330 | 317 | ((typeof(*p) __force __kernel *)(________p1)); \ |
| 331 | 318 | }) |
| 332 | 319 | #define __rcu_dereference_protected(p, c, space) \ |
| 333 | 320 | ({ \ |
| 334 | 321 | RCU_LOCKDEP_WARN(!(c), "suspicious rcu_dereference_protected() usage"); \ |
| 335 | − rcu_dereference_sparse(p, space); \ | |
| 322 | + rcu_check_sparse(p, space); \ | |
| 336 | 323 | ((typeof(*p) __force __kernel *)(p)); \ |
| 337 | 324 | }) |
| 338 | 325 | #define rcu_dereference_raw(p) \ |
| @@ -382,6 +369,7 @@ static inline void rcu_preempt_sleep_check(void) { } · 43 unmodified lines | ||
| 382 | 369 | #define rcu_assign_pointer(p, v) \ |
| 383 | 370 | ({ \ |
| 384 | 371 | uintptr_t _r_a_p__v = (uintptr_t)(v); \ |
| 372 | + rcu_check_sparse(p, __rcu); \ | |
| 385 | 373 | \ |
| 386 | 374 | if (__builtin_constant_p(v) && (_r_a_p__v) == (uintptr_t)NULL) \ |
| 387 | 375 | WRITE_ONCE((p), (typeof(p))(_r_a_p__v)); \ |
| @@ -785,7 +773,7 @@ static inline notrace void rcu_read_unlock_sched_notrace(void) · 397 unmodified lines | ||
| 785 | 773 | */ |
| 786 | 774 | #define RCU_INIT_POINTER(p, v) \ |
| 787 | 775 | do { \ |
| 788 | − rcu_dereference_sparse(p, __rcu); \ | |
| 776 | + rcu_check_sparse(p, __rcu); \ | |
| 789 | 777 | WRITE_ONCE(p, RCU_INITIALIZER(v)); \ |
| 790 | 778 | } while (0) |
| 791 | 779 | |
| @@ -859,7 +847,7 @@ static inline notrace void rcu_read_unlock_sched_notrace(void) · 67 unmodified lines | ||
| 859 | 847 | |
| 860 | 848 | /* Has the specified rcu_head structure been handed to call_rcu()? */ |
| 861 | 849 | |
| 862 | −/* | |
| 850 | +/** | |
| 863 | 851 | * rcu_head_init - Initialize rcu_head for rcu_head_after_call_rcu() |
| 864 | 852 | * @rhp: The rcu_head structure to initialize. |
| 865 | 853 | * |
| @@ -874,10 +862,10 @@ static inline void rcu_head_init(struct rcu_head *rhp) · 8 unmodified lines | ||
| 874 | 862 | rhp->func = (rcu_callback_t)~0L; |
| 875 | 863 | } |
| 876 | 864 | |
| 877 | −/* | |
| 865 | +/** | |
| 878 | 866 | * rcu_head_after_call_rcu - Has this rcu_head been passed to call_rcu()? |
| 879 | 867 | * @rhp: The rcu_head structure to test. |
| 880 | − * @func: The function passed to call_rcu() along with @rhp. | |
| 868 | + * @f: The function passed to call_rcu() along with @rhp. | |
| 881 | 869 | * |
| 882 | 870 | * Returns @true if the @rhp has been passed to call_rcu() with @func, |
| 883 | 871 | * and @false otherwise. Emits a warning in any other case, including |
| @@ -896,57 +884,4 @@ rcu_head_after_call_rcu(struct rcu_head *rhp, rcu_callback_t f) · 12 unmodified lines | ||
| 896 | 884 | return false; |
| 897 | 885 | } |
| 898 | 886 | |
| 899 | − | |
| 900 | −/* Transitional pre-consolidation compatibility definitions. */ | |
| 901 | − | |
| 902 | −static inline void synchronize_rcu_bh(void) | |
| 903 | −{ | |
| 904 | − synchronize_rcu(); | |
| 905 | −} | |
| 906 | − | |
| 907 | −static inline void synchronize_rcu_bh_expedited(void) | |
| 908 | −{ | |
| 909 | − synchronize_rcu_expedited(); | |
| 910 | −} | |
| 911 | − | |
| 912 | −static inline void call_rcu_bh(struct rcu_head *head, rcu_callback_t func) | |
| 913 | −{ | |
| 914 | − call_rcu(head, func); | |
| 915 | −} | |
| 916 | − | |
| 917 | −static inline void rcu_barrier_bh(void) | |
| 918 | −{ | |
| 919 | − rcu_barrier(); | |
| 920 | −} | |
| 921 | − | |
| 922 | −static inline void synchronize_sched(void) | |
| 923 | −{ | |
| 924 | − synchronize_rcu(); | |
| 925 | −} | |
| 926 | − | |
| 927 | −static inline void synchronize_sched_expedited(void) | |
| 928 | −{ | |
| 929 | − synchronize_rcu_expedited(); | |
| 930 | −} | |
| 931 | − | |
| 932 | −static inline void call_rcu_sched(struct rcu_head *head, rcu_callback_t func) | |
| 933 | −{ | |
| 934 | − call_rcu(head, func); | |
| 935 | −} | |
| 936 | − | |
| 937 | −static inline void rcu_barrier_sched(void) | |
| 938 | −{ | |
| 939 | − rcu_barrier(); | |
| 940 | −} | |
| 941 | − | |
| 942 | −static inline unsigned long get_state_synchronize_sched(void) | |
| 943 | −{ | |
| 944 | − return get_state_synchronize_rcu(); | |
| 945 | −} | |
| 946 | − | |
| 947 | −static inline void cond_synchronize_sched(unsigned long oldstate) | |
| 948 | −{ | |
| 949 | − cond_synchronize_rcu(oldstate); | |
| 950 | −} | |
| 951 | − | |
| 952 | 887 | #endif /* __LINUX_RCUPDATE_H */ |
| @@ -1,23 +1,10 @@ | ||
| 1 | +/* SPDX-License-Identifier: GPL-2.0+ */ | |
| 1 | 2 | /* |
| 2 | 3 | * Read-Copy Update mechanism for mutual exclusion, the Bloatwatch edition. |
| 3 | 4 | * |
| 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 | 5 | * Copyright IBM Corporation, 2008 |
| 19 | 6 | * |
| 20 | − * Author: Paul E. McKenney <paulmck@linux.vnet.ibm.com> | |
| 7 | + * Author: Paul E. McKenney <paulmck@linux.ibm.com> | |
| 21 | 8 | * |
| 22 | 9 | * For detailed explanation of Read-Copy Update mechanism see - |
| 23 | 10 | * Documentation/RCU |
| @@ -1,26 +1,13 @@ | ||
| 1 | +/* SPDX-License-Identifier: GPL-2.0+ */ | |
| 1 | 2 | /* |
| 2 | 3 | * Read-Copy Update mechanism for mutual exclusion (tree-based version) |
| 3 | 4 | * |
| 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 | 5 | * Copyright IBM Corporation, 2008 |
| 19 | 6 | * |
| 20 | 7 | * Author: Dipankar Sarma <dipankar@in.ibm.com> |
| 21 | − * Paul E. McKenney <paulmck@linux.vnet.ibm.com> Hierarchical algorithm | |
| 8 | + * Paul E. McKenney <paulmck@linux.ibm.com> Hierarchical algorithm | |
| 22 | 9 | * |
| 23 | − * Based on the original work by Paul McKenney <paulmck@us.ibm.com> | |
| 10 | + * Based on the original work by Paul McKenney <paulmck@linux.ibm.com> | |
| 24 | 11 | * and inputs from Rusty Russell, Andrea Arcangeli and Andi Kleen. |
| 25 | 12 | * |
| 26 | 13 | * For detailed explanation of Read-Copy Update mechanism see - |
| @@ -1,24 +1,11 @@ | ||
| 1 | +/* SPDX-License-Identifier: GPL-2.0+ */ | |
| 1 | 2 | /* |
| 2 | 3 | * Sleepable Read-Copy Update mechanism for mutual exclusion |
| 3 | 4 | * |
| 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 | 5 | * Copyright (C) IBM Corporation, 2006 |
| 19 | 6 | * Copyright (C) Fujitsu, 2012 |
| 20 | 7 | * |
| 21 | − * Author: Paul McKenney <paulmck@us.ibm.com> | |
| 8 | + * Author: Paul McKenney <paulmck@linux.ibm.com> | |
| 22 | 9 | * Lai Jiangshan <laijs@cn.fujitsu.com> |
| 23 | 10 | * |
| 24 | 11 | * For detailed explanation of Read-Copy Update mechanism see - |
| @@ -223,6 +210,7 @@ srcu_read_lock_notrace(struct srcu_struct *ssp) __acquires(ssp) · 198 unmodified lines | ||
| 223 | 210 | static inline void srcu_read_unlock(struct srcu_struct *ssp, int idx) |
| 224 | 211 | __releases(ssp) |
| 225 | 212 | { |
| 213 | + WARN_ON_ONCE(idx & ~0x1); | |
| 226 | 214 | rcu_lock_release(&(ssp)->dep_map); |
| 227 | 215 | __srcu_read_unlock(ssp, idx); |
| 228 | 216 | } |
| @@ -1,24 +1,11 @@ | ||
| 1 | +/* SPDX-License-Identifier: GPL-2.0+ */ | |
| 1 | 2 | /* |
| 2 | 3 | * Sleepable Read-Copy Update mechanism for mutual exclusion, |
| 3 | 4 | * tiny variant. |
| 4 | 5 | * |
| 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 | 6 | * Copyright (C) IBM Corporation, 2017 |
| 20 | 7 | * |
| 21 | − * Author: Paul McKenney <paulmck@us.ibm.com> | |
| 8 | + * Author: Paul McKenney <paulmck@linux.ibm.com> | |
| 22 | 9 | */ |
| 23 | 10 | |
| 24 | 11 | #ifndef _LINUX_SRCU_TINY_H |
| @@ -1,24 +1,11 @@ | ||
| 1 | +/* SPDX-License-Identifier: GPL-2.0+ */ | |
| 1 | 2 | /* |
| 2 | 3 | * Sleepable Read-Copy Update mechanism for mutual exclusion, |
| 3 | 4 | * tree variant. |
| 4 | 5 | * |
| 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 | 6 | * Copyright (C) IBM Corporation, 2017 |
| 20 | 7 | * |
| 21 | − * Author: Paul McKenney <paulmck@us.ibm.com> | |
| 8 | + * Author: Paul McKenney <paulmck@linux.ibm.com> | |
| 22 | 9 | */ |
| 23 | 10 | |
| 24 | 11 | #ifndef _LINUX_SRCU_TREE_H |
| @@ -45,7 +32,8 @@ struct srcu_data { · 20 unmodified lines | ||
| 45 | 32 | unsigned long srcu_gp_seq_needed; /* Furthest future GP needed. */ |
| 46 | 33 | unsigned long srcu_gp_seq_needed_exp; /* Furthest future exp GP. */ |
| 47 | 34 | bool srcu_cblist_invoking; /* Invoking these CBs? */ |
| 48 | − struct delayed_work work; /* Context for CB invoking. */ | |
| 35 | + struct timer_list delay_work; /* Delay for CB invoking */ | |
| 36 | + struct work_struct work; /* Context for CB invoking. */ | |
| 49 | 37 | struct rcu_head srcu_barrier_head; /* For srcu_barrier() use. */ |
| 50 | 38 | struct srcu_node *mynode; /* Leaf srcu_node. */ |
| 51 | 39 | unsigned long grpmask; /* Mask for leaf srcu_node */ |
| @@ -1,23 +1,10 @@ | ||
| 1 | +/* SPDX-License-Identifier: GPL-2.0+ */ | |
| 1 | 2 | /* |
| 2 | 3 | * Common functions for in-kernel torture tests. |
| 3 | 4 | * |
| 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 | 5 | * Copyright IBM Corporation, 2014 |
| 19 | 6 | * |
| 20 | − * Author: Paul E. McKenney <paulmck@linux.vnet.ibm.com> | |
| 7 | + * Author: Paul E. McKenney <paulmck@linux.ibm.com> | |
| 21 | 8 | */ |
| 22 | 9 | |
| 23 | 10 | #ifndef __LINUX_TORTURE_H |
| @@ -50,11 +37,12 @@ · 26 unmodified lines | ||
| 50 | 37 | do { if (verbose) pr_alert("%s" TORTURE_FLAG "!!! %s\n", torture_type, s); } while (0) |
| 51 | 38 | |
| 52 | 39 | /* Definitions for online/offline exerciser. */ |
| 40 | +typedef void torture_ofl_func(void); | |
| 53 | 41 | bool torture_offline(int cpu, long *n_onl_attempts, long *n_onl_successes, |
| 54 | 42 | unsigned long *sum_offl, int *min_onl, int *max_onl); |
| 55 | 43 | bool torture_online(int cpu, long *n_onl_attempts, long *n_onl_successes, |
| 56 | 44 | unsigned long *sum_onl, int *min_onl, int *max_onl); |
| 57 | −int torture_onoff_init(long ooholdoff, long oointerval); | |
| 45 | +int torture_onoff_init(long ooholdoff, long oointerval, torture_ofl_func *f); | |
| 58 | 46 | void torture_onoff_stats(void); |
| 59 | 47 | bool torture_onoff_failures(void); |
| 60 | 48 | |