@@ -35,24 +35,6 @@ void rcu_cblist_init(struct rcu_cblist *rclp)
3535 rclp -> len_lazy = 0 ;
3636}
3737
38- /*
39- * Debug function to actually count the number of callbacks.
40- * If the number exceeds the limit specified, return -1.
41- */
42- long rcu_cblist_count_cbs (struct rcu_cblist * rclp , long lim )
43- {
44- int cnt = 0 ;
45- struct rcu_head * * rhpp = & rclp -> head ;
46-
47- for (;;) {
48- if (!* rhpp )
49- return cnt ;
50- if (++ cnt > lim )
51- return -1 ;
52- rhpp = & (* rhpp )-> next ;
53- }
54- }
55-
5638/*
5739 * Dequeue the oldest rcu_head structure from the specified callback
5840 * list. This function assumes that the callback is non-lazy, but
@@ -102,17 +84,6 @@ void rcu_segcblist_disable(struct rcu_segcblist *rsclp)
10284 rsclp -> tails [RCU_NEXT_TAIL ] = NULL ;
10385}
10486
105- /*
106- * Is the specified segment of the specified rcu_segcblist structure
107- * empty of callbacks?
108- */
109- bool rcu_segcblist_segempty (struct rcu_segcblist * rsclp , int seg )
110- {
111- if (seg == RCU_DONE_TAIL )
112- return & rsclp -> head == rsclp -> tails [RCU_DONE_TAIL ];
113- return rsclp -> tails [seg - 1 ] == rsclp -> tails [seg ];
114- }
115-
11687/*
11788 * Does the specified rcu_segcblist structure contain callbacks that
11889 * are ready to be invoked?
@@ -133,50 +104,6 @@ bool rcu_segcblist_pend_cbs(struct rcu_segcblist *rsclp)
133104 !rcu_segcblist_restempty (rsclp , RCU_DONE_TAIL );
134105}
135106
136- /*
137- * Dequeue and return the first ready-to-invoke callback. If there
138- * are no ready-to-invoke callbacks, return NULL. Disables interrupts
139- * to avoid interference. Does not protect from interference from other
140- * CPUs or tasks.
141- */
142- struct rcu_head * rcu_segcblist_dequeue (struct rcu_segcblist * rsclp )
143- {
144- unsigned long flags ;
145- int i ;
146- struct rcu_head * rhp ;
147-
148- local_irq_save (flags );
149- if (!rcu_segcblist_ready_cbs (rsclp )) {
150- local_irq_restore (flags );
151- return NULL ;
152- }
153- rhp = rsclp -> head ;
154- BUG_ON (!rhp );
155- rsclp -> head = rhp -> next ;
156- for (i = RCU_DONE_TAIL ; i < RCU_CBLIST_NSEGS ; i ++ ) {
157- if (rsclp -> tails [i ] != & rhp -> next )
158- break ;
159- rsclp -> tails [i ] = & rsclp -> head ;
160- }
161- smp_mb (); /* Dequeue before decrement for rcu_barrier(). */
162- WRITE_ONCE (rsclp -> len , rsclp -> len - 1 );
163- local_irq_restore (flags );
164- return rhp ;
165- }
166-
167- /*
168- * Account for the fact that a previously dequeued callback turned out
169- * to be marked as lazy.
170- */
171- void rcu_segcblist_dequeued_lazy (struct rcu_segcblist * rsclp )
172- {
173- unsigned long flags ;
174-
175- local_irq_save (flags );
176- rsclp -> len_lazy -- ;
177- local_irq_restore (flags );
178- }
179-
180107/*
181108 * Return a pointer to the first callback in the specified rcu_segcblist
182109 * structure. This is useful for diagnostics.
@@ -202,17 +129,6 @@ struct rcu_head *rcu_segcblist_first_pend_cb(struct rcu_segcblist *rsclp)
202129 return NULL ;
203130}
204131
205- /*
206- * Does the specified rcu_segcblist structure contain callbacks that
207- * have not yet been processed beyond having been posted, that is,
208- * does it contain callbacks in its last segment?
209- */
210- bool rcu_segcblist_new_cbs (struct rcu_segcblist * rsclp )
211- {
212- return rcu_segcblist_is_enabled (rsclp ) &&
213- !rcu_segcblist_restempty (rsclp , RCU_NEXT_READY_TAIL );
214- }
215-
216132/*
217133 * Enqueue the specified callback onto the specified rcu_segcblist
218134 * structure, updating accounting as needed. Note that the ->len
0 commit comments