hc
2023-12-11 d2ccde1c8e90d38cee87a1b0309ad2827f3fd30d
kernel/include/linux/rcu_segcblist.h
....@@ -1,3 +1,4 @@
1
+/* SPDX-License-Identifier: GPL-2.0+ */
12 /*
23 * RCU segmented callback lists
34 *
....@@ -5,34 +6,22 @@
56 * because the size of the TREE SRCU srcu_struct structure depends
67 * on these definitions.
78 *
8
- * This program is free software; you can redistribute it and/or modify
9
- * it under the terms of the GNU General Public License as published by
10
- * the Free Software Foundation; either version 2 of the License, or
11
- * (at your option) any later version.
12
- *
13
- * This program is distributed in the hope that it will be useful,
14
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
15
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16
- * GNU General Public License for more details.
17
- *
18
- * You should have received a copy of the GNU General Public License
19
- * along with this program; if not, you can access it online at
20
- * http://www.gnu.org/licenses/gpl-2.0.html.
21
- *
229 * Copyright IBM Corporation, 2017
2310 *
24
- * Authors: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
11
+ * Authors: Paul E. McKenney <paulmck@linux.net.ibm.com>
2512 */
2613
2714 #ifndef __INCLUDE_LINUX_RCU_SEGCBLIST_H
2815 #define __INCLUDE_LINUX_RCU_SEGCBLIST_H
16
+
17
+#include <linux/types.h>
18
+#include <linux/atomic.h>
2919
3020 /* Simple unsegmented callback lists. */
3121 struct rcu_cblist {
3222 struct rcu_head *head;
3323 struct rcu_head **tail;
3424 long len;
35
- long len_lazy;
3625 };
3726
3827 #define RCU_CBLIST_INITIALIZER(n) { .head = NULL, .tail = &n.head }
....@@ -78,8 +67,13 @@
7867 struct rcu_head *head;
7968 struct rcu_head **tails[RCU_CBLIST_NSEGS];
8069 unsigned long gp_seq[RCU_CBLIST_NSEGS];
70
+#ifdef CONFIG_RCU_NOCB_CPU
71
+ atomic_long_t len;
72
+#else
8173 long len;
82
- long len_lazy;
74
+#endif
75
+ u8 enabled;
76
+ u8 offloaded;
8377 };
8478
8579 #define RCU_SEGCBLIST_INITIALIZER(n) \