Update Xenomai for Linux 4.14
cover Update Xenomai for Linux 4.14
This patch set updates Xenomai for compatibility with the 4.14 kernel.
Dmitriy Cherkasov (3):
cobalt/kernel: make signal code handling compatible with 4.14 cobalt/kernel: remove usage of GFP_TEMPORARY cobalt/kernel: add missing header for 4.14 compatibility
kernel/cobalt/debug.c | 2 +- kernel/cobalt/include/asm-generic/xenomai/syscall.h | 1 + kernel/cobalt/posix/process.c | 2 +- kernel/cobalt/posix/signal.c | 4 +++- 4 files changed, 6 insertions(+), 3 deletions(-)
Signature · 1 line
2.14.3
PATCH 1/3 cobalt/kernel: make signal code handling compatible with 4.14
Linux does away with __SI_MASK in 4.14 (see cc731525f26af). Update cobalt to reflect this change.
--- kernel/cobalt/posix/signal.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
kernel/cobalt/posix/signal.c +3 -1
@@ -341,10 +341,12 @@ static int signal_put_siginfo(void __user *u_si, const struct siginfo *si,struct siginfo __user *u_p = u_si;int code, ret; -/* Translate kernel codes for userland. */ code = si->si_code; +#if LINUX_VERSION_CODE <KERNEL_VERSION (4 ,14 ,0 ) +/* Translate kernel codes for userland. */ if (code & __SI_MASK) code |= __SI_MASK; +#endif ret =__xn_put_user (si->si_signo, &u_p->si_signo); ret |=__xn_put_user (si->si_errno, &u_p->si_errno);
Signature · 1 line
2.14.3
PATCH 2/3 cobalt/kernel: remove usage of GFP_TEMPORARY
In reply to Dmitriy CherkasovLinux does away with GFP_TEMPORARY starting with 4.14 (see 0ee931c4e31a5). Update cobalt to use GFP_KERNEL instead.
--- kernel/cobalt/debug.c | 2 +- kernel/cobalt/posix/process.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
kernel/cobalt/debug.c +1 -1
@@ -229,7 +229,7 @@ void xndebug_trace_relax(int nr, unsigned long *backtrace,* offsets. */ - tmp = (char *)__get_free_page (GFP_TEMPORARY ); + tmp = (char *)__get_free_page (GFP_KERNEL );if (tmp ==NULL )/* * The situation looks really bad, but we can't do
kernel/cobalt/posix/process.c +1 -1
@@ -236,7 +236,7 @@ static inline char *get_exe_path(struct task_struct *p)* which is a heavyweight operation anyway, let's pick the * memory from the page allocator. */ - buf = (char *)__get_free_page (GFP_TEMPORARY ); + buf = (char *)__get_free_page (GFP_KERNEL );if (buf ==NULL )return ERR_PTR (-ENOMEM );
Signature · 1 line
2.14.3
PATCH 3/3 cobalt/kernel: add missing header for 4.14 compatibility
In reply to Dmitriy CherkasovAdd missing uaccess.h needed for copy_{to/from}_user_inatomic under Linux 4.14.
--- kernel/cobalt/include/asm-generic/xenomai/syscall.h | 1 + 1 file changed, 1 insertion(+)
kernel/cobalt/include/asm-generic/xenomai/syscall.h +1 -0
@@ -20,6 +20,7 @@#define _COBALT_ASM_GENERIC_SYSCALL_H#include <linux/types.h> +#include <linux/uaccess.h> #include <asm/uaccess.h> #include <asm/xenomai/features.h> #include <asm/xenomai/wrappers.h>
Signature · 1 line
2.14.3