diff options
author | Paul E. McKenney <paulmck@linux.vnet.ibm.com> | 2015-01-21 19:58:06 -0500 |
---|---|---|
committer | Paul E. McKenney <paulmck@linux.vnet.ibm.com> | 2015-03-03 14:16:20 -0500 |
commit | ab6f5bd6741af7b157275de299b7b2b96f2df40e (patch) | |
tree | 50a452bd85220ea6fd3857f7b571892b594cb777 | |
parent | d24209bb689e2c7f7418faec9b4a948e922d24da (diff) |
rcu: Use IS_ENABLED() to simplify rcu_bootup_announce_oddness()
This commit gets rid of some inline #ifdefs by replacing them with
IS_ENABLED.
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
-rw-r--r-- | kernel/rcu/tree_plugin.h | 48 |
1 files changed, 20 insertions, 28 deletions
diff --git a/kernel/rcu/tree_plugin.h b/kernel/rcu/tree_plugin.h index 8a33920b8845..81c4d91fa18a 100644 --- a/kernel/rcu/tree_plugin.h +++ b/kernel/rcu/tree_plugin.h | |||
@@ -58,38 +58,30 @@ static bool __read_mostly rcu_nocb_poll; /* Offload kthread are to poll. */ | |||
58 | */ | 58 | */ |
59 | static void __init rcu_bootup_announce_oddness(void) | 59 | static void __init rcu_bootup_announce_oddness(void) |
60 | { | 60 | { |
61 | #ifdef CONFIG_RCU_TRACE | 61 | if (IS_ENABLED(CONFIG_RCU_TRACE)) |
62 | pr_info("\tRCU debugfs-based tracing is enabled.\n"); | 62 | pr_info("\tRCU debugfs-based tracing is enabled.\n"); |
63 | #endif | 63 | if ((IS_ENABLED(CONFIG_64BIT) && CONFIG_RCU_FANOUT != 64) || |
64 | #if (defined(CONFIG_64BIT) && CONFIG_RCU_FANOUT != 64) || (!defined(CONFIG_64BIT) && CONFIG_RCU_FANOUT != 32) | 64 | (!IS_ENABLED(CONFIG_64BIT) && CONFIG_RCU_FANOUT != 32)) |
65 | pr_info("\tCONFIG_RCU_FANOUT set to non-default value of %d\n", | 65 | pr_info("\tCONFIG_RCU_FANOUT set to non-default value of %d\n", |
66 | CONFIG_RCU_FANOUT); | 66 | CONFIG_RCU_FANOUT); |
67 | #endif | 67 | if (IS_ENABLED(CONFIG_RCU_FANOUT_EXACT)) |
68 | #ifdef CONFIG_RCU_FANOUT_EXACT | 68 | pr_info("\tHierarchical RCU autobalancing is disabled.\n"); |
69 | pr_info("\tHierarchical RCU autobalancing is disabled.\n"); | 69 | if (IS_ENABLED(CONFIG_RCU_FAST_NO_HZ)) |
70 | #endif | 70 | pr_info("\tRCU dyntick-idle grace-period acceleration is enabled.\n"); |
71 | #ifdef CONFIG_RCU_FAST_NO_HZ | 71 | if (IS_ENABLED(CONFIG_PROVE_RCU)) |
72 | pr_info("\tRCU dyntick-idle grace-period acceleration is enabled.\n"); | 72 | pr_info("\tRCU lockdep checking is enabled.\n"); |
73 | #endif | 73 | if (IS_ENABLED(CONFIG_RCU_TORTURE_TEST_RUNNABLE)) |
74 | #ifdef CONFIG_PROVE_RCU | 74 | pr_info("\tRCU torture testing starts during boot.\n"); |
75 | pr_info("\tRCU lockdep checking is enabled.\n"); | 75 | if (IS_ENABLED(CONFIG_RCU_CPU_STALL_INFO)) |
76 | #endif | 76 | pr_info("\tAdditional per-CPU info printed with stalls.\n"); |
77 | #ifdef CONFIG_RCU_TORTURE_TEST_RUNNABLE | 77 | if (NUM_RCU_LVL_4 != 0) |
78 | pr_info("\tRCU torture testing starts during boot.\n"); | 78 | pr_info("\tFour-level hierarchy is enabled.\n"); |
79 | #endif | ||
80 | #if defined(CONFIG_RCU_CPU_STALL_INFO) | ||
81 | pr_info("\tAdditional per-CPU info printed with stalls.\n"); | ||
82 | #endif | ||
83 | #if NUM_RCU_LVL_4 != 0 | ||
84 | pr_info("\tFour-level hierarchy is enabled.\n"); | ||
85 | #endif | ||
86 | if (rcu_fanout_leaf != CONFIG_RCU_FANOUT_LEAF) | 79 | if (rcu_fanout_leaf != CONFIG_RCU_FANOUT_LEAF) |
87 | pr_info("\tBoot-time adjustment of leaf fanout to %d.\n", rcu_fanout_leaf); | 80 | pr_info("\tBoot-time adjustment of leaf fanout to %d.\n", rcu_fanout_leaf); |
88 | if (nr_cpu_ids != NR_CPUS) | 81 | if (nr_cpu_ids != NR_CPUS) |
89 | pr_info("\tRCU restricting CPUs from NR_CPUS=%d to nr_cpu_ids=%d.\n", NR_CPUS, nr_cpu_ids); | 82 | pr_info("\tRCU restricting CPUs from NR_CPUS=%d to nr_cpu_ids=%d.\n", NR_CPUS, nr_cpu_ids); |
90 | #ifdef CONFIG_RCU_BOOST | 83 | if (IS_ENABLED(CONFIG_RCU_BOOST)) |
91 | pr_info("\tRCU kthread priority: %d.\n", kthread_prio); | 84 | pr_info("\tRCU kthread priority: %d.\n", kthread_prio); |
92 | #endif | ||
93 | } | 85 | } |
94 | 86 | ||
95 | #ifdef CONFIG_PREEMPT_RCU | 87 | #ifdef CONFIG_PREEMPT_RCU |