diff options
author | Paul E. McKenney <paulmck@linux.vnet.ibm.com> | 2017-04-28 14:16:16 -0700 |
---|---|---|
committer | Paul E. McKenney <paulmck@linux.vnet.ibm.com> | 2017-06-08 08:25:38 -0700 |
commit | d4efe6c5ad91f9a1f2f1d66b7fbfc87e320b2abc (patch) | |
tree | 3f5aae932e67b13e70c516bee390ab83c087cdc7 /kernel | |
parent | 07f6e64bf2ab98cad0d9c595659209858e7bff83 (diff) | |
download | blackbird-obmc-linux-d4efe6c5ad91f9a1f2f1d66b7fbfc87e320b2abc.tar.gz blackbird-obmc-linux-d4efe6c5ad91f9a1f2f1d66b7fbfc87e320b2abc.zip |
srcu: Shrink Tiny SRCU a bit
In Tiny SRCU, __srcu_read_lock() is a trivial function, outweighed by
its EXPORT_SYMBOL_GPL(), and on many architectures, its call sequence.
This commit therefore moves it to srcutiny.h so that it can be inlined.
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/rcu/srcutiny.c | 16 |
1 files changed, 0 insertions, 16 deletions
diff --git a/kernel/rcu/srcutiny.c b/kernel/rcu/srcutiny.c index 32798eb14853..988543721d5d 100644 --- a/kernel/rcu/srcutiny.c +++ b/kernel/rcu/srcutiny.c @@ -96,22 +96,6 @@ void cleanup_srcu_struct(struct srcu_struct *sp) EXPORT_SYMBOL_GPL(cleanup_srcu_struct); /* - * Counts the new reader in the appropriate per-CPU element of the - * srcu_struct. Can be invoked from irq/bh handlers, but the matching - * __srcu_read_unlock() must be in the same handler instance. Returns an - * index that must be passed to the matching srcu_read_unlock(). - */ -int __srcu_read_lock(struct srcu_struct *sp) -{ - int idx; - - idx = READ_ONCE(sp->srcu_idx); - WRITE_ONCE(sp->srcu_lock_nesting[idx], sp->srcu_lock_nesting[idx] + 1); - return idx; -} -EXPORT_SYMBOL_GPL(__srcu_read_lock); - -/* * Removes the count for the old reader from the appropriate element of * the srcu_struct. */ |