* [PATCH] just rename call_rcu_bh instead of making it a macro
@ 2007-09-26 18:17 Steven Rostedt
2007-09-26 23:17 ` Paul E. McKenney
0 siblings, 1 reply; 2+ messages in thread
From: Steven Rostedt @ 2007-09-26 18:17 UTC (permalink / raw)
To: LKML; +Cc: RT, Paul E. McKenney, Thomas Gleixner, Ingo Molnar
Seems that I found a box that has a config that passes call_rcu_bh as a
function pointer (see net/sctp/sm_make_chunk.c), so declaring the
call_rcu_bh has a macro function isn't good enough.
This patch makes it just another name of call_rcu for rcupreempt.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Index: linux-2.6.23-rc8-rt1/include/linux/rcupreempt.h
===================================================================
--- linux-2.6.23-rc8-rt1.orig/include/linux/rcupreempt.h
+++ linux-2.6.23-rc8-rt1/include/linux/rcupreempt.h
@@ -42,9 +42,14 @@
#include <linux/cpumask.h>
#include <linux/seqlock.h>
-#define rcu_qsctr_inc(cpu)
-#define rcu_bh_qsctr_inc(cpu)
-#define call_rcu_bh(head, rcu) call_rcu(head, rcu)
+#define rcu_qsctr_inc(cpu) do { } while (0)
+#define rcu_bh_qsctr_inc(cpu) do { } while (0)
+/*
+ * Someone might want to pass call_rcu_bh as a function pointer.
+ * So this needs to just be a rename and not a macro function.
+ * (no parentheses)
+ */
+#define call_rcu_bh call_rcu
extern void __rcu_read_lock(void);
extern void __rcu_read_unlock(void);
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] just rename call_rcu_bh instead of making it a macro
2007-09-26 18:17 [PATCH] just rename call_rcu_bh instead of making it a macro Steven Rostedt
@ 2007-09-26 23:17 ` Paul E. McKenney
0 siblings, 0 replies; 2+ messages in thread
From: Paul E. McKenney @ 2007-09-26 23:17 UTC (permalink / raw)
To: Steven Rostedt; +Cc: LKML, RT, Thomas Gleixner, Ingo Molnar
On Wed, Sep 26, 2007 at 02:17:47PM -0400, Steven Rostedt wrote:
> Seems that I found a box that has a config that passes call_rcu_bh as a
> function pointer (see net/sctp/sm_make_chunk.c), so declaring the
> call_rcu_bh has a macro function isn't good enough.
>
> This patch makes it just another name of call_rcu for rcupreempt.
Looks good!
Acked-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
> Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
>
> Index: linux-2.6.23-rc8-rt1/include/linux/rcupreempt.h
> ===================================================================
> --- linux-2.6.23-rc8-rt1.orig/include/linux/rcupreempt.h
> +++ linux-2.6.23-rc8-rt1/include/linux/rcupreempt.h
> @@ -42,9 +42,14 @@
> #include <linux/cpumask.h>
> #include <linux/seqlock.h>
>
> -#define rcu_qsctr_inc(cpu)
> -#define rcu_bh_qsctr_inc(cpu)
> -#define call_rcu_bh(head, rcu) call_rcu(head, rcu)
> +#define rcu_qsctr_inc(cpu) do { } while (0)
> +#define rcu_bh_qsctr_inc(cpu) do { } while (0)
> +/*
> + * Someone might want to pass call_rcu_bh as a function pointer.
> + * So this needs to just be a rename and not a macro function.
> + * (no parentheses)
> + */
> +#define call_rcu_bh call_rcu
>
> extern void __rcu_read_lock(void);
> extern void __rcu_read_unlock(void);
>
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2007-09-26 23:17 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-09-26 18:17 [PATCH] just rename call_rcu_bh instead of making it a macro Steven Rostedt
2007-09-26 23:17 ` 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).