rcu.h 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551
  1. /*
  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
  15. * along with this program; if not, you can access it online at
  16. * http://www.gnu.org/licenses/gpl-2.0.html.
  17. *
  18. * Copyright IBM Corporation, 2011
  19. *
  20. * Author: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
  21. */
  22. #ifndef __LINUX_RCU_H
  23. #define __LINUX_RCU_H
  24. #include <trace/events/rcu.h>
  25. #ifdef CONFIG_RCU_TRACE
  26. #define RCU_TRACE(stmt) stmt
  27. #else /* #ifdef CONFIG_RCU_TRACE */
  28. #define RCU_TRACE(stmt)
  29. #endif /* #else #ifdef CONFIG_RCU_TRACE */
  30. /* Offset to allow for unmatched rcu_irq_{enter,exit}(). */
  31. #define DYNTICK_IRQ_NONIDLE ((LONG_MAX / 2) + 1)
  32. /*
  33. * Grace-period counter management.
  34. */
  35. #define RCU_SEQ_CTR_SHIFT 2
  36. #define RCU_SEQ_STATE_MASK ((1 << RCU_SEQ_CTR_SHIFT) - 1)
  37. /*
  38. * Return the counter portion of a sequence number previously returned
  39. * by rcu_seq_snap() or rcu_seq_current().
  40. */
  41. static inline unsigned long rcu_seq_ctr(unsigned long s)
  42. {
  43. return s >> RCU_SEQ_CTR_SHIFT;
  44. }
  45. /*
  46. * Return the state portion of a sequence number previously returned
  47. * by rcu_seq_snap() or rcu_seq_current().
  48. */
  49. static inline int rcu_seq_state(unsigned long s)
  50. {
  51. return s & RCU_SEQ_STATE_MASK;
  52. }
  53. /*
  54. * Set the state portion of the pointed-to sequence number.
  55. * The caller is responsible for preventing conflicting updates.
  56. */
  57. static inline void rcu_seq_set_state(unsigned long *sp, int newstate)
  58. {
  59. WARN_ON_ONCE(newstate & ~RCU_SEQ_STATE_MASK);
  60. WRITE_ONCE(*sp, (*sp & ~RCU_SEQ_STATE_MASK) + newstate);
  61. }
  62. /* Adjust sequence number for start of update-side operation. */
  63. static inline void rcu_seq_start(unsigned long *sp)
  64. {
  65. WRITE_ONCE(*sp, *sp + 1);
  66. smp_mb(); /* Ensure update-side operation after counter increment. */
  67. WARN_ON_ONCE(rcu_seq_state(*sp) != 1);
  68. }
  69. /* Compute the end-of-grace-period value for the specified sequence number. */
  70. static inline unsigned long rcu_seq_endval(unsigned long *sp)
  71. {
  72. return (*sp | RCU_SEQ_STATE_MASK) + 1;
  73. }
  74. /* Adjust sequence number for end of update-side operation. */
  75. static inline void rcu_seq_end(unsigned long *sp)
  76. {
  77. smp_mb(); /* Ensure update-side operation before counter increment. */
  78. WARN_ON_ONCE(!rcu_seq_state(*sp));
  79. WRITE_ONCE(*sp, rcu_seq_endval(sp));
  80. }
  81. /*
  82. * rcu_seq_snap - Take a snapshot of the update side's sequence number.
  83. *
  84. * This function returns the earliest value of the grace-period sequence number
  85. * that will indicate that a full grace period has elapsed since the current
  86. * time. Once the grace-period sequence number has reached this value, it will
  87. * be safe to invoke all callbacks that have been registered prior to the
  88. * current time. This value is the current grace-period number plus two to the
  89. * power of the number of low-order bits reserved for state, then rounded up to
  90. * the next value in which the state bits are all zero.
  91. */
  92. static inline unsigned long rcu_seq_snap(unsigned long *sp)
  93. {
  94. unsigned long s;
  95. s = (READ_ONCE(*sp) + 2 * RCU_SEQ_STATE_MASK + 1) & ~RCU_SEQ_STATE_MASK;
  96. smp_mb(); /* Above access must not bleed into critical section. */
  97. return s;
  98. }
  99. /* Return the current value the update side's sequence number, no ordering. */
  100. static inline unsigned long rcu_seq_current(unsigned long *sp)
  101. {
  102. return READ_ONCE(*sp);
  103. }
  104. /*
  105. * Given a snapshot from rcu_seq_snap(), determine whether or not the
  106. * corresponding update-side operation has started.
  107. */
  108. static inline bool rcu_seq_started(unsigned long *sp, unsigned long s)
  109. {
  110. return ULONG_CMP_LT((s - 1) & ~RCU_SEQ_STATE_MASK, READ_ONCE(*sp));
  111. }
  112. /*
  113. * Given a snapshot from rcu_seq_snap(), determine whether or not a
  114. * full update-side operation has occurred.
  115. */
  116. static inline bool rcu_seq_done(unsigned long *sp, unsigned long s)
  117. {
  118. return ULONG_CMP_GE(READ_ONCE(*sp), s);
  119. }
  120. /*
  121. * Has a grace period completed since the time the old gp_seq was collected?
  122. */
  123. static inline bool rcu_seq_completed_gp(unsigned long old, unsigned long new)
  124. {
  125. return ULONG_CMP_LT(old, new & ~RCU_SEQ_STATE_MASK);
  126. }
  127. /*
  128. * Has a grace period started since the time the old gp_seq was collected?
  129. */
  130. static inline bool rcu_seq_new_gp(unsigned long old, unsigned long new)
  131. {
  132. return ULONG_CMP_LT((old + RCU_SEQ_STATE_MASK) & ~RCU_SEQ_STATE_MASK,
  133. new);
  134. }
  135. /*
  136. * Roughly how many full grace periods have elapsed between the collection
  137. * of the two specified grace periods?
  138. */
  139. static inline unsigned long rcu_seq_diff(unsigned long new, unsigned long old)
  140. {
  141. unsigned long rnd_diff;
  142. if (old == new)
  143. return 0;
  144. /*
  145. * Compute the number of grace periods (still shifted up), plus
  146. * one if either of new and old is not an exact grace period.
  147. */
  148. rnd_diff = (new & ~RCU_SEQ_STATE_MASK) -
  149. ((old + RCU_SEQ_STATE_MASK) & ~RCU_SEQ_STATE_MASK) +
  150. ((new & RCU_SEQ_STATE_MASK) || (old & RCU_SEQ_STATE_MASK));
  151. if (ULONG_CMP_GE(RCU_SEQ_STATE_MASK, rnd_diff))
  152. return 1; /* Definitely no grace period has elapsed. */
  153. return ((rnd_diff - RCU_SEQ_STATE_MASK - 1) >> RCU_SEQ_CTR_SHIFT) + 2;
  154. }
  155. /*
  156. * debug_rcu_head_queue()/debug_rcu_head_unqueue() are used internally
  157. * by call_rcu() and rcu callback execution, and are therefore not part of the
  158. * RCU API. Leaving in rcupdate.h because they are used by all RCU flavors.
  159. */
  160. #ifdef CONFIG_DEBUG_OBJECTS_RCU_HEAD
  161. # define STATE_RCU_HEAD_READY 0
  162. # define STATE_RCU_HEAD_QUEUED 1
  163. extern struct debug_obj_descr rcuhead_debug_descr;
  164. static inline int debug_rcu_head_queue(struct rcu_head *head)
  165. {
  166. int r1;
  167. r1 = debug_object_activate(head, &rcuhead_debug_descr);
  168. debug_object_active_state(head, &rcuhead_debug_descr,
  169. STATE_RCU_HEAD_READY,
  170. STATE_RCU_HEAD_QUEUED);
  171. return r1;
  172. }
  173. static inline void debug_rcu_head_unqueue(struct rcu_head *head)
  174. {
  175. debug_object_active_state(head, &rcuhead_debug_descr,
  176. STATE_RCU_HEAD_QUEUED,
  177. STATE_RCU_HEAD_READY);
  178. debug_object_deactivate(head, &rcuhead_debug_descr);
  179. }
  180. #else /* !CONFIG_DEBUG_OBJECTS_RCU_HEAD */
  181. static inline int debug_rcu_head_queue(struct rcu_head *head)
  182. {
  183. return 0;
  184. }
  185. static inline void debug_rcu_head_unqueue(struct rcu_head *head)
  186. {
  187. }
  188. #endif /* #else !CONFIG_DEBUG_OBJECTS_RCU_HEAD */
  189. void kfree(const void *);
  190. /*
  191. * Reclaim the specified callback, either by invoking it (non-lazy case)
  192. * or freeing it directly (lazy case). Return true if lazy, false otherwise.
  193. */
  194. static inline bool __rcu_reclaim(const char *rn, struct rcu_head *head)
  195. {
  196. unsigned long offset = (unsigned long)head->func;
  197. rcu_lock_acquire(&rcu_callback_map);
  198. if (__is_kfree_rcu_offset(offset)) {
  199. RCU_TRACE(trace_rcu_invoke_kfree_callback(rn, head, offset);)
  200. kfree((void *)head - offset);
  201. rcu_lock_release(&rcu_callback_map);
  202. return true;
  203. } else {
  204. RCU_TRACE(trace_rcu_invoke_callback(rn, head);)
  205. head->func(head);
  206. rcu_lock_release(&rcu_callback_map);
  207. return false;
  208. }
  209. }
  210. #ifdef CONFIG_RCU_STALL_COMMON
  211. extern int rcu_cpu_stall_suppress;
  212. int rcu_jiffies_till_stall_check(void);
  213. #define rcu_ftrace_dump_stall_suppress() \
  214. do { \
  215. if (!rcu_cpu_stall_suppress) \
  216. rcu_cpu_stall_suppress = 3; \
  217. } while (0)
  218. #define rcu_ftrace_dump_stall_unsuppress() \
  219. do { \
  220. if (rcu_cpu_stall_suppress == 3) \
  221. rcu_cpu_stall_suppress = 0; \
  222. } while (0)
  223. #else /* #endif #ifdef CONFIG_RCU_STALL_COMMON */
  224. #define rcu_ftrace_dump_stall_suppress()
  225. #define rcu_ftrace_dump_stall_unsuppress()
  226. #endif /* #ifdef CONFIG_RCU_STALL_COMMON */
  227. /*
  228. * Strings used in tracepoints need to be exported via the
  229. * tracing system such that tools like perf and trace-cmd can
  230. * translate the string address pointers to actual text.
  231. */
  232. #define TPS(x) tracepoint_string(x)
  233. /*
  234. * Dump the ftrace buffer, but only one time per callsite per boot.
  235. */
  236. #define rcu_ftrace_dump(oops_dump_mode) \
  237. do { \
  238. static atomic_t ___rfd_beenhere = ATOMIC_INIT(0); \
  239. \
  240. if (!atomic_read(&___rfd_beenhere) && \
  241. !atomic_xchg(&___rfd_beenhere, 1)) { \
  242. tracing_off(); \
  243. rcu_ftrace_dump_stall_suppress(); \
  244. ftrace_dump(oops_dump_mode); \
  245. rcu_ftrace_dump_stall_unsuppress(); \
  246. } \
  247. } while (0)
  248. void rcu_early_boot_tests(void);
  249. void rcu_test_sync_prims(void);
  250. /*
  251. * This function really isn't for public consumption, but RCU is special in
  252. * that context switches can allow the state machine to make progress.
  253. */
  254. extern void resched_cpu(int cpu);
  255. #if defined(SRCU) || !defined(TINY_RCU)
  256. #include <linux/rcu_node_tree.h>
  257. extern int rcu_num_lvls;
  258. extern int num_rcu_lvl[];
  259. extern int rcu_num_nodes;
  260. static bool rcu_fanout_exact;
  261. static int rcu_fanout_leaf;
  262. /*
  263. * Compute the per-level fanout, either using the exact fanout specified
  264. * or balancing the tree, depending on the rcu_fanout_exact boot parameter.
  265. */
  266. static inline void rcu_init_levelspread(int *levelspread, const int *levelcnt)
  267. {
  268. int i;
  269. if (rcu_fanout_exact) {
  270. levelspread[rcu_num_lvls - 1] = rcu_fanout_leaf;
  271. for (i = rcu_num_lvls - 2; i >= 0; i--)
  272. levelspread[i] = RCU_FANOUT;
  273. } else {
  274. int ccur;
  275. int cprv;
  276. cprv = nr_cpu_ids;
  277. for (i = rcu_num_lvls - 1; i >= 0; i--) {
  278. ccur = levelcnt[i];
  279. levelspread[i] = (cprv + ccur - 1) / ccur;
  280. cprv = ccur;
  281. }
  282. }
  283. }
  284. /* Returns first leaf rcu_node of the specified RCU flavor. */
  285. #define rcu_first_leaf_node(rsp) ((rsp)->level[rcu_num_lvls - 1])
  286. /* Is this rcu_node a leaf? */
  287. #define rcu_is_leaf_node(rnp) ((rnp)->level == rcu_num_lvls - 1)
  288. /* Is this rcu_node the last leaf? */
  289. #define rcu_is_last_leaf_node(rsp, rnp) ((rnp) == &(rsp)->node[rcu_num_nodes - 1])
  290. /*
  291. * Do a full breadth-first scan of the rcu_node structures for the
  292. * specified rcu_state structure.
  293. */
  294. #define rcu_for_each_node_breadth_first(rsp, rnp) \
  295. for ((rnp) = &(rsp)->node[0]; \
  296. (rnp) < &(rsp)->node[rcu_num_nodes]; (rnp)++)
  297. /*
  298. * Do a breadth-first scan of the non-leaf rcu_node structures for the
  299. * specified rcu_state structure. Note that if there is a singleton
  300. * rcu_node tree with but one rcu_node structure, this loop is a no-op.
  301. */
  302. #define rcu_for_each_nonleaf_node_breadth_first(rsp, rnp) \
  303. for ((rnp) = &(rsp)->node[0]; !rcu_is_leaf_node(rsp, rnp); (rnp)++)
  304. /*
  305. * Scan the leaves of the rcu_node hierarchy for the specified rcu_state
  306. * structure. Note that if there is a singleton rcu_node tree with but
  307. * one rcu_node structure, this loop -will- visit the rcu_node structure.
  308. * It is still a leaf node, even if it is also the root node.
  309. */
  310. #define rcu_for_each_leaf_node(rsp, rnp) \
  311. for ((rnp) = rcu_first_leaf_node(rsp); \
  312. (rnp) < &(rsp)->node[rcu_num_nodes]; (rnp)++)
  313. /*
  314. * Iterate over all possible CPUs in a leaf RCU node.
  315. */
  316. #define for_each_leaf_node_possible_cpu(rnp, cpu) \
  317. for ((cpu) = cpumask_next((rnp)->grplo - 1, cpu_possible_mask); \
  318. (cpu) <= rnp->grphi; \
  319. (cpu) = cpumask_next((cpu), cpu_possible_mask))
  320. /*
  321. * Iterate over all CPUs in a leaf RCU node's specified mask.
  322. */
  323. #define rcu_find_next_bit(rnp, cpu, mask) \
  324. ((rnp)->grplo + find_next_bit(&(mask), BITS_PER_LONG, (cpu)))
  325. #define for_each_leaf_node_cpu_mask(rnp, cpu, mask) \
  326. for ((cpu) = rcu_find_next_bit((rnp), 0, (mask)); \
  327. (cpu) <= rnp->grphi; \
  328. (cpu) = rcu_find_next_bit((rnp), (cpu) + 1 - (rnp->grplo), (mask)))
  329. /*
  330. * Wrappers for the rcu_node::lock acquire and release.
  331. *
  332. * Because the rcu_nodes form a tree, the tree traversal locking will observe
  333. * different lock values, this in turn means that an UNLOCK of one level
  334. * followed by a LOCK of another level does not imply a full memory barrier;
  335. * and most importantly transitivity is lost.
  336. *
  337. * In order to restore full ordering between tree levels, augment the regular
  338. * lock acquire functions with smp_mb__after_unlock_lock().
  339. *
  340. * As ->lock of struct rcu_node is a __private field, therefore one should use
  341. * these wrappers rather than directly call raw_spin_{lock,unlock}* on ->lock.
  342. */
  343. #define raw_spin_lock_rcu_node(p) \
  344. do { \
  345. raw_spin_lock(&ACCESS_PRIVATE(p, lock)); \
  346. smp_mb__after_unlock_lock(); \
  347. } while (0)
  348. #define raw_spin_unlock_rcu_node(p) raw_spin_unlock(&ACCESS_PRIVATE(p, lock))
  349. #define raw_spin_lock_irq_rcu_node(p) \
  350. do { \
  351. raw_spin_lock_irq(&ACCESS_PRIVATE(p, lock)); \
  352. smp_mb__after_unlock_lock(); \
  353. } while (0)
  354. #define raw_spin_unlock_irq_rcu_node(p) \
  355. raw_spin_unlock_irq(&ACCESS_PRIVATE(p, lock))
  356. #define raw_spin_lock_irqsave_rcu_node(p, flags) \
  357. do { \
  358. raw_spin_lock_irqsave(&ACCESS_PRIVATE(p, lock), flags); \
  359. smp_mb__after_unlock_lock(); \
  360. } while (0)
  361. #define raw_spin_unlock_irqrestore_rcu_node(p, flags) \
  362. raw_spin_unlock_irqrestore(&ACCESS_PRIVATE(p, lock), flags)
  363. #define raw_spin_trylock_rcu_node(p) \
  364. ({ \
  365. bool ___locked = raw_spin_trylock(&ACCESS_PRIVATE(p, lock)); \
  366. \
  367. if (___locked) \
  368. smp_mb__after_unlock_lock(); \
  369. ___locked; \
  370. })
  371. #define raw_lockdep_assert_held_rcu_node(p) \
  372. lockdep_assert_held(&ACCESS_PRIVATE(p, lock))
  373. #endif /* #if defined(SRCU) || !defined(TINY_RCU) */
  374. #ifdef CONFIG_TINY_RCU
  375. /* Tiny RCU doesn't expedite, as its purpose in life is instead to be tiny. */
  376. static inline bool rcu_gp_is_normal(void) { return true; }
  377. static inline bool rcu_gp_is_expedited(void) { return false; }
  378. static inline void rcu_expedite_gp(void) { }
  379. static inline void rcu_unexpedite_gp(void) { }
  380. static inline void rcu_request_urgent_qs_task(struct task_struct *t) { }
  381. #else /* #ifdef CONFIG_TINY_RCU */
  382. bool rcu_gp_is_normal(void); /* Internal RCU use. */
  383. bool rcu_gp_is_expedited(void); /* Internal RCU use. */
  384. void rcu_expedite_gp(void);
  385. void rcu_unexpedite_gp(void);
  386. void rcupdate_announce_bootup_oddness(void);
  387. void rcu_request_urgent_qs_task(struct task_struct *t);
  388. #endif /* #else #ifdef CONFIG_TINY_RCU */
  389. #define RCU_SCHEDULER_INACTIVE 0
  390. #define RCU_SCHEDULER_INIT 1
  391. #define RCU_SCHEDULER_RUNNING 2
  392. enum rcutorture_type {
  393. RCU_FLAVOR,
  394. RCU_BH_FLAVOR,
  395. RCU_SCHED_FLAVOR,
  396. RCU_TASKS_FLAVOR,
  397. SRCU_FLAVOR,
  398. INVALID_RCU_FLAVOR
  399. };
  400. #if defined(CONFIG_TREE_RCU) || defined(CONFIG_PREEMPT_RCU)
  401. void rcutorture_get_gp_data(enum rcutorture_type test_type, int *flags,
  402. unsigned long *gp_seq);
  403. void rcutorture_record_progress(unsigned long vernum);
  404. void do_trace_rcu_torture_read(const char *rcutorturename,
  405. struct rcu_head *rhp,
  406. unsigned long secs,
  407. unsigned long c_old,
  408. unsigned long c);
  409. #else
  410. static inline void rcutorture_get_gp_data(enum rcutorture_type test_type,
  411. int *flags, unsigned long *gp_seq)
  412. {
  413. *flags = 0;
  414. *gp_seq = 0;
  415. }
  416. static inline void rcutorture_record_progress(unsigned long vernum) { }
  417. #ifdef CONFIG_RCU_TRACE
  418. void do_trace_rcu_torture_read(const char *rcutorturename,
  419. struct rcu_head *rhp,
  420. unsigned long secs,
  421. unsigned long c_old,
  422. unsigned long c);
  423. #else
  424. #define do_trace_rcu_torture_read(rcutorturename, rhp, secs, c_old, c) \
  425. do { } while (0)
  426. #endif
  427. #endif
  428. #ifdef CONFIG_TINY_SRCU
  429. static inline void srcutorture_get_gp_data(enum rcutorture_type test_type,
  430. struct srcu_struct *sp, int *flags,
  431. unsigned long *gp_seq)
  432. {
  433. if (test_type != SRCU_FLAVOR)
  434. return;
  435. *flags = 0;
  436. *gp_seq = sp->srcu_idx;
  437. }
  438. #elif defined(CONFIG_TREE_SRCU)
  439. void srcutorture_get_gp_data(enum rcutorture_type test_type,
  440. struct srcu_struct *sp, int *flags,
  441. unsigned long *gp_seq);
  442. #endif
  443. #ifdef CONFIG_TINY_RCU
  444. static inline unsigned long rcu_get_gp_seq(void) { return 0; }
  445. static inline unsigned long rcu_bh_get_gp_seq(void) { return 0; }
  446. static inline unsigned long rcu_sched_get_gp_seq(void) { return 0; }
  447. static inline unsigned long rcu_exp_batches_completed(void) { return 0; }
  448. static inline unsigned long rcu_exp_batches_completed_sched(void) { return 0; }
  449. static inline unsigned long
  450. srcu_batches_completed(struct srcu_struct *sp) { return 0; }
  451. static inline void rcu_force_quiescent_state(void) { }
  452. static inline void rcu_bh_force_quiescent_state(void) { }
  453. static inline void rcu_sched_force_quiescent_state(void) { }
  454. static inline void show_rcu_gp_kthreads(void) { }
  455. static inline int rcu_get_gp_kthreads_prio(void) { return 0; }
  456. #else /* #ifdef CONFIG_TINY_RCU */
  457. unsigned long rcu_get_gp_seq(void);
  458. unsigned long rcu_bh_get_gp_seq(void);
  459. unsigned long rcu_sched_get_gp_seq(void);
  460. unsigned long rcu_exp_batches_completed(void);
  461. unsigned long rcu_exp_batches_completed_sched(void);
  462. unsigned long srcu_batches_completed(struct srcu_struct *sp);
  463. void show_rcu_gp_kthreads(void);
  464. int rcu_get_gp_kthreads_prio(void);
  465. void rcu_force_quiescent_state(void);
  466. void rcu_bh_force_quiescent_state(void);
  467. void rcu_sched_force_quiescent_state(void);
  468. extern struct workqueue_struct *rcu_gp_wq;
  469. extern struct workqueue_struct *rcu_par_gp_wq;
  470. #endif /* #else #ifdef CONFIG_TINY_RCU */
  471. #ifdef CONFIG_RCU_NOCB_CPU
  472. bool rcu_is_nocb_cpu(int cpu);
  473. #else
  474. static inline bool rcu_is_nocb_cpu(int cpu) { return false; }
  475. #endif
  476. #endif /* __LINUX_RCU_H */