aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorBrian Behlendorf <[email protected]>2009-02-02 15:12:30 -0800
committerBrian Behlendorf <[email protected]>2009-02-02 15:12:30 -0800
commit31a033ecd49c2f691d6a377db2882ed941f47481 (patch)
tree4fe82ef3038f051bb02cd5e1de8333908e1da455 /include/linux
parentf220894e1fc86cbfaf073dc4cca519887c41e78e (diff)
2.6.27+ portability changes
- Added SPL_AC_3ARGS_ON_EACH_CPU configure check to determine if the older 4 argument version of on_each_cpu() should be used or the new 3 argument version. The retry argument was dropped in the new API which was never used anyway. - Updated work queue compatibility wrappers. The old way this worked was to pass a data point when initialized the workqueue. The new API assumed the work item is embedding in a structure and we us container_of() to find that data pointer. - Updated skc->skc_flags to be an unsigned long which is now type checked in the bit operations. This silences the warnings. - Updated autogen products and splat tests accordingly
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/smp_compat.h16
-rw-r--r--include/linux/workqueue_compat.h25
2 files changed, 41 insertions, 0 deletions
diff --git a/include/linux/smp_compat.h b/include/linux/smp_compat.h
new file mode 100644
index 000000000..4da35f4ad
--- /dev/null
+++ b/include/linux/smp_compat.h
@@ -0,0 +1,16 @@
+#ifndef _SPL_SMP_COMPAT_H
+#define _SPL_SMP_COMPAT_H
+
+#include <linux/smp.h>
+
+#ifdef HAVE_3ARGS_ON_EACH_CPU
+
+#define spl_on_each_cpu(func,info,wait) on_each_cpu(func,info,wait)
+
+#else
+
+#define spl_on_each_cpu(func,info,wait) on_each_cpu(func,info,0,wait)
+
+#endif /* HAVE_3ARGS_ON_EACH_CPU */
+
+#endif /* _SPL_SMP_COMPAT_H */
diff --git a/include/linux/workqueue_compat.h b/include/linux/workqueue_compat.h
new file mode 100644
index 000000000..3dab8776a
--- /dev/null
+++ b/include/linux/workqueue_compat.h
@@ -0,0 +1,25 @@
+#ifndef _SPL_WORKQUEUE_COMPAT_H
+#define _SPL_WORKQUEUE_COMPAT_H
+
+#include <linux/workqueue.h>
+#include <sys/types.h>
+
+#ifdef HAVE_3ARGS_INIT_WORK
+
+#define delayed_work work_struct
+
+#define spl_init_work(wq, cb, d) INIT_WORK((wq), (void *)(cb), \
+ (void *)(d))
+#define spl_init_delayed_work(wq,cb,d) INIT_WORK((wq), (void *)(cb), \
+ (void *)(d))
+#define spl_get_work_data(d, t, f) (t *)(d)
+
+#else
+
+#define spl_init_work(wq, cb, d) INIT_WORK((wq), (void *)(cb));
+#define spl_init_delayed_work(wq,cb,d) INIT_DELAYED_WORK((wq), (void *)(cb));
+#define spl_get_work_data(d, t, f) (t *)container_of(d, t, f)
+
+#endif /* HAVE_3ARGS_INIT_WORK */
+
+#endif /* _SPL_WORKQUEUE_COMPAT_H */