aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/rcu/rcuperf.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/rcu/rcuperf.c')
-rw-r--r--kernel/rcu/rcuperf.c17
1 files changed, 1 insertions, 16 deletions
diff --git a/kernel/rcu/rcuperf.c b/kernel/rcu/rcuperf.c
index 3cc18110b612..1f87a02c3399 100644
--- a/kernel/rcu/rcuperf.c
+++ b/kernel/rcu/rcuperf.c
@@ -317,8 +317,6 @@ static struct rcu_perf_ops sched_ops = {
317 .name = "sched" 317 .name = "sched"
318}; 318};
319 319
320#ifdef CONFIG_TASKS_RCU
321
322/* 320/*
323 * Definitions for RCU-tasks perf testing. 321 * Definitions for RCU-tasks perf testing.
324 */ 322 */
@@ -346,24 +344,11 @@ static struct rcu_perf_ops tasks_ops = {
346 .name = "tasks" 344 .name = "tasks"
347}; 345};
348 346
349#define RCUPERF_TASKS_OPS &tasks_ops,
350
351static bool __maybe_unused torturing_tasks(void) 347static bool __maybe_unused torturing_tasks(void)
352{ 348{
353 return cur_ops == &tasks_ops; 349 return cur_ops == &tasks_ops;
354} 350}
355 351
356#else /* #ifdef CONFIG_TASKS_RCU */
357
358#define RCUPERF_TASKS_OPS
359
360static bool __maybe_unused torturing_tasks(void)
361{
362 return false;
363}
364
365#endif /* #else #ifdef CONFIG_TASKS_RCU */
366
367/* 352/*
368 * If performance tests complete, wait for shutdown to commence. 353 * If performance tests complete, wait for shutdown to commence.
369 */ 354 */
@@ -658,7 +643,7 @@ rcu_perf_init(void)
658 int firsterr = 0; 643 int firsterr = 0;
659 static struct rcu_perf_ops *perf_ops[] = { 644 static struct rcu_perf_ops *perf_ops[] = {
660 &rcu_ops, &rcu_bh_ops, &srcu_ops, &srcud_ops, &sched_ops, 645 &rcu_ops, &rcu_bh_ops, &srcu_ops, &srcud_ops, &sched_ops,
661 RCUPERF_TASKS_OPS 646 &tasks_ops,
662 }; 647 };
663 648
664 if (!torture_init_begin(perf_type, verbose, &perf_runnable)) 649 if (!torture_init_begin(perf_type, verbose, &perf_runnable))