rcu: Remove debug code from rcu_segcblist.h The rcu_segcblist_dump() and rcu_segcblist_fsck() code is not used in mainline, and exposing it via SRCU causes build failures in blackfin. This commit therefore removes these from mainline. They have been added to the corresponding usermode test suite. Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
diff --git a/include/linux/rcu_segcblist.h b/include/linux/rcu_segcblist.h index b98a67c..19e003e 100644 --- a/include/linux/rcu_segcblist.h +++ b/include/linux/rcu_segcblist.h
@@ -665,63 +665,4 @@ static inline struct rcu_head **rcu_segcblist_tail(struct rcu_segcblist *rsclp) return rsclp->tails[RCU_NEXT_TAIL]; } -static inline void rcu_segcblist_dump(struct rcu_segcblist *rsclp) -{ - int i; - - pr_info("%p->head = %p\n", rsclp, rsclp->head); - for (i = RCU_DONE_TAIL; i < RCU_CBLIST_NSEGS; i++) - pr_info("\t->tails[%d] = %p, ->gp_seq[%d] = %ld\n", - i, rsclp->tails[i], i, rsclp->gp_seq[i]); - pr_info("->len = %ld, ->len_lazy = %ld\n", rsclp->len, rsclp->len_lazy); -} - -/* - * Do consistency check on the specified rcu_segcblist structure, but - * limiting rcu_head traversals to that specified. Complains bitterly - * on any inconsistencies that it spots. - */ -#define rcu_segcblist_fsck(rsclp, limit) \ -({ \ - long ___lim = (limit); \ - struct rcu_segcblist *___rsclp = (rsclp); \ - long cnt = 0; \ - int i = 0; \ - struct rcu_head **rhpp = &___rsclp->head; \ - static int notdone1 = 1; \ - static int notdone2 = 1; \ - static int notdone3 = 1; \ - \ - for (;;) { \ - while (i < RCU_CBLIST_NSEGS && ___rsclp->tails[i] == rhpp) \ - ++i; \ - if (*rhpp == NULL) \ - break; \ - if (++cnt > ___lim) \ - break; \ - rhpp = &(*rhpp)->next; \ - } \ - if (cnt < ___lim && cnt != ___rsclp->len && xchg(¬done1, 0)) { \ - pr_info("cnt = %ld\n", cnt); \ - rcu_segcblist_dump(___rsclp); \ - } \ - WARN_ON_ONCE(cnt < ___lim && cnt != ___rsclp->len); \ - if (___rsclp->tails[RCU_NEXT_TAIL] && cnt < ___lim && \ - i != RCU_CBLIST_NSEGS && xchg(¬done2, 0)) { \ - pr_info("i = %d\n", i); \ - rcu_segcblist_dump(___rsclp); \ - } \ - WARN_ON_ONCE(___rsclp->tails[RCU_NEXT_TAIL] && cnt < ___lim && \ - i != RCU_CBLIST_NSEGS); \ - if ((___rsclp->len < 0 || ___rsclp->len_lazy < 0 || \ - ___rsclp->len < ___rsclp->len_lazy) && xchg(¬done3, 0)) { \ - pr_info("Counter problems\n"); \ - rcu_segcblist_dump(___rsclp); \ - } \ - WARN_ON_ONCE(___rsclp->len < 0); \ - WARN_ON_ONCE(___rsclp->len_lazy < 0); \ - WARN_ON_ONCE(___rsclp->len < ___rsclp->len_lazy); \ - !notdone1 || !notdone2 || !notdone3; \ -}) - #endif /* __KERNEL_RCU_SEGCBLIST_H */