diff options
Diffstat (limited to 'kernel/rcutree_plugin.h')
-rw-r--r-- | kernel/rcutree_plugin.h | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/kernel/rcutree_plugin.h b/kernel/rcutree_plugin.h index a5745e9b5d5a..0cd91cc18db4 100644 --- a/kernel/rcutree_plugin.h +++ b/kernel/rcutree_plugin.h | |||
@@ -2167,7 +2167,7 @@ static int __init parse_rcu_nocb_poll(char *arg) | |||
2167 | early_param("rcu_nocb_poll", parse_rcu_nocb_poll); | 2167 | early_param("rcu_nocb_poll", parse_rcu_nocb_poll); |
2168 | 2168 | ||
2169 | /* Is the specified CPU a no-CPUs CPU? */ | 2169 | /* Is the specified CPU a no-CPUs CPU? */ |
2170 | static bool is_nocb_cpu(int cpu) | 2170 | bool rcu_is_nocb_cpu(int cpu) |
2171 | { | 2171 | { |
2172 | if (have_rcu_nocb_mask) | 2172 | if (have_rcu_nocb_mask) |
2173 | return cpumask_test_cpu(cpu, rcu_nocb_mask); | 2173 | return cpumask_test_cpu(cpu, rcu_nocb_mask); |
@@ -2225,7 +2225,7 @@ static bool __call_rcu_nocb(struct rcu_data *rdp, struct rcu_head *rhp, | |||
2225 | bool lazy) | 2225 | bool lazy) |
2226 | { | 2226 | { |
2227 | 2227 | ||
2228 | if (!is_nocb_cpu(rdp->cpu)) | 2228 | if (!rcu_is_nocb_cpu(rdp->cpu)) |
2229 | return 0; | 2229 | return 0; |
2230 | __call_rcu_nocb_enqueue(rdp, rhp, &rhp->next, 1, lazy); | 2230 | __call_rcu_nocb_enqueue(rdp, rhp, &rhp->next, 1, lazy); |
2231 | return 1; | 2231 | return 1; |
@@ -2242,7 +2242,7 @@ static bool __maybe_unused rcu_nocb_adopt_orphan_cbs(struct rcu_state *rsp, | |||
2242 | long qll = rsp->qlen_lazy; | 2242 | long qll = rsp->qlen_lazy; |
2243 | 2243 | ||
2244 | /* If this is not a no-CBs CPU, tell the caller to do it the old way. */ | 2244 | /* If this is not a no-CBs CPU, tell the caller to do it the old way. */ |
2245 | if (!is_nocb_cpu(smp_processor_id())) | 2245 | if (!rcu_is_nocb_cpu(smp_processor_id())) |
2246 | return 0; | 2246 | return 0; |
2247 | rsp->qlen = 0; | 2247 | rsp->qlen = 0; |
2248 | rsp->qlen_lazy = 0; | 2248 | rsp->qlen_lazy = 0; |
@@ -2282,7 +2282,7 @@ static bool nocb_cpu_expendable(int cpu) | |||
2282 | * If there are no no-CB CPUs or if this CPU is not a no-CB CPU, | 2282 | * If there are no no-CB CPUs or if this CPU is not a no-CB CPU, |
2283 | * then offlining this CPU is harmless. Let it happen. | 2283 | * then offlining this CPU is harmless. Let it happen. |
2284 | */ | 2284 | */ |
2285 | if (!have_rcu_nocb_mask || is_nocb_cpu(cpu)) | 2285 | if (!have_rcu_nocb_mask || rcu_is_nocb_cpu(cpu)) |
2286 | return 1; | 2286 | return 1; |
2287 | 2287 | ||
2288 | /* If no memory, play it safe and keep the CPU around. */ | 2288 | /* If no memory, play it safe and keep the CPU around. */ |
@@ -2464,11 +2464,6 @@ static void __init rcu_init_nocb(void) | |||
2464 | 2464 | ||
2465 | #else /* #ifdef CONFIG_RCU_NOCB_CPU */ | 2465 | #else /* #ifdef CONFIG_RCU_NOCB_CPU */ |
2466 | 2466 | ||
2467 | static bool is_nocb_cpu(int cpu) | ||
2468 | { | ||
2469 | return false; | ||
2470 | } | ||
2471 | |||
2472 | static bool __call_rcu_nocb(struct rcu_data *rdp, struct rcu_head *rhp, | 2467 | static bool __call_rcu_nocb(struct rcu_data *rdp, struct rcu_head *rhp, |
2473 | bool lazy) | 2468 | bool lazy) |
2474 | { | 2469 | { |