LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH] rcu_batches_completed prototype cleanup
@ 2008-02-15  4:57 Steven Rostedt
  2008-02-15 21:42 ` Paul E. McKenney
  0 siblings, 1 reply; 2+ messages in thread
From: Steven Rostedt @ 2008-02-15  4:57 UTC (permalink / raw)
  To: LKML; +Cc: Linus Torvalds, akpm, Paul E. McKenney


rcu_batches_completed and rcu_patches_completed_bh are both declared
in rcuclassic.h and rcupreempt.h. This patch removes the extra
prototypes for them from rcupdate.h.

rcu_batches_completed_bh is defined as a static inline in the rcupreempt.h
header file. Trying to export this as EXPORT_SYMBOL_GPL causes section
problems with the powerpc compiler. There's no need to export a static
inlined function.

Modules must be compiled with the same type of RCU implementation as the
kernel they are for.

Signed-off-by: Steven Rostedt <srostedt@redhat.com>
---
 include/linux/rcupdate.h |    2 --
 kernel/rcupreempt.c      |    2 --
 2 files changed, 4 deletions(-)

diff --git a/include/linux/rcupdate.h b/include/linux/rcupdate.h
index 37a642c..ae5ba4e 100644
--- a/include/linux/rcupdate.h
+++ b/include/linux/rcupdate.h
@@ -238,8 +238,6 @@ extern void call_rcu_bh(struct rcu_head *head,
 /* Exported common interfaces */
 extern void synchronize_rcu(void);
 extern void rcu_barrier(void);
-extern long rcu_batches_completed(void);
-extern long rcu_batches_completed_bh(void);

 /* Internal to kernel */
 extern void rcu_init(void);
diff --git a/kernel/rcupreempt.c b/kernel/rcupreempt.c
index 987cfb7..bdd0a1d 100644
--- a/kernel/rcupreempt.c
+++ b/kernel/rcupreempt.c
@@ -213,8 +213,6 @@ long rcu_batches_completed(void)
 }
 EXPORT_SYMBOL_GPL(rcu_batches_completed);

-EXPORT_SYMBOL_GPL(rcu_batches_completed_bh);
-
 void __rcu_read_lock(void)
 {
 	int idx;


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] rcu_batches_completed prototype cleanup
  2008-02-15  4:57 [PATCH] rcu_batches_completed prototype cleanup Steven Rostedt
@ 2008-02-15 21:42 ` Paul E. McKenney
  0 siblings, 0 replies; 2+ messages in thread
From: Paul E. McKenney @ 2008-02-15 21:42 UTC (permalink / raw)
  To: Steven Rostedt; +Cc: LKML, Linus Torvalds, akpm

On Thu, Feb 14, 2008 at 11:57:48PM -0500, Steven Rostedt wrote:
> 
> rcu_batches_completed and rcu_patches_completed_bh are both declared
> in rcuclassic.h and rcupreempt.h. This patch removes the extra
> prototypes for them from rcupdate.h.
> 
> rcu_batches_completed_bh is defined as a static inline in the rcupreempt.h
> header file. Trying to export this as EXPORT_SYMBOL_GPL causes section
> problems with the powerpc compiler. There's no need to export a static
> inlined function.
> 
> Modules must be compiled with the same type of RCU implementation as the
> kernel they are for.

Good catch, and works fine here against 2.6.25-rc1.  Andrew, Linus,
could you please apply this?

Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>

> Signed-off-by: Steven Rostedt <srostedt@redhat.com>
> ---
>  include/linux/rcupdate.h |    2 --
>  kernel/rcupreempt.c      |    2 --
>  2 files changed, 4 deletions(-)
> 
> diff --git a/include/linux/rcupdate.h b/include/linux/rcupdate.h
> index 37a642c..ae5ba4e 100644
> --- a/include/linux/rcupdate.h
> +++ b/include/linux/rcupdate.h
> @@ -238,8 +238,6 @@ extern void call_rcu_bh(struct rcu_head *head,
>  /* Exported common interfaces */
>  extern void synchronize_rcu(void);
>  extern void rcu_barrier(void);
> -extern long rcu_batches_completed(void);
> -extern long rcu_batches_completed_bh(void);
> 
>  /* Internal to kernel */
>  extern void rcu_init(void);
> diff --git a/kernel/rcupreempt.c b/kernel/rcupreempt.c
> index 987cfb7..bdd0a1d 100644
> --- a/kernel/rcupreempt.c
> +++ b/kernel/rcupreempt.c
> @@ -213,8 +213,6 @@ long rcu_batches_completed(void)
>  }
>  EXPORT_SYMBOL_GPL(rcu_batches_completed);
> 
> -EXPORT_SYMBOL_GPL(rcu_batches_completed_bh);
> -
>  void __rcu_read_lock(void)
>  {
>  	int idx;
> 

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-02-15 21:43 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-02-15  4:57 [PATCH] rcu_batches_completed prototype cleanup Steven Rostedt
2008-02-15 21:42 ` Paul E. McKenney

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).