* [B.A.T.M.A.N.] [PATCH] batman-adv: make __alloc_percpu 2.6.29 compatible
@ 2012-04-24 8:28 Martin Hundebøll
2012-04-25 12:01 ` Marek Lindner
0 siblings, 1 reply; 2+ messages in thread
From: Martin Hundebøll @ 2012-04-24 8:28 UTC (permalink / raw)
To: b.a.t.m.a.n; +Cc: Martin Hundebøll
In 2.6.29, __alloc_percpu doesn't take a align argument, so ignore this.
Signed-off-by: Martin Hundebøll <martin@hundeboll.net>
---
compat.h | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/compat.h b/compat.h
index 1cf5210..98b2b4c 100644
--- a/compat.h
+++ b/compat.h
@@ -148,4 +148,13 @@ static inline void eth_hw_addr_random(struct net_device *dev)
#endif /* < KERNEL_VERSION(3, 4, 0) */
+
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 30)
+
+#undef __alloc_percpu
+#define __alloc_percpu(size, align) \
+ percpu_alloc_mask((size), GFP_KERNEL, cpu_possible_map)
+
+#endif /* < KERNEL_VERSION(2, 6, 30) */
+
#endif /* _NET_BATMAN_ADV_COMPAT_H_ */
--
1.7.10
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [B.A.T.M.A.N.] [PATCH] batman-adv: make __alloc_percpu 2.6.29 compatible
2012-04-24 8:28 [B.A.T.M.A.N.] [PATCH] batman-adv: make __alloc_percpu 2.6.29 compatible Martin Hundebøll
@ 2012-04-25 12:01 ` Marek Lindner
0 siblings, 0 replies; 2+ messages in thread
From: Marek Lindner @ 2012-04-25 12:01 UTC (permalink / raw)
To: The list for a Better Approach To Mobile Ad-hoc Networking
On Tuesday, April 24, 2012 16:28:31 Martin Hundebøll wrote:
> In 2.6.29, __alloc_percpu doesn't take a align argument, so ignore this.
>
> Signed-off-by: Martin Hundebøll <martin@hundeboll.net>
> ---
> compat.h | 9 +++++++++
> 1 file changed, 9 insertions(+)
Applied (with slight modifications) in revision 4f3b54d.
Thanks,
Marek
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-04-25 12:01 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-04-24 8:28 [B.A.T.M.A.N.] [PATCH] batman-adv: make __alloc_percpu 2.6.29 compatible Martin Hundebøll
2012-04-25 12:01 ` Marek Lindner
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox