Skip to contentSkip to conversation

Update Xenomai for Linux 4.14

PATCH New Dmitriy Cherkasov 1 participant 4 messages Jan 18, 2018

lore
Share & tools
lore
#0 lore raw

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
#1 lore raw

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
index dc23a8e16..3d62f943e 100644
@@ -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
#2 lore raw

PATCH 2/3 cobalt/kernel: remove usage of GFP_TEMPORARY

In reply to Dmitriy Cherkasov

Linux 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
index 0f9e5e434..ddfecf813 100644
@@ -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
index 769fa7559..7c4674124 100644
@@ -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
#3 lore raw

PATCH 3/3 cobalt/kernel: add missing header for 4.14 compatibility

In reply to Dmitriy Cherkasov

Add 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
index 84fa2efa9..92007dd23 100644
@@ -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