* [B.A.T.M.A.N.] [PATCH] batman-adv: add RCU compat code for linux < 2.6.34
@ 2013-03-16 10:57 Antonio Quartulli
2013-03-18 8:23 ` Marek Lindner
0 siblings, 1 reply; 2+ messages in thread
From: Antonio Quartulli @ 2013-03-16 10:57 UTC (permalink / raw)
To: b.a.t.m.a.n
In linux version < 2.6.34 rcu_dereference_raw() does not exist and needs to be
backported.
Signed-off-by: Antonio Quartulli <ordex@autistici.org>
---
compat.h | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/compat.h b/compat.h
index 6a7e03b..23f43d5 100644
--- a/compat.h
+++ b/compat.h
@@ -81,6 +81,12 @@ static inline void batadv_this_cpu_add(uint64_t *count_ptr, size_t count)
#define rcu_dereference_protected(p, c) (p)
+#define rcu_dereference_raw(p) ({ \
+ typeof(p) _________p1 = ACCESS_ONCE(p); \
+ smp_read_barrier_depends(); \
+ (_________p1); \
+ })
+
#endif /* < KERNEL_VERSION(2, 6, 34) */
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 35)
--
1.8.1.5
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [B.A.T.M.A.N.] [PATCH] batman-adv: add RCU compat code for linux < 2.6.34
2013-03-16 10:57 [B.A.T.M.A.N.] [PATCH] batman-adv: add RCU compat code for linux < 2.6.34 Antonio Quartulli
@ 2013-03-18 8:23 ` Marek Lindner
0 siblings, 0 replies; 2+ messages in thread
From: Marek Lindner @ 2013-03-18 8:23 UTC (permalink / raw)
To: The list for a Better Approach To Mobile Ad-hoc Networking
On Saturday, March 16, 2013 18:57:42 Antonio Quartulli wrote:
> In linux version < 2.6.34 rcu_dereference_raw() does not exist and needs to
> be backported.
>
> Signed-off-by: Antonio Quartulli <ordex@autistici.org>
> ---
> compat.h | 6 ++++++
> 1 file changed, 6 insertions(+)
Applied in revision b4dba47.
Thanks,
Marek
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-03-18 8:23 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-03-16 10:57 [B.A.T.M.A.N.] [PATCH] batman-adv: add RCU compat code for linux < 2.6.34 Antonio Quartulli
2013-03-18 8:23 ` Marek Lindner
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).