19 #ifndef _COBALT_ASM_GENERIC_WRAPPERS_H
21 #include <linux/version.h>
23 #if LINUX_VERSION_CODE < KERNEL_VERSION(3,10,0)
24 #error "Xenomai/cobalt requires Linux kernel 3.10 or above"
27 #ifdef CONFIG_IPIPE_LEGACY
28 #error "CONFIG_IPIPE_LEGACY must be switched off"
42 #if LINUX_VERSION_CODE < KERNEL_VERSION(3,11,0)
43 #define DEVICE_ATTR_RW(_name) __ATTR_RW(_name)
44 #define DEVICE_ATTR_RO(_name) __ATTR_RO(_name)
45 #define DEVICE_ATTR_WO(_name) __ATTR_WO(_name)
48 #if LINUX_VERSION_CODE < KERNEL_VERSION(3,14,0)
49 #define get_current_uuid() current_uid()
51 #define get_current_uuid() from_kuid_munged(current_user_ns(), current_uid())
54 #if LINUX_VERSION_CODE < KERNEL_VERSION(3,15,0)
55 #define raw_cpu_ptr(v) __this_cpu_ptr(v)
58 #if LINUX_VERSION_CODE < KERNEL_VERSION(3,16,0)
59 #define smp_mb__before_atomic() smp_mb()
60 #define smp_mb__after_atomic() smp_mb()
63 #if LINUX_VERSION_CODE < KERNEL_VERSION(3,17,0)
64 #include <linux/netdevice.h>
67 #define alloc_netdev(sizeof_priv, name, name_assign_type, setup) \
68 alloc_netdev_mqs(sizeof_priv, name, setup, 1, 1)