Module: xenomai-forge Branch: next Commit: b0650c1038e8e280c5cd28f92087654ce54409e0 URL: http://git.xenomai.org/?p=xenomai-forge.git;a=commit;h=b0650c1038e8e280c5cd28f92087654ce54409e0
Author: Philippe Gerum <r...@xenomai.org> Date: Sun Feb 16 17:03:19 2014 +0100 cobalt: require kernel version >= 3.10 --- .../cobalt/include/asm-generic/xenomai/wrappers.h | 62 ++++---------------- 1 file changed, 12 insertions(+), 50 deletions(-) diff --git a/kernel/cobalt/include/asm-generic/xenomai/wrappers.h b/kernel/cobalt/include/asm-generic/xenomai/wrappers.h index 601fc30..b357545 100644 --- a/kernel/cobalt/include/asm-generic/xenomai/wrappers.h +++ b/kernel/cobalt/include/asm-generic/xenomai/wrappers.h @@ -23,65 +23,27 @@ #endif #include <linux/version.h> + +#if LINUX_VERSION_CODE < KERNEL_VERSION(3,10,0) +#error "Xenomai/cobalt requires Linux kernel 3.10 or above" +#endif + +#ifdef CONFIG_IPIPE_LEGACY +#error "CONFIG_IPIPE_LEGACY must be switched off" +#endif + #include <linux/module.h> #include <linux/slab.h> #include <linux/ipipe.h> #include <linux/ipipe_tickdev.h> #include <linux/sched.h> -#include <asm/io.h> +#include <linux/sched/rt.h> #include <linux/pid.h> - -#ifdef CONFIG_IPIPE_LEGACY -#error "CONFIG_IPIPE_LEGACY must be switched off" -#endif - #include <linux/mm.h> +#include <asm/io.h> + #ifndef pgprot_noncached #define pgprot_noncached(p) (p) #endif /* !pgprot_noncached */ - -#if LINUX_VERSION_CODE < KERNEL_VERSION(3,4,0) - -#include <linux/smp.h> - -#ifndef cpu_online_map -#define cpu_online_mask (&cpu_online_map) -#endif - -static inline -unsigned long vm_mmap(struct file *file, unsigned long addr, - unsigned long len, unsigned long prot, - unsigned long flag, unsigned long offset) -{ - struct mm_struct *mm = current->mm; - unsigned long ret; - - down_write(&mm->mmap_sem); - ret = do_mmap(file, addr, len, prot, flag, offset); - up_write(&mm->mmap_sem); - - return ret; -} - -#endif /* LINUX_VERSION_CODE < 3.4.0 */ - -#if LINUX_VERSION_CODE < KERNEL_VERSION(3,5,0) -#define KGIDT_INIT(pid) (pid) -#endif /* LINUX < 3.8.0 */ - -#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,9,0) -#include <linux/sched/rt.h> -#endif /* LINUX >= 3.9.0 */ -#if LINUX_VERSION_CODE < KERNEL_VERSION(3,10,0) -#include <linux/proc_fs.h> - -#define PDE_DATA(inode) PROC_I(inode)->pde->data - -static inline void proc_remove(struct proc_dir_entry *pde) -{ - remove_proc_entry(pde->name, pde->parent); -} -#endif /* < 3.10 */ - #endif /* _COBALT_ASM_GENERIC_WRAPPERS_H */ _______________________________________________ Xenomai-git mailing list Xenomai-git@xenomai.org http://www.xenomai.org/mailman/listinfo/xenomai-git