| .. | .. |
|---|
| 1 | +/* SPDX-License-Identifier: GPL-2.0+ */ |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * RCU segmented callback lists |
|---|
| 3 | 4 | * |
|---|
| .. | .. |
|---|
| 5 | 6 | * because the size of the TREE SRCU srcu_struct structure depends |
|---|
| 6 | 7 | * on these definitions. |
|---|
| 7 | 8 | * |
|---|
| 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 | | - * |
|---|
| 22 | 9 | * Copyright IBM Corporation, 2017 |
|---|
| 23 | 10 | * |
|---|
| 24 | | - * Authors: Paul E. McKenney <paulmck@linux.vnet.ibm.com> |
|---|
| 11 | + * Authors: Paul E. McKenney <paulmck@linux.net.ibm.com> |
|---|
| 25 | 12 | */ |
|---|
| 26 | 13 | |
|---|
| 27 | 14 | #ifndef __INCLUDE_LINUX_RCU_SEGCBLIST_H |
|---|
| 28 | 15 | #define __INCLUDE_LINUX_RCU_SEGCBLIST_H |
|---|
| 16 | + |
|---|
| 17 | +#include <linux/types.h> |
|---|
| 18 | +#include <linux/atomic.h> |
|---|
| 29 | 19 | |
|---|
| 30 | 20 | /* Simple unsegmented callback lists. */ |
|---|
| 31 | 21 | struct rcu_cblist { |
|---|
| 32 | 22 | struct rcu_head *head; |
|---|
| 33 | 23 | struct rcu_head **tail; |
|---|
| 34 | 24 | long len; |
|---|
| 35 | | - long len_lazy; |
|---|
| 36 | 25 | }; |
|---|
| 37 | 26 | |
|---|
| 38 | 27 | #define RCU_CBLIST_INITIALIZER(n) { .head = NULL, .tail = &n.head } |
|---|
| .. | .. |
|---|
| 78 | 67 | struct rcu_head *head; |
|---|
| 79 | 68 | struct rcu_head **tails[RCU_CBLIST_NSEGS]; |
|---|
| 80 | 69 | unsigned long gp_seq[RCU_CBLIST_NSEGS]; |
|---|
| 70 | +#ifdef CONFIG_RCU_NOCB_CPU |
|---|
| 71 | + atomic_long_t len; |
|---|
| 72 | +#else |
|---|
| 81 | 73 | long len; |
|---|
| 82 | | - long len_lazy; |
|---|
| 74 | +#endif |
|---|
| 75 | + u8 enabled; |
|---|
| 76 | + u8 offloaded; |
|---|
| 83 | 77 | }; |
|---|
| 84 | 78 | |
|---|
| 85 | 79 | #define RCU_SEGCBLIST_INITIALIZER(n) \ |
|---|