aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/rcu
diff options
context:
space:
mode:
authorPaul E. McKenney <paulmck@linux.vnet.ibm.com>2014-11-21 19:04:34 -0500
committerPaul E. McKenney <paulmck@linux.vnet.ibm.com>2015-01-10 22:08:00 -0500
commit1e32eaee4c370afca20324f634bf47ae991cd240 (patch)
tree9e35cb4edb1782e161a6ba17127ebd6d14687657 /kernel/rcu
parentc1fe9cde4ae904fffb5b4d975d0a37e99136ff50 (diff)
rcutorture: Drop rcu_torture_completed() and friends
Now that the return type of rcu_batches_completed() and friends matches that of the rcu_torture_ops structure's ->completed field, the wrapper functions can be deleted. This commit carries out that deletion, while also wiring "sched"'s ->completed field to rcu_batches_completed_sched(). Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Diffstat (limited to 'kernel/rcu')
-rw-r--r--kernel/rcu/rcutorture.c16
1 files changed, 3 insertions, 13 deletions
diff --git a/kernel/rcu/rcutorture.c b/kernel/rcu/rcutorture.c
index f43e3517f5f5..aadbc072ccf4 100644
--- a/kernel/rcu/rcutorture.c
+++ b/kernel/rcu/rcutorture.c
@@ -296,11 +296,6 @@ static void rcu_torture_read_unlock(int idx) __releases(RCU)
296 rcu_read_unlock(); 296 rcu_read_unlock();
297} 297}
298 298
299static unsigned long rcu_torture_completed(void)
300{
301 return rcu_batches_completed();
302}
303
304/* 299/*
305 * Update callback in the pipe. This should be invoked after a grace period. 300 * Update callback in the pipe. This should be invoked after a grace period.
306 */ 301 */
@@ -377,7 +372,7 @@ static struct rcu_torture_ops rcu_ops = {
377 .readlock = rcu_torture_read_lock, 372 .readlock = rcu_torture_read_lock,
378 .read_delay = rcu_read_delay, 373 .read_delay = rcu_read_delay,
379 .readunlock = rcu_torture_read_unlock, 374 .readunlock = rcu_torture_read_unlock,
380 .completed = rcu_torture_completed, 375 .completed = rcu_batches_completed,
381 .deferred_free = rcu_torture_deferred_free, 376 .deferred_free = rcu_torture_deferred_free,
382 .sync = synchronize_rcu, 377 .sync = synchronize_rcu,
383 .exp_sync = synchronize_rcu_expedited, 378 .exp_sync = synchronize_rcu_expedited,
@@ -407,11 +402,6 @@ static void rcu_bh_torture_read_unlock(int idx) __releases(RCU_BH)
407 rcu_read_unlock_bh(); 402 rcu_read_unlock_bh();
408} 403}
409 404
410static unsigned long rcu_bh_torture_completed(void)
411{
412 return rcu_batches_completed_bh();
413}
414
415static void rcu_bh_torture_deferred_free(struct rcu_torture *p) 405static void rcu_bh_torture_deferred_free(struct rcu_torture *p)
416{ 406{
417 call_rcu_bh(&p->rtort_rcu, rcu_torture_cb); 407 call_rcu_bh(&p->rtort_rcu, rcu_torture_cb);
@@ -423,7 +413,7 @@ static struct rcu_torture_ops rcu_bh_ops = {
423 .readlock = rcu_bh_torture_read_lock, 413 .readlock = rcu_bh_torture_read_lock,
424 .read_delay = rcu_read_delay, /* just reuse rcu's version. */ 414 .read_delay = rcu_read_delay, /* just reuse rcu's version. */
425 .readunlock = rcu_bh_torture_read_unlock, 415 .readunlock = rcu_bh_torture_read_unlock,
426 .completed = rcu_bh_torture_completed, 416 .completed = rcu_batches_completed_bh,
427 .deferred_free = rcu_bh_torture_deferred_free, 417 .deferred_free = rcu_bh_torture_deferred_free,
428 .sync = synchronize_rcu_bh, 418 .sync = synchronize_rcu_bh,
429 .exp_sync = synchronize_rcu_bh_expedited, 419 .exp_sync = synchronize_rcu_bh_expedited,
@@ -600,7 +590,7 @@ static struct rcu_torture_ops sched_ops = {
600 .readlock = sched_torture_read_lock, 590 .readlock = sched_torture_read_lock,
601 .read_delay = rcu_read_delay, /* just reuse rcu's version. */ 591 .read_delay = rcu_read_delay, /* just reuse rcu's version. */
602 .readunlock = sched_torture_read_unlock, 592 .readunlock = sched_torture_read_unlock,
603 .completed = rcu_no_completed, 593 .completed = rcu_batches_completed_sched,
604 .deferred_free = rcu_sched_torture_deferred_free, 594 .deferred_free = rcu_sched_torture_deferred_free,
605 .sync = synchronize_sched, 595 .sync = synchronize_sched,
606 .exp_sync = synchronize_sched_expedited, 596 .exp_sync = synchronize_sched_expedited,