blob: 74d9fc20531324fb302dae772bf88cdf2acd2864 [file] [log] [blame]
Paul E. McKenney29c00b42011-06-17 15:53:19 -07001/*
2 * Read-Copy Update definitions shared among RCU implementations.
3 *
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
Paul E. McKenney87de1cf2013-12-03 10:02:52 -080015 * along with this program; if not, you can access it online at
16 * http://www.gnu.org/licenses/gpl-2.0.html.
Paul E. McKenney29c00b42011-06-17 15:53:19 -070017 *
18 * Copyright IBM Corporation, 2011
19 *
20 * Author: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
21 */
22
23#ifndef __LINUX_RCU_H
24#define __LINUX_RCU_H
25
Paul Gortmaker5cb5c6e2014-02-19 14:33:27 -050026#include <trace/events/rcu.h>
Paul E. McKenneye99033c2011-06-21 00:13:44 -070027#ifdef CONFIG_RCU_TRACE
28#define RCU_TRACE(stmt) stmt
29#else /* #ifdef CONFIG_RCU_TRACE */
30#define RCU_TRACE(stmt)
31#endif /* #else #ifdef CONFIG_RCU_TRACE */
32
Paul E. McKenney29c00b42011-06-17 15:53:19 -070033/*
Paul E. McKenney4145fa72011-10-31 15:01:54 -070034 * Process-level increment to ->dynticks_nesting field. This allows for
35 * architectures that use half-interrupts and half-exceptions from
36 * process context.
Paul E. McKenney29e37d82011-11-17 16:55:56 -080037 *
38 * DYNTICK_TASK_NEST_MASK defines a field of width DYNTICK_TASK_NEST_WIDTH
39 * that counts the number of process-based reasons why RCU cannot
40 * consider the corresponding CPU to be idle, and DYNTICK_TASK_NEST_VALUE
41 * is the value used to increment or decrement this field.
42 *
43 * The rest of the bits could in principle be used to count interrupts,
44 * but this would mean that a negative-one value in the interrupt
45 * field could incorrectly zero out the DYNTICK_TASK_NEST_MASK field.
46 * We therefore provide a two-bit guard field defined by DYNTICK_TASK_MASK
47 * that is set to DYNTICK_TASK_FLAG upon initial exit from idle.
48 * The DYNTICK_TASK_EXIT_IDLE value is thus the combined value used upon
49 * initial exit from idle.
Paul E. McKenney4145fa72011-10-31 15:01:54 -070050 */
Paul E. McKenney29e37d82011-11-17 16:55:56 -080051#define DYNTICK_TASK_NEST_WIDTH 7
52#define DYNTICK_TASK_NEST_VALUE ((LLONG_MAX >> DYNTICK_TASK_NEST_WIDTH) + 1)
53#define DYNTICK_TASK_NEST_MASK (LLONG_MAX - DYNTICK_TASK_NEST_VALUE + 1)
54#define DYNTICK_TASK_FLAG ((DYNTICK_TASK_NEST_VALUE / 8) * 2)
55#define DYNTICK_TASK_MASK ((DYNTICK_TASK_NEST_VALUE / 8) * 3)
56#define DYNTICK_TASK_EXIT_IDLE (DYNTICK_TASK_NEST_VALUE + \
57 DYNTICK_TASK_FLAG)
Paul E. McKenney4145fa72011-10-31 15:01:54 -070058
Paul E. McKenney2e8c28c2017-02-20 14:57:17 -080059
60/*
61 * Grace-period counter management.
62 */
63
Paul E. McKenneyf1ec57a2017-03-21 10:35:57 -070064#define RCU_SEQ_CTR_SHIFT 2
Paul E. McKenney031aeee2017-03-21 07:28:14 -070065#define RCU_SEQ_STATE_MASK ((1 << RCU_SEQ_CTR_SHIFT) - 1)
66
67/*
68 * Return the counter portion of a sequence number previously returned
69 * by rcu_seq_snap() or rcu_seq_current().
70 */
71static inline unsigned long rcu_seq_ctr(unsigned long s)
72{
73 return s >> RCU_SEQ_CTR_SHIFT;
74}
75
76/*
77 * Return the state portion of a sequence number previously returned
78 * by rcu_seq_snap() or rcu_seq_current().
79 */
80static inline int rcu_seq_state(unsigned long s)
81{
82 return s & RCU_SEQ_STATE_MASK;
83}
84
Paul E. McKenney80a79562017-03-22 15:26:18 -070085/*
86 * Set the state portion of the pointed-to sequence number.
87 * The caller is responsible for preventing conflicting updates.
88 */
89static inline void rcu_seq_set_state(unsigned long *sp, int newstate)
90{
91 WARN_ON_ONCE(newstate & ~RCU_SEQ_STATE_MASK);
92 WRITE_ONCE(*sp, (*sp & ~RCU_SEQ_STATE_MASK) + newstate);
93}
94
Paul E. McKenney2e8c28c2017-02-20 14:57:17 -080095/* Adjust sequence number for start of update-side operation. */
96static inline void rcu_seq_start(unsigned long *sp)
97{
98 WRITE_ONCE(*sp, *sp + 1);
99 smp_mb(); /* Ensure update-side operation after counter increment. */
Paul E. McKenney031aeee2017-03-21 07:28:14 -0700100 WARN_ON_ONCE(rcu_seq_state(*sp) != 1);
Paul E. McKenney2e8c28c2017-02-20 14:57:17 -0800101}
102
103/* Adjust sequence number for end of update-side operation. */
104static inline void rcu_seq_end(unsigned long *sp)
105{
106 smp_mb(); /* Ensure update-side operation before counter increment. */
Paul E. McKenney031aeee2017-03-21 07:28:14 -0700107 WARN_ON_ONCE(!rcu_seq_state(*sp));
108 WRITE_ONCE(*sp, (*sp | RCU_SEQ_STATE_MASK) + 1);
Paul E. McKenney2e8c28c2017-02-20 14:57:17 -0800109}
110
111/* Take a snapshot of the update side's sequence number. */
112static inline unsigned long rcu_seq_snap(unsigned long *sp)
113{
114 unsigned long s;
115
Paul E. McKenney031aeee2017-03-21 07:28:14 -0700116 s = (READ_ONCE(*sp) + 2 * RCU_SEQ_STATE_MASK + 1) & ~RCU_SEQ_STATE_MASK;
Paul E. McKenney2e8c28c2017-02-20 14:57:17 -0800117 smp_mb(); /* Above access must not bleed into critical section. */
118 return s;
119}
120
Paul E. McKenney8660b7d2017-03-13 16:48:18 -0700121/* Return the current value the update side's sequence number, no ordering. */
122static inline unsigned long rcu_seq_current(unsigned long *sp)
123{
124 return READ_ONCE(*sp);
125}
126
Paul E. McKenney2e8c28c2017-02-20 14:57:17 -0800127/*
128 * Given a snapshot from rcu_seq_snap(), determine whether or not a
129 * full update-side operation has occurred.
130 */
131static inline bool rcu_seq_done(unsigned long *sp, unsigned long s)
132{
133 return ULONG_CMP_GE(READ_ONCE(*sp), s);
134}
135
Paul E. McKenney4145fa72011-10-31 15:01:54 -0700136/*
Paul E. McKenney29c00b42011-06-17 15:53:19 -0700137 * debug_rcu_head_queue()/debug_rcu_head_unqueue() are used internally
138 * by call_rcu() and rcu callback execution, and are therefore not part of the
139 * RCU API. Leaving in rcupdate.h because they are used by all RCU flavors.
140 */
141
142#ifdef CONFIG_DEBUG_OBJECTS_RCU_HEAD
143# define STATE_RCU_HEAD_READY 0
144# define STATE_RCU_HEAD_QUEUED 1
145
146extern struct debug_obj_descr rcuhead_debug_descr;
147
Paul E. McKenneyae150182013-04-23 13:20:57 -0700148static inline int debug_rcu_head_queue(struct rcu_head *head)
Paul E. McKenney29c00b42011-06-17 15:53:19 -0700149{
Paul E. McKenneyae150182013-04-23 13:20:57 -0700150 int r1;
151
152 r1 = debug_object_activate(head, &rcuhead_debug_descr);
Paul E. McKenney29c00b42011-06-17 15:53:19 -0700153 debug_object_active_state(head, &rcuhead_debug_descr,
154 STATE_RCU_HEAD_READY,
155 STATE_RCU_HEAD_QUEUED);
Paul E. McKenneyae150182013-04-23 13:20:57 -0700156 return r1;
Paul E. McKenney29c00b42011-06-17 15:53:19 -0700157}
158
159static inline void debug_rcu_head_unqueue(struct rcu_head *head)
160{
161 debug_object_active_state(head, &rcuhead_debug_descr,
162 STATE_RCU_HEAD_QUEUED,
163 STATE_RCU_HEAD_READY);
164 debug_object_deactivate(head, &rcuhead_debug_descr);
165}
166#else /* !CONFIG_DEBUG_OBJECTS_RCU_HEAD */
Paul E. McKenneyae150182013-04-23 13:20:57 -0700167static inline int debug_rcu_head_queue(struct rcu_head *head)
Paul E. McKenney29c00b42011-06-17 15:53:19 -0700168{
Paul E. McKenneyae150182013-04-23 13:20:57 -0700169 return 0;
Paul E. McKenney29c00b42011-06-17 15:53:19 -0700170}
171
172static inline void debug_rcu_head_unqueue(struct rcu_head *head)
173{
174}
175#endif /* #else !CONFIG_DEBUG_OBJECTS_RCU_HEAD */
176
Teodora Balutabd73a7f2013-11-11 17:11:24 +0200177void kfree(const void *);
Paul E. McKenney29c00b42011-06-17 15:53:19 -0700178
Paul E. McKenney406e3e52014-06-23 13:48:28 -0700179/*
180 * Reclaim the specified callback, either by invoking it (non-lazy case)
181 * or freeing it directly (lazy case). Return true if lazy, false otherwise.
182 */
Steven Rostedt (Red Hat)e66c33d2013-07-12 16:50:28 -0400183static inline bool __rcu_reclaim(const char *rn, struct rcu_head *head)
Paul E. McKenney29c00b42011-06-17 15:53:19 -0700184{
185 unsigned long offset = (unsigned long)head->func;
186
Paul E. McKenney24ef6592013-10-28 09:22:24 -0700187 rcu_lock_acquire(&rcu_callback_map);
Paul E. McKenney29c00b42011-06-17 15:53:19 -0700188 if (__is_kfree_rcu_offset(offset)) {
Paul E. McKenneydffd06a2017-01-23 11:55:43 -0800189 RCU_TRACE(trace_rcu_invoke_kfree_callback(rn, head, offset);)
Paul E. McKenney29c00b42011-06-17 15:53:19 -0700190 kfree((void *)head - offset);
Paul E. McKenney24ef6592013-10-28 09:22:24 -0700191 rcu_lock_release(&rcu_callback_map);
Paul E. McKenney406e3e52014-06-23 13:48:28 -0700192 return true;
Paul E. McKenney29c00b42011-06-17 15:53:19 -0700193 } else {
Paul E. McKenneydffd06a2017-01-23 11:55:43 -0800194 RCU_TRACE(trace_rcu_invoke_callback(rn, head);)
Paul E. McKenney29c00b42011-06-17 15:53:19 -0700195 head->func(head);
Paul E. McKenney24ef6592013-10-28 09:22:24 -0700196 rcu_lock_release(&rcu_callback_map);
Paul E. McKenney406e3e52014-06-23 13:48:28 -0700197 return false;
Paul E. McKenney29c00b42011-06-17 15:53:19 -0700198 }
199}
200
Paul E. McKenney6bfc09e2012-10-19 12:49:17 -0700201#ifdef CONFIG_RCU_STALL_COMMON
202
203extern int rcu_cpu_stall_suppress;
204int rcu_jiffies_till_stall_check(void);
205
206#endif /* #ifdef CONFIG_RCU_STALL_COMMON */
207
Paul E. McKenney0d752922013-08-17 18:08:37 -0700208/*
209 * Strings used in tracepoints need to be exported via the
210 * tracing system such that tools like perf and trace-cmd can
211 * translate the string address pointers to actual text.
212 */
213#define TPS(x) tracepoint_string(x)
214
Paul E. McKenneyb8989b72017-05-03 12:28:59 -0700215/*
216 * Dump the ftrace buffer, but only one time per callsite per boot.
217 */
218#define rcu_ftrace_dump(oops_dump_mode) \
219do { \
220 static atomic_t ___rfd_beenhere = ATOMIC_INIT(0); \
221 \
222 if (!atomic_read(&___rfd_beenhere) && \
223 !atomic_xchg(&___rfd_beenhere, 1)) \
224 ftrace_dump(oops_dump_mode); \
225} while (0)
226
Pranith Kumaraa23c6fbc2014-09-19 11:32:29 -0400227void rcu_early_boot_tests(void);
Paul E. McKenney52d7e482017-01-10 02:28:26 -0800228void rcu_test_sync_prims(void);
Pranith Kumaraa23c6fbc2014-09-19 11:32:29 -0400229
Lai Jiangshan5f6130f2014-12-09 17:53:34 +0800230/*
231 * This function really isn't for public consumption, but RCU is special in
232 * that context switches can allow the state machine to make progress.
233 */
234extern void resched_cpu(int cpu);
235
Paul E. McKenney2b34c432017-03-14 14:29:53 -0700236#if defined(SRCU) || !defined(TINY_RCU)
237
238#include <linux/rcu_node_tree.h>
239
240extern int rcu_num_lvls;
Paul E. McKenneye95d68d2017-03-15 13:11:11 -0700241extern int num_rcu_lvl[];
Paul E. McKenney2b34c432017-03-14 14:29:53 -0700242extern int rcu_num_nodes;
243static bool rcu_fanout_exact;
244static int rcu_fanout_leaf;
245
246/*
247 * Compute the per-level fanout, either using the exact fanout specified
248 * or balancing the tree, depending on the rcu_fanout_exact boot parameter.
249 */
250static inline void rcu_init_levelspread(int *levelspread, const int *levelcnt)
251{
252 int i;
253
254 if (rcu_fanout_exact) {
255 levelspread[rcu_num_lvls - 1] = rcu_fanout_leaf;
256 for (i = rcu_num_lvls - 2; i >= 0; i--)
257 levelspread[i] = RCU_FANOUT;
258 } else {
259 int ccur;
260 int cprv;
261
262 cprv = nr_cpu_ids;
263 for (i = rcu_num_lvls - 1; i >= 0; i--) {
264 ccur = levelcnt[i];
265 levelspread[i] = (cprv + ccur - 1) / ccur;
266 cprv = ccur;
267 }
268 }
269}
270
Paul E. McKenneyefbe4512017-03-15 13:07:53 -0700271/*
272 * Do a full breadth-first scan of the rcu_node structures for the
273 * specified rcu_state structure.
274 */
275#define rcu_for_each_node_breadth_first(rsp, rnp) \
276 for ((rnp) = &(rsp)->node[0]; \
277 (rnp) < &(rsp)->node[rcu_num_nodes]; (rnp)++)
278
279/*
280 * Do a breadth-first scan of the non-leaf rcu_node structures for the
281 * specified rcu_state structure. Note that if there is a singleton
282 * rcu_node tree with but one rcu_node structure, this loop is a no-op.
283 */
284#define rcu_for_each_nonleaf_node_breadth_first(rsp, rnp) \
285 for ((rnp) = &(rsp)->node[0]; \
286 (rnp) < (rsp)->level[rcu_num_lvls - 1]; (rnp)++)
287
288/*
289 * Scan the leaves of the rcu_node hierarchy for the specified rcu_state
290 * structure. Note that if there is a singleton rcu_node tree with but
291 * one rcu_node structure, this loop -will- visit the rcu_node structure.
292 * It is still a leaf node, even if it is also the root node.
293 */
294#define rcu_for_each_leaf_node(rsp, rnp) \
295 for ((rnp) = (rsp)->level[rcu_num_lvls - 1]; \
296 (rnp) < &(rsp)->node[rcu_num_nodes]; (rnp)++)
297
298/*
299 * Iterate over all possible CPUs in a leaf RCU node.
300 */
301#define for_each_leaf_node_possible_cpu(rnp, cpu) \
302 for ((cpu) = cpumask_next(rnp->grplo - 1, cpu_possible_mask); \
303 cpu <= rnp->grphi; \
304 cpu = cpumask_next((cpu), cpu_possible_mask))
305
Paul E. McKenney2b34c432017-03-14 14:29:53 -0700306#endif /* #if defined(SRCU) || !defined(TINY_RCU) */
307
Paul E. McKenney25c36322017-05-03 09:51:55 -0700308#ifdef CONFIG_TINY_RCU
309/* Tiny RCU doesn't expedite, as its purpose in life is instead to be tiny. */
310static inline bool rcu_gp_is_normal(void) /* Internal RCU use. */
311{
312 return true;
313}
314static inline bool rcu_gp_is_expedited(void) /* Internal RCU use. */
315{
316 return false;
317}
318
319static inline void rcu_expedite_gp(void)
320{
321}
322
323static inline void rcu_unexpedite_gp(void)
324{
325}
326#else /* #ifdef CONFIG_TINY_RCU */
327bool rcu_gp_is_normal(void); /* Internal RCU use. */
328bool rcu_gp_is_expedited(void); /* Internal RCU use. */
329void rcu_expedite_gp(void);
330void rcu_unexpedite_gp(void);
331void rcupdate_announce_bootup_oddness(void);
332#endif /* #else #ifdef CONFIG_TINY_RCU */
333
Paul E. McKenney82118242017-05-03 11:13:24 -0700334#define RCU_SCHEDULER_INACTIVE 0
335#define RCU_SCHEDULER_INIT 1
336#define RCU_SCHEDULER_RUNNING 2
337
Paul E. McKenneyfe21a272017-05-03 13:45:51 -0700338#ifdef CONFIG_TINY_RCU
339static inline void rcu_request_urgent_qs_task(struct task_struct *t) { }
340#else /* #ifdef CONFIG_TINY_RCU */
341void rcu_request_urgent_qs_task(struct task_struct *t);
342#endif /* #else #ifdef CONFIG_TINY_RCU */
343
Paul E. McKenneycad7b382017-05-03 10:22:57 -0700344enum rcutorture_type {
345 RCU_FLAVOR,
346 RCU_BH_FLAVOR,
347 RCU_SCHED_FLAVOR,
348 RCU_TASKS_FLAVOR,
349 SRCU_FLAVOR,
350 INVALID_RCU_FLAVOR
351};
352
353#if defined(CONFIG_TREE_RCU) || defined(CONFIG_PREEMPT_RCU)
354void rcutorture_get_gp_data(enum rcutorture_type test_type, int *flags,
355 unsigned long *gpnum, unsigned long *completed);
356void rcutorture_record_test_transition(void);
357void rcutorture_record_progress(unsigned long vernum);
358void do_trace_rcu_torture_read(const char *rcutorturename,
359 struct rcu_head *rhp,
360 unsigned long secs,
361 unsigned long c_old,
362 unsigned long c);
363#else
364static inline void rcutorture_get_gp_data(enum rcutorture_type test_type,
365 int *flags,
366 unsigned long *gpnum,
367 unsigned long *completed)
368{
369 *flags = 0;
370 *gpnum = 0;
371 *completed = 0;
372}
373static inline void rcutorture_record_test_transition(void)
374{
375}
376static inline void rcutorture_record_progress(unsigned long vernum)
377{
378}
379#ifdef CONFIG_RCU_TRACE
380void do_trace_rcu_torture_read(const char *rcutorturename,
381 struct rcu_head *rhp,
382 unsigned long secs,
383 unsigned long c_old,
384 unsigned long c);
385#else
386#define do_trace_rcu_torture_read(rcutorturename, rhp, secs, c_old, c) \
387 do { } while (0)
388#endif
389#endif
390
391#ifdef CONFIG_TINY_SRCU
392
393static inline void srcutorture_get_gp_data(enum rcutorture_type test_type,
394 struct srcu_struct *sp, int *flags,
395 unsigned long *gpnum,
396 unsigned long *completed)
397{
398 if (test_type != SRCU_FLAVOR)
399 return;
400 *flags = 0;
401 *completed = sp->srcu_gp_seq;
402 *gpnum = *completed;
403}
404
405#elif defined(CONFIG_TREE_SRCU)
406
407void srcutorture_get_gp_data(enum rcutorture_type test_type,
408 struct srcu_struct *sp, int *flags,
409 unsigned long *gpnum, unsigned long *completed);
410
411#elif defined(CONFIG_CLASSIC_SRCU)
412
413static inline void srcutorture_get_gp_data(enum rcutorture_type test_type,
414 struct srcu_struct *sp, int *flags,
415 unsigned long *gpnum,
416 unsigned long *completed)
417{
418 if (test_type != SRCU_FLAVOR)
419 return;
420 *flags = 0;
421 *completed = sp->completed;
422 *gpnum = *completed;
423 if (sp->batch_queue.head || sp->batch_check0.head || sp->batch_check0.head)
424 (*gpnum)++;
425}
426
427#endif
428
Paul E. McKenneye3c8d512017-05-03 13:37:16 -0700429#ifdef CONFIG_TINY_RCU
430
431/*
432 * Return the number of grace periods started.
433 */
434static inline unsigned long rcu_batches_started(void)
435{
436 return 0;
437}
438
439/*
440 * Return the number of bottom-half grace periods started.
441 */
442static inline unsigned long rcu_batches_started_bh(void)
443{
444 return 0;
445}
446
447/*
448 * Return the number of sched grace periods started.
449 */
450static inline unsigned long rcu_batches_started_sched(void)
451{
452 return 0;
453}
454
455/*
456 * Return the number of grace periods completed.
457 */
458static inline unsigned long rcu_batches_completed(void)
459{
460 return 0;
461}
462
463/*
464 * Return the number of bottom-half grace periods completed.
465 */
466static inline unsigned long rcu_batches_completed_bh(void)
467{
468 return 0;
469}
470
471/*
472 * Return the number of sched grace periods completed.
473 */
474static inline unsigned long rcu_batches_completed_sched(void)
475{
476 return 0;
477}
478
479/*
480 * Return the number of expedited grace periods completed.
481 */
482static inline unsigned long rcu_exp_batches_completed(void)
483{
484 return 0;
485}
486
487/*
488 * Return the number of expedited sched grace periods completed.
489 */
490static inline unsigned long rcu_exp_batches_completed_sched(void)
491{
492 return 0;
493}
494
Paul E. McKenney5a0465e2017-05-04 11:31:04 -0700495static inline unsigned long srcu_batches_completed(struct srcu_struct *sp)
496{
497 return 0;
498}
499
Paul E. McKenneye3c8d512017-05-03 13:37:16 -0700500static inline void rcu_force_quiescent_state(void)
501{
502}
503
504static inline void rcu_bh_force_quiescent_state(void)
505{
506}
507
508static inline void rcu_sched_force_quiescent_state(void)
509{
510}
511
512static inline void show_rcu_gp_kthreads(void)
513{
514}
515
516#else /* #ifdef CONFIG_TINY_RCU */
517extern unsigned long rcutorture_testseq;
518extern unsigned long rcutorture_vernum;
519unsigned long rcu_batches_started(void);
520unsigned long rcu_batches_started_bh(void);
521unsigned long rcu_batches_started_sched(void);
522unsigned long rcu_batches_completed(void);
523unsigned long rcu_batches_completed_bh(void);
524unsigned long rcu_batches_completed_sched(void);
525unsigned long rcu_exp_batches_completed(void);
526unsigned long rcu_exp_batches_completed_sched(void);
Paul E. McKenney5a0465e2017-05-04 11:31:04 -0700527unsigned long srcu_batches_completed(struct srcu_struct *sp);
Paul E. McKenneye3c8d512017-05-03 13:37:16 -0700528void show_rcu_gp_kthreads(void);
529void rcu_force_quiescent_state(void);
530void rcu_bh_force_quiescent_state(void);
531void rcu_sched_force_quiescent_state(void);
532#endif /* #else #ifdef CONFIG_TINY_RCU */
533
Paul E. McKenney3d54f792017-05-03 12:25:50 -0700534#if defined(CONFIG_RCU_NOCB_CPU_ALL)
535static inline bool rcu_is_nocb_cpu(int cpu) { return true; }
536#elif defined(CONFIG_RCU_NOCB_CPU)
537bool rcu_is_nocb_cpu(int cpu);
538#else
539static inline bool rcu_is_nocb_cpu(int cpu) { return false; }
540#endif
541
Paul E. McKenney29c00b42011-06-17 15:53:19 -0700542#endif /* __LINUX_RCU_H */