All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 01/10] travis: add basic CI support
@ 2019-03-06 17:53 roman.stratiienko
  2019-03-06 17:53 ` [PATCH v2 02/10] kernel: cobalt: replace ACCESS_ONCE with READ_ONCE roman.stratiienko
                   ` (8 more replies)
  0 siblings, 9 replies; 14+ messages in thread
From: roman.stratiienko @ 2019-03-06 17:53 UTC (permalink / raw)
  To: xenomai; +Cc: Roman Stratiienko

From: Roman Stratiienko <roman.stratiienko@globallogic.com>

Signed-off-by: Roman Stratiienko <roman.stratiienko@globallogic.com>
---
Since v1: v4.20 removed and added to last commit
 .travis.yml | 68 +++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 68 insertions(+)
 create mode 100644 .travis.yml

diff --git a/.travis.yml b/.travis.yml
new file mode 100644
index 000000000..24889ca5f
--- /dev/null
+++ b/.travis.yml
@@ -0,0 +1,68 @@
+language: c
+dist: xenial
+
+addons:
+  apt:
+    packages:
+      - gcc-aarch64-linux-gnu
+      - gcc-arm-linux-gnueabihf
+      - patch
+      - quilt
+      - wget
+
+env:
+  global:
+    - KDIR=/tmp/kernel
+
+install:
+  - if [[ "${KERNEL_VERSION}" == *-rc* ]]; then
+      KERNEL_URL=https://git.kernel.org/torvalds/t/linux-${KERNEL_VERSION}.tar.gz;
+    else
+      KERNEL_URL=https://www.kernel.org/pub/linux/kernel/v${KERNEL_VERSION::1}.x/linux-${KERNEL_VERSION}.tar.xz;
+    fi
+  - wget -O kernel.tar.xz ${KERNEL_URL} && mkdir ${KDIR} && tar -C ${KDIR} --strip=1 -xf kernel.tar.xz
+  - wget -O /tmp/ipipe.patch ${IPIPE_URL}
+
+before_script:
+  - case "${ARCH}" in
+      "arm64") export CROSS_COMPILE=aarch64-linux-gnu-
+          ;;
+      "arm"  ) export CROSS_COMPILE=arm-linux-gnueabihf-
+          ;;
+      "x86"  ) export CROSS_COMPILE=
+          ;;
+    esac
+  - pushd ${KDIR}
+  - make -j $(nproc) ${KERNEL_DEFCONFIG}
+  - ./scripts/config -e CONFIG_IPIPE
+  - ./scripts/config -e CONFIG_XENOMAI
+  - popd
+
+script:
+  - ./scripts/prepare-kernel.sh --ipipe=/tmp/ipipe.patch --arch=${ARCH} --linux=${KDIR}
+  - cd ${KDIR}
+  - make -j $(nproc) olddefconfig
+  - make -j $(nproc) all
+
+matrix:
+  include:
+    - env:
+      - ARCH: arm
+        KERNEL_VERSION: 4.14.85
+        KERNEL_DEFCONFIG: multi_v7_defconfig
+        IPIPE_URL: https://xenomai.org/downloads/ipipe/v4.x/arm/ipipe-core-4.14.85-arm-6.patch
+    - env:
+      - ARCH: arm
+        KERNEL_VERSION: 4.1.18
+        KERNEL_DEFCONFIG: multi_v7_defconfig
+        IPIPE_URL: https://xenomai.org/downloads/ipipe/v4.x/arm/older/ipipe-core-4.1.18-arm-9.patch
+    - env:
+      - ARCH: x86
+        KERNEL_VERSION: 4.14.89
+        KERNEL_DEFCONFIG: x86_64_defconfig
+        IPIPE_URL: https://xenomai.org/downloads/ipipe/v4.x/x86/ipipe-core-4.14.89-x86-2.patch
+    - env:
+      - ARCH: x86
+        KERNEL_VERSION: 4.4.166
+        KERNEL_DEFCONFIG: i386_defconfig
+        IPIPE_URL: https://xenomai.org/downloads/ipipe/v4.x/x86/ipipe-core-4.4.166-x86-12.patch
-- 
2.17.1



^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH v2 02/10] kernel: cobalt: replace ACCESS_ONCE with READ_ONCE
  2019-03-06 17:53 [PATCH v2 01/10] travis: add basic CI support roman.stratiienko
@ 2019-03-06 17:53 ` roman.stratiienko
  2019-03-06 17:53 ` [PATCH v2 03/10] kernel: cobalt: use printk instead of print_symbol on v4.16 and later roman.stratiienko
                   ` (7 subsequent siblings)
  8 siblings, 0 replies; 14+ messages in thread
From: roman.stratiienko @ 2019-03-06 17:53 UTC (permalink / raw)
  To: xenomai; +Cc: Roman Stratiienko

From: Roman Stratiienko <roman.stratiienko@globallogic.com>

READ_ONCE() introduced from v3.19 commit 230fa253df63
("kernel: Provide READ_ONCE and ASSIGN_ONCE")
and ACCESS_ONCE() removed startibg from v4.15-rc4 commit
b899a850431e ("compiler.h: Remove ACCESS_ONCE()")
Replace ACCESS_ONCE with READ_ONCE and make READ_ONCE wrapper
for case when READ_ONCE is not available (<v3.19)

This will fix build with v4.15

Signed-off-by: Roman Stratiienko <roman.stratiienko@globallogic.com>
---
 include/cobalt/uapi/kernel/urw.h | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/include/cobalt/uapi/kernel/urw.h b/include/cobalt/uapi/kernel/urw.h
index 40a1eb5ff..fcfde21a0 100644
--- a/include/cobalt/uapi/kernel/urw.h
+++ b/include/cobalt/uapi/kernel/urw.h
@@ -53,11 +53,15 @@ typedef struct {
 #define URW_INITIALIZER     { 0 }
 #define DEFINE_URW(__name)  urw_t __name = URW_INITIALIZER
 
+#ifndef READ_ONCE
+#define READ_ONCE ACCESS_ONCE
+#endif
+
 static inline void __try_read_start(const urw_t *urw, urwstate_t *tmp)
 {
 	__u32 token;
 repeat:
-	token = ACCESS_ONCE(urw->sequence);
+	token = READ_ONCE(urw->sequence);
 	smp_rmb();
 	if (token & 1) {
 		cpu_relax();
-- 
2.17.1



^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH v2 03/10] kernel: cobalt: use printk instead of print_symbol on v4.16 and later
  2019-03-06 17:53 [PATCH v2 01/10] travis: add basic CI support roman.stratiienko
  2019-03-06 17:53 ` [PATCH v2 02/10] kernel: cobalt: replace ACCESS_ONCE with READ_ONCE roman.stratiienko
@ 2019-03-06 17:53 ` roman.stratiienko
  2019-03-06 17:53 ` [PATCH v2 04/10] kernel: cobalt: forward SRCARCH from the scripts/prepare-kernel.sh roman.stratiienko
                   ` (6 subsequent siblings)
  8 siblings, 0 replies; 14+ messages in thread
From: roman.stratiienko @ 2019-03-06 17:53 UTC (permalink / raw)
  To: xenomai; +Cc: Roman Stratiienko

From: Roman Stratiienko <roman.stratiienko@globallogic.com>

print_symbol() removed since v4.16-rc1 commit d2279c9d7f7d
("kallsyms: remove print_symbol() function")
use print_symbol for version less than v4.16 and printk starting from v4.16

Signed-off-by: Roman Stratiienko <roman.stratiienko@globallogic.com>
---
Since v1: add cast to (void *) to fix build warning
 kernel/cobalt/posix/process.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/kernel/cobalt/posix/process.c b/kernel/cobalt/posix/process.c
index d0f2f3725..85dd3cfb7 100644
--- a/kernel/cobalt/posix/process.c
+++ b/kernel/cobalt/posix/process.c
@@ -747,8 +747,13 @@ static inline int handle_exception(struct ipipe_trap_data *d)
 		}
 		splexit(s);
 #endif /* CONFIG_XENO_ARCH_FPU */
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 16, 0)
+		printk("invalid use of FPU in Xenomai context at %pS\n",
+		       (void *)xnarch_fault_pc(d));
+#else
 		print_symbol("invalid use of FPU in Xenomai context at %s\n",
 			     xnarch_fault_pc(d));
+#endif
 	}
 
 	/*
-- 
2.17.1



^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH v2 04/10] kernel: cobalt: forward SRCARCH from the scripts/prepare-kernel.sh
  2019-03-06 17:53 [PATCH v2 01/10] travis: add basic CI support roman.stratiienko
  2019-03-06 17:53 ` [PATCH v2 02/10] kernel: cobalt: replace ACCESS_ONCE with READ_ONCE roman.stratiienko
  2019-03-06 17:53 ` [PATCH v2 03/10] kernel: cobalt: use printk instead of print_symbol on v4.16 and later roman.stratiienko
@ 2019-03-06 17:53 ` roman.stratiienko
  2019-03-06 17:53 ` [PATCH v2 05/10] kernel: cobalt: trace: replace dummy array with field roman.stratiienko
                   ` (5 subsequent siblings)
  8 siblings, 0 replies; 14+ messages in thread
From: roman.stratiienko @ 2019-03-06 17:53 UTC (permalink / raw)
  To: xenomai; +Cc: Roman Stratiienko

From: Roman Stratiienko <roman.stratiienko@globallogic.com>

$SRCARCH removed since v4.18-rc1, upstream commit 104daea149c4
("kconfig: reference environment variables directly and remove 'option env='")

This will fix build with v4.18

Signed-off-by: Roman Stratiienko <roman.stratiienko@globallogic.com>
---
 scripts/Kconfig.frag      | 2 +-
 scripts/prepare-kernel.sh | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/scripts/Kconfig.frag b/scripts/Kconfig.frag
index cd39f7670..c9655d43a 100644
--- a/scripts/Kconfig.frag
+++ b/scripts/Kconfig.frag
@@ -16,7 +16,7 @@ menuconfig XENOMAI
 	  Please visit http://xenomai.org for more information.
 
 if XENOMAI
-source "arch/$SRCARCH/xenomai/Kconfig"
+source "arch/@SRCARCH@/xenomai/Kconfig"
 endif
 
 if MIGRATION
diff --git a/scripts/prepare-kernel.sh b/scripts/prepare-kernel.sh
index 964e42e83..8707b1198 100755
--- a/scripts/prepare-kernel.sh
+++ b/scripts/prepare-kernel.sh
@@ -376,6 +376,7 @@ case $linux_VERSION.$linux_PATCHLEVEL in
 	    -e "s,@VERSION_MINOR@,$version_minor,g" \
 	    -e "s,@REVISION_LEVEL@,$revision_level,g" \
 	    -e "s,@VERSION_STRING@,$version_string,g" \
+	    -e "s,@SRCARCH@,$linux_arch,g" \
 	    $xenomai_root/scripts/Kconfig.frag |
             patch_append init/Kconfig
     fi
-- 
2.17.1



^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH v2 05/10] kernel: cobalt: trace: replace dummy array with field
  2019-03-06 17:53 [PATCH v2 01/10] travis: add basic CI support roman.stratiienko
                   ` (2 preceding siblings ...)
  2019-03-06 17:53 ` [PATCH v2 04/10] kernel: cobalt: forward SRCARCH from the scripts/prepare-kernel.sh roman.stratiienko
@ 2019-03-06 17:53 ` roman.stratiienko
  2019-03-06 17:53 ` [PATCH v2 06/10] kernel: cobalt: replace siginfo_t with kernel_siginfo_t roman.stratiienko
                   ` (4 subsequent siblings)
  8 siblings, 0 replies; 14+ messages in thread
From: roman.stratiienko @ 2019-03-06 17:53 UTC (permalink / raw)
  To: xenomai; +Cc: Roman Stratiienko

From: Roman Stratiienko <roman.stratiienko@globallogic.com>

After kernel v4.18 commit 4a0772cf0674
("tracing: Prevent further users of zero size static arrays in trace events")
creating zero length arrays will force compile-time error

This will fix BUILD_BUG_ON error on v4.18 and later

Signed-off-by: Roman Stratiienko <roman.stratiienko@globallogic.com>
---
Since v1: Changed to __field
 kernel/cobalt/trace/cobalt-posix.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/cobalt/trace/cobalt-posix.h b/kernel/cobalt/trace/cobalt-posix.h
index 77392e725..910ef876a 100644
--- a/kernel/cobalt/trace/cobalt-posix.h
+++ b/kernel/cobalt/trace/cobalt-posix.h
@@ -266,7 +266,7 @@ DECLARE_EVENT_CLASS(cobalt_void,
 	TP_PROTO(int dummy),
 	TP_ARGS(dummy),
 	TP_STRUCT__entry(
-		__array(char, dummy, 0)
+		__field(int, dummy)
 	),
 	TP_fast_assign(
 		(void)dummy;
-- 
2.17.1



^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH v2 06/10] kernel: cobalt: replace siginfo_t with kernel_siginfo_t
  2019-03-06 17:53 [PATCH v2 01/10] travis: add basic CI support roman.stratiienko
                   ` (3 preceding siblings ...)
  2019-03-06 17:53 ` [PATCH v2 05/10] kernel: cobalt: trace: replace dummy array with field roman.stratiienko
@ 2019-03-06 17:53 ` roman.stratiienko
  2019-03-06 17:53 ` [PATCH v2 07/10] kernel: cobalt: rework access_rok and access_wok wrappers roman.stratiienko
                   ` (3 subsequent siblings)
  8 siblings, 0 replies; 14+ messages in thread
From: roman.stratiienko @ 2019-03-06 17:53 UTC (permalink / raw)
  To: xenomai; +Cc: Roman Stratiienko

From: Roman Stratiienko <roman.stratiienko@globallogic.com>

siginfo_t can't be used in kernel-space starting from v4.20-rc1 commit
ae7795bc6187 ("signal: Distinguish between kernel_siginfo and siginfo")
replace all siginfo_t to kernel_siginfo_t and create wrapper for kernel < v4.20

Signed-off-by: Roman Stratiienko <roman.stratiienko@globallogic.com>
---
 kernel/cobalt/include/linux/xenomai/wrappers.h | 4 ++++
 kernel/cobalt/posix/process.c                  | 2 +-
 kernel/cobalt/thread.c                         | 4 ++--
 3 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/kernel/cobalt/include/linux/xenomai/wrappers.h b/kernel/cobalt/include/linux/xenomai/wrappers.h
index 7d00aa9d4..847d68088 100644
--- a/kernel/cobalt/include/linux/xenomai/wrappers.h
+++ b/kernel/cobalt/include/linux/xenomai/wrappers.h
@@ -49,4 +49,8 @@
 #define ipipe_root_nr_syscalls(ti)	NR_syscalls
 #endif
 
+#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 20, 0)
+typedef siginfo_t kernel_siginfo_t;
+#endif
+
 #endif /* !_COBALT_LINUX_WRAPPERS_H */
diff --git a/kernel/cobalt/posix/process.c b/kernel/cobalt/posix/process.c
index 85dd3cfb7..ee4b70984 100644
--- a/kernel/cobalt/posix/process.c
+++ b/kernel/cobalt/posix/process.c
@@ -583,7 +583,7 @@ static inline void clear_threadinfo(void)
 static inline int disable_ondemand_memory(void)
 {
 	struct task_struct *p = current;
-	siginfo_t si;
+	kernel_siginfo_t si;
 
 	if ((p->mm->def_flags & VM_LOCKED) == 0) {
 		memset(&si, 0, sizeof(si));
diff --git a/kernel/cobalt/thread.c b/kernel/cobalt/thread.c
index a43d2f1ad..fa7a65569 100644
--- a/kernel/cobalt/thread.c
+++ b/kernel/cobalt/thread.c
@@ -2070,7 +2070,7 @@ void xnthread_relax(int notify, int reason)
 	struct xnthread *thread = xnthread_current();
 	struct task_struct *p = current;
 	int cpu __maybe_unused;
-	siginfo_t si;
+	kernel_siginfo_t si;
 
 	primary_mode_only();
 
@@ -2183,7 +2183,7 @@ static void lostage_task_signal(struct ipipe_work_header *work)
 	struct lostage_signal *rq;
 	struct xnthread *thread;
 	struct task_struct *p;
-	siginfo_t si;
+	kernel_siginfo_t si;
 	int signo;
 
 	rq = container_of(work, struct lostage_signal, work);
-- 
2.17.1



^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH v2 07/10] kernel: cobalt: rework access_rok and access_wok wrappers
  2019-03-06 17:53 [PATCH v2 01/10] travis: add basic CI support roman.stratiienko
                   ` (4 preceding siblings ...)
  2019-03-06 17:53 ` [PATCH v2 06/10] kernel: cobalt: replace siginfo_t with kernel_siginfo_t roman.stratiienko
@ 2019-03-06 17:53 ` roman.stratiienko
  2019-03-06 17:53 ` [PATCH v2 08/10] kernel: cobalt: add missing quotes in Kconfig roman.stratiienko
                   ` (2 subsequent siblings)
  8 siblings, 0 replies; 14+ messages in thread
From: roman.stratiienko @ 2019-03-06 17:53 UTC (permalink / raw)
  To: xenomai; +Cc: Roman Stratiienko

From: Roman Stratiienko <roman.stratiienko@globallogic.com>

Since kernel v5.0 upstream commit 96d4f267e40f
("Remove 'type' argument from access_ok() function")
 access_ok() function takes only 2 parameters

Change access_rok and access_wok wrappers for kernels
 starting from v5.0, and preserve them for earlier versions

This will fix build error on v5.0 and later

Signed-off-by: Roman Stratiienko <roman.stratiienko@globallogic.com>
---
 kernel/cobalt/include/asm-generic/xenomai/syscall.h | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/kernel/cobalt/include/asm-generic/xenomai/syscall.h b/kernel/cobalt/include/asm-generic/xenomai/syscall.h
index e14a9d1e3..0d50d4107 100644
--- a/kernel/cobalt/include/asm-generic/xenomai/syscall.h
+++ b/kernel/cobalt/include/asm-generic/xenomai/syscall.h
@@ -27,8 +27,13 @@
 #include <asm/xenomai/machine.h>
 #include <cobalt/uapi/asm-generic/syscall.h>
 
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 0, 0)
+#define access_rok(addr, size)	access_ok((addr), (size))
+#define access_wok(addr, size)	access_ok((addr), (size))
+#else
 #define access_rok(addr, size)	access_ok(VERIFY_READ, (addr), (size))
 #define access_wok(addr, size)	access_ok(VERIFY_WRITE, (addr), (size))
+#endif
 
 #define __xn_reg_arglist(regs)	\
 	__xn_reg_arg1(regs),	\
-- 
2.17.1



^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH v2 08/10] kernel: cobalt: add missing quotes in Kconfig
  2019-03-06 17:53 [PATCH v2 01/10] travis: add basic CI support roman.stratiienko
                   ` (5 preceding siblings ...)
  2019-03-06 17:53 ` [PATCH v2 07/10] kernel: cobalt: rework access_rok and access_wok wrappers roman.stratiienko
@ 2019-03-06 17:53 ` roman.stratiienko
  2019-03-06 17:53 ` [PATCH v2 09/10] kernel: cobalt: migrate to ktime_t roman.stratiienko
  2019-03-06 17:53 ` [PATCH v2 10/10] travis: append i-pipe arm-v4.20.7 and arm-v5.0 to the matrix roman.stratiienko
  8 siblings, 0 replies; 14+ messages in thread
From: roman.stratiienko @ 2019-03-06 17:53 UTC (permalink / raw)
  To: xenomai; +Cc: Roman Stratiienko

From: Roman Stratiienko <roman.stratiienko@globallogic.com>

Starting from kernel v5.0 commit f5451582c4e2
("kconfig: stop supporting '.' and '/' in unquoted words")
quotes are mandatory for usage

Signed-off-by: Roman Stratiienko <roman.stratiienko@globallogic.com>
---
 kernel/drivers/analogy/Kconfig | 8 ++++----
 kernel/drivers/can/Kconfig     | 4 ++--
 scripts/Kconfig.frag           | 2 +-
 3 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/kernel/drivers/analogy/Kconfig b/kernel/drivers/analogy/Kconfig
index e8fa953d5..858762bda 100644
--- a/kernel/drivers/analogy/Kconfig
+++ b/kernel/drivers/analogy/Kconfig
@@ -48,9 +48,9 @@ config XENO_DRIVERS_ANALOGY_DRIVER_DEBUG_LEVEL
        WARNING: this threshold is only applied on the Analogy
        driver. That will not affect the core.
 
-source drivers/xenomai/analogy/testing/Kconfig
-source drivers/xenomai/analogy/intel/Kconfig
-source drivers/xenomai/analogy/national_instruments/Kconfig
-source drivers/xenomai/analogy/sensoray/Kconfig
+source "drivers/xenomai/analogy/testing/Kconfig"
+source "drivers/xenomai/analogy/intel/Kconfig"
+source "drivers/xenomai/analogy/national_instruments/Kconfig"
+source "drivers/xenomai/analogy/sensoray/Kconfig"
 
 endmenu
diff --git a/kernel/drivers/can/Kconfig b/kernel/drivers/can/Kconfig
index 33ca722ad..0bbfcc9d1 100644
--- a/kernel/drivers/can/Kconfig
+++ b/kernel/drivers/can/Kconfig
@@ -85,7 +85,7 @@ config XENO_DRIVERS_CAN_FLEXCAN
 
 	Say Y here if you want to support for Freescale FlexCAN.
 
-source drivers/xenomai/can/mscan/Kconfig
-source drivers/xenomai/can/sja1000/Kconfig
+source "drivers/xenomai/can/mscan/Kconfig"
+source "drivers/xenomai/can/sja1000/Kconfig"
 
 endmenu
diff --git a/scripts/Kconfig.frag b/scripts/Kconfig.frag
index c9655d43a..f2e89a896 100644
--- a/scripts/Kconfig.frag
+++ b/scripts/Kconfig.frag
@@ -48,4 +48,4 @@ config XENO_REVISION_LEVEL
 
 config XENO_VERSION_STRING
        string
-       default @VERSION_STRING@
+       default "@VERSION_STRING@"
-- 
2.17.1



^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH v2 09/10] kernel: cobalt: migrate to ktime_t
  2019-03-06 17:53 [PATCH v2 01/10] travis: add basic CI support roman.stratiienko
                   ` (6 preceding siblings ...)
  2019-03-06 17:53 ` [PATCH v2 08/10] kernel: cobalt: add missing quotes in Kconfig roman.stratiienko
@ 2019-03-06 17:53 ` roman.stratiienko
  2019-03-19 14:52   ` Jan Kiszka
  2019-03-06 17:53 ` [PATCH v2 10/10] travis: append i-pipe arm-v4.20.7 and arm-v5.0 to the matrix roman.stratiienko
  8 siblings, 1 reply; 14+ messages in thread
From: roman.stratiienko @ 2019-03-06 17:53 UTC (permalink / raw)
  To: xenomai; +Cc: Roman Stratiienko

From: Roman Stratiienko <roman.stratiienko@globallogic.com>

As do_gettimeofday is very old and deprecated, use ktime instead

Signed-off-by: Roman Stratiienko <roman.stratiienko@globallogic.com>
---
 kernel/cobalt/clock.c                 | 4 +---
 kernel/drivers/analogy/rtdm_helpers.c | 5 +----
 2 files changed, 2 insertions(+), 7 deletions(-)

diff --git a/kernel/cobalt/clock.c b/kernel/cobalt/clock.c
index 272db3241..f8291b006 100644
--- a/kernel/cobalt/clock.c
+++ b/kernel/cobalt/clock.c
@@ -350,9 +350,7 @@ EXPORT_SYMBOL_GPL(xnclock_adjust);
 
 xnticks_t xnclock_get_host_time(void)
 {
-	struct timeval tv;
-	do_gettimeofday(&tv);
-	return tv.tv_sec * 1000000000ULL + tv.tv_usec * 1000;
+	return ktime_to_ns(ktime_get_real());
 }
 EXPORT_SYMBOL_GPL(xnclock_get_host_time);
 
diff --git a/kernel/drivers/analogy/rtdm_helpers.c b/kernel/drivers/analogy/rtdm_helpers.c
index 8330d0676..675594152 100644
--- a/kernel/drivers/analogy/rtdm_helpers.c
+++ b/kernel/drivers/analogy/rtdm_helpers.c
@@ -32,11 +32,8 @@ static nanosecs_abs_t a4l_clkofs;
 void a4l_init_time(void)
 {
 	nanosecs_abs_t t1, t2;
-	struct timeval tv;
 	t1 = rtdm_clock_read();
-	do_gettimeofday(&tv);
-	t2 = 1000000000 * ((nanosecs_abs_t)tv.tv_sec) +
-		1000000 * ((nanosecs_abs_t)tv.tv_usec);
+	t2 = ktime_to_ns(ktime_get_real());
 	a4l_clkofs = t2 - t1;
 }
 
-- 
2.17.1



^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH v2 10/10] travis: append i-pipe arm-v4.20.7 and arm-v5.0 to the matrix
  2019-03-06 17:53 [PATCH v2 01/10] travis: add basic CI support roman.stratiienko
                   ` (7 preceding siblings ...)
  2019-03-06 17:53 ` [PATCH v2 09/10] kernel: cobalt: migrate to ktime_t roman.stratiienko
@ 2019-03-06 17:53 ` roman.stratiienko
  2019-03-19 14:55   ` Jan Kiszka
  8 siblings, 1 reply; 14+ messages in thread
From: roman.stratiienko @ 2019-03-06 17:53 UTC (permalink / raw)
  To: xenomai; +Cc: Roman Stratiienko

From: Roman Stratiienko <roman.stratiienko@globallogic.com>

Signed-off-by: Roman Stratiienko <roman.stratiienko@globallogic.com>
---
 .travis.yml | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/.travis.yml b/.travis.yml
index 24889ca5f..ab23b745d 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -46,6 +46,16 @@ script:
 
 matrix:
   include:
+    - env:
+      - ARCH: arm
+        KERNEL_VERSION: 5.0
+        KERNEL_DEFCONFIG: multi_v7_defconfig
+        IPIPE_URL: https://github.com/devel-opi/linux-ipipe-arm-porting/releases/download/v5.0-draft1/ipipe-arm-v5.0-draft.patch
+    - env:
+      - ARCH: arm
+        KERNEL_VERSION: 4.20.7
+        KERNEL_DEFCONFIG: multi_v7_defconfig
+        IPIPE_URL: https://github.com/devel-opi/linux-ipipe-arm-porting/releases/download/draft-v4.20.7/0001-Draft-version-of-ipipe-arm-ported-on-v4.20.7.patch
     - env:
       - ARCH: arm
         KERNEL_VERSION: 4.14.85
-- 
2.17.1



^ permalink raw reply related	[flat|nested] 14+ messages in thread

* Re: [PATCH v2 09/10] kernel: cobalt: migrate to ktime_t
  2019-03-06 17:53 ` [PATCH v2 09/10] kernel: cobalt: migrate to ktime_t roman.stratiienko
@ 2019-03-19 14:52   ` Jan Kiszka
  0 siblings, 0 replies; 14+ messages in thread
From: Jan Kiszka @ 2019-03-19 14:52 UTC (permalink / raw)
  To: roman.stratiienko, xenomai

On 06.03.19 18:53, roman.stratiienko--- via Xenomai wrote:
> From: Roman Stratiienko <roman.stratiienko@globallogic.com>
> 
> As do_gettimeofday is very old and deprecated, use ktime instead
> 
> Signed-off-by: Roman Stratiienko <roman.stratiienko@globallogic.com>
> ---
>   kernel/cobalt/clock.c                 | 4 +---
>   kernel/drivers/analogy/rtdm_helpers.c | 5 +----
>   2 files changed, 2 insertions(+), 7 deletions(-)
> 
> diff --git a/kernel/cobalt/clock.c b/kernel/cobalt/clock.c
> index 272db3241..f8291b006 100644
> --- a/kernel/cobalt/clock.c
> +++ b/kernel/cobalt/clock.c
> @@ -350,9 +350,7 @@ EXPORT_SYMBOL_GPL(xnclock_adjust);
>   
>   xnticks_t xnclock_get_host_time(void)
>   {
> -	struct timeval tv;
> -	do_gettimeofday(&tv);
> -	return tv.tv_sec * 1000000000ULL + tv.tv_usec * 1000;
> +	return ktime_to_ns(ktime_get_real());
>   }
>   EXPORT_SYMBOL_GPL(xnclock_get_host_time);
>   
> diff --git a/kernel/drivers/analogy/rtdm_helpers.c b/kernel/drivers/analogy/rtdm_helpers.c
> index 8330d0676..675594152 100644
> --- a/kernel/drivers/analogy/rtdm_helpers.c
> +++ b/kernel/drivers/analogy/rtdm_helpers.c
> @@ -32,11 +32,8 @@ static nanosecs_abs_t a4l_clkofs;
>   void a4l_init_time(void)
>   {
>   	nanosecs_abs_t t1, t2;
> -	struct timeval tv;
>   	t1 = rtdm_clock_read();
> -	do_gettimeofday(&tv);
> -	t2 = 1000000000 * ((nanosecs_abs_t)tv.tv_sec) +
> -		1000000 * ((nanosecs_abs_t)tv.tv_usec);
> +	t2 = ktime_to_ns(ktime_get_real());
>   	a4l_clkofs = t2 - t1;
>   }
>   
> 

I'm leaving a note in the commit log that this also fixes a conversion bug in 
a4l_init_time.

Jan

-- 
Siemens AG, Corporate Technology, CT RDA IOT SES-DE
Corporate Competence Center Embedded Linux


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH v2 10/10] travis: append i-pipe arm-v4.20.7 and arm-v5.0 to the matrix
  2019-03-06 17:53 ` [PATCH v2 10/10] travis: append i-pipe arm-v4.20.7 and arm-v5.0 to the matrix roman.stratiienko
@ 2019-03-19 14:55   ` Jan Kiszka
  2019-03-19 17:43     ` Roman Stratiienko
  0 siblings, 1 reply; 14+ messages in thread
From: Jan Kiszka @ 2019-03-19 14:55 UTC (permalink / raw)
  To: roman.stratiienko, xenomai, Philippe Gerum

On 06.03.19 18:53, roman.stratiienko--- via Xenomai wrote:
> From: Roman Stratiienko <roman.stratiienko@globallogic.com>
> 
> Signed-off-by: Roman Stratiienko <roman.stratiienko@globallogic.com>
> ---
>   .travis.yml | 10 ++++++++++
>   1 file changed, 10 insertions(+)
> 
> diff --git a/.travis.yml b/.travis.yml
> index 24889ca5f..ab23b745d 100644
> --- a/.travis.yml
> +++ b/.travis.yml
> @@ -46,6 +46,16 @@ script:
>   
>   matrix:
>     include:
> +    - env:
> +      - ARCH: arm
> +        KERNEL_VERSION: 5.0
> +        KERNEL_DEFCONFIG: multi_v7_defconfig
> +        IPIPE_URL: https://github.com/devel-opi/linux-ipipe-arm-porting/releases/download/v5.0-draft1/ipipe-arm-v5.0-draft.patch
> +    - env:
> +      - ARCH: arm
> +        KERNEL_VERSION: 4.20.7
> +        KERNEL_DEFCONFIG: multi_v7_defconfig
> +        IPIPE_URL: https://github.com/devel-opi/linux-ipipe-arm-porting/releases/download/draft-v4.20.7/0001-Draft-version-of-ipipe-arm-ported-on-v4.20.7.patch
>       - env:
>         - ARCH: arm
>           KERNEL_VERSION: 4.14.85
> 

This one should come it via upstream ipipe. In fact, we should drop the 
patch-based kernel setup, replacing it with git branches. That will also allow 
including arm64 into the matrix, where we lack a patch release for the only 
supported kernel version: 4.14.

Applied all other 9 patches in this series to next now.

Thanks,
Jan

-- 
Siemens AG, Corporate Technology, CT RDA IOT SES-DE
Corporate Competence Center Embedded Linux


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH v2 10/10] travis: append i-pipe arm-v4.20.7 and arm-v5.0 to the matrix
  2019-03-19 14:55   ` Jan Kiszka
@ 2019-03-19 17:43     ` Roman Stratiienko
  2019-03-19 18:18       ` Jan Kiszka
  0 siblings, 1 reply; 14+ messages in thread
From: Roman Stratiienko @ 2019-03-19 17:43 UTC (permalink / raw)
  To: Jan Kiszka; +Cc: xenomai, Philippe Gerum

Some point about repository-based checking VS patch based.
CI is very useful for checking regressions caused by particuar commits. But
when mixing repositories we risk to get interferentions between them.
So it might be better to have separate CI for each ipipe repository.

вт, 19 мар. 2019 г., 16:56 Jan Kiszka <jan.kiszka@siemens.com>:

> On 06.03.19 18:53, roman.stratiienko--- via Xenomai wrote:
> > From: Roman Stratiienko <roman.stratiienko@globallogic.com>
> >
> > Signed-off-by: Roman Stratiienko <roman.stratiienko@globallogic.com>
> > ---
> >   .travis.yml | 10 ++++++++++
> >   1 file changed, 10 insertions(+)
> >
> > diff --git a/.travis.yml b/.travis.yml
> > index 24889ca5f..ab23b745d 100644
> > --- a/.travis.yml
> > +++ b/.travis.yml
> > @@ -46,6 +46,16 @@ script:
> >
> >   matrix:
> >     include:
> > +    - env:
> > +      - ARCH: arm
> > +        KERNEL_VERSION: 5.0
> > +        KERNEL_DEFCONFIG: multi_v7_defconfig
> > +        IPIPE_URL:
> https://github.com/devel-opi/linux-ipipe-arm-porting/releases/download/v5.0-draft1/ipipe-arm-v5.0-draft.patch
> > +    - env:
> > +      - ARCH: arm
> > +        KERNEL_VERSION: 4.20.7
> > +        KERNEL_DEFCONFIG: multi_v7_defconfig
> > +        IPIPE_URL:
> https://github.com/devel-opi/linux-ipipe-arm-porting/releases/download/draft-v4.20.7/0001-Draft-version-of-ipipe-arm-ported-on-v4.20.7.patch
> >       - env:
> >         - ARCH: arm
> >           KERNEL_VERSION: 4.14.85
> >
>
> This one should come it via upstream ipipe. In fact, we should drop the
> patch-based kernel setup, replacing it with git branches. That will also
> allow
> including arm64 into the matrix, where we lack a patch release for the
> only
> supported kernel version: 4.14.
>
> Applied all other 9 patches in this series to next now.
>
> Thanks,
> Jan
>
> --
> Siemens AG, Corporate Technology, CT RDA IOT SES-DE
> Corporate Competence Center Embedded Linux
>

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH v2 10/10] travis: append i-pipe arm-v4.20.7 and arm-v5.0 to the matrix
  2019-03-19 17:43     ` Roman Stratiienko
@ 2019-03-19 18:18       ` Jan Kiszka
  0 siblings, 0 replies; 14+ messages in thread
From: Jan Kiszka @ 2019-03-19 18:18 UTC (permalink / raw)
  To: Roman Stratiienko; +Cc: xenomai, Philippe Gerum

On 19.03.19 18:43, Roman Stratiienko wrote:
> Some point about repository-based checking VS patch based.
> CI is very useful for checking regressions caused by particuar commits. But when 
> mixing repositories we risk to get interferentions between them.
> So it might be better to have separate CI for each ipipe repository.

We need both in the end. But for stable I-pipe baselines, we could simply add 
"latest tag" mode to the CI system, besides "latest branch head". Both could 
pull from the same git repos.

Note that I also do not want to continuously tune the CI script because we 
released a new stable kernel patch somewhere.

Jan

> 
> вт, 19 мар. 2019 г., 16:56 Jan Kiszka <jan.kiszka@siemens.com 
> <mailto:jan.kiszka@siemens.com>>:
> 
>     On 06.03.19 18:53, roman.stratiienko--- via Xenomai wrote:
>      > From: Roman Stratiienko <roman.stratiienko@globallogic.com
>     <mailto:roman.stratiienko@globallogic.com>>
>      >
>      > Signed-off-by: Roman Stratiienko <roman.stratiienko@globallogic.com
>     <mailto:roman.stratiienko@globallogic.com>>
>      > ---
>      >   .travis.yml | 10 ++++++++++
>      >   1 file changed, 10 insertions(+)
>      >
>      > diff --git a/.travis.yml b/.travis.yml
>      > index 24889ca5f..ab23b745d 100644
>      > --- a/.travis.yml
>      > +++ b/.travis.yml
>      > @@ -46,6 +46,16 @@ script:
>      >
>      >   matrix:
>      >     include:
>      > +    - env:
>      > +      - ARCH: arm
>      > +        KERNEL_VERSION: 5.0
>      > +        KERNEL_DEFCONFIG: multi_v7_defconfig
>      > +        IPIPE_URL:
>     https://github.com/devel-opi/linux-ipipe-arm-porting/releases/download/v5.0-draft1/ipipe-arm-v5.0-draft.patch
>      > +    - env:
>      > +      - ARCH: arm
>      > +        KERNEL_VERSION: 4.20.7
>      > +        KERNEL_DEFCONFIG: multi_v7_defconfig
>      > +        IPIPE_URL:
>     https://github.com/devel-opi/linux-ipipe-arm-porting/releases/download/draft-v4.20.7/0001-Draft-version-of-ipipe-arm-ported-on-v4.20.7.patch
>      >       - env:
>      >         - ARCH: arm
>      >           KERNEL_VERSION: 4.14.85
>      >
> 
>     This one should come it via upstream ipipe. In fact, we should drop the
>     patch-based kernel setup, replacing it with git branches. That will also allow
>     including arm64 into the matrix, where we lack a patch release for the only
>     supported kernel version: 4.14.
> 
>     Applied all other 9 patches in this series to next now.
> 
>     Thanks,
>     Jan
> 
>     -- 
>     Siemens AG, Corporate Technology, CT RDA IOT SES-DE
>     Corporate Competence Center Embedded Linux
> 

-- 
Siemens AG, Corporate Technology, CT RDA IOT SES-DE
Corporate Competence Center Embedded Linux


^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2019-03-19 18:18 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-06 17:53 [PATCH v2 01/10] travis: add basic CI support roman.stratiienko
2019-03-06 17:53 ` [PATCH v2 02/10] kernel: cobalt: replace ACCESS_ONCE with READ_ONCE roman.stratiienko
2019-03-06 17:53 ` [PATCH v2 03/10] kernel: cobalt: use printk instead of print_symbol on v4.16 and later roman.stratiienko
2019-03-06 17:53 ` [PATCH v2 04/10] kernel: cobalt: forward SRCARCH from the scripts/prepare-kernel.sh roman.stratiienko
2019-03-06 17:53 ` [PATCH v2 05/10] kernel: cobalt: trace: replace dummy array with field roman.stratiienko
2019-03-06 17:53 ` [PATCH v2 06/10] kernel: cobalt: replace siginfo_t with kernel_siginfo_t roman.stratiienko
2019-03-06 17:53 ` [PATCH v2 07/10] kernel: cobalt: rework access_rok and access_wok wrappers roman.stratiienko
2019-03-06 17:53 ` [PATCH v2 08/10] kernel: cobalt: add missing quotes in Kconfig roman.stratiienko
2019-03-06 17:53 ` [PATCH v2 09/10] kernel: cobalt: migrate to ktime_t roman.stratiienko
2019-03-19 14:52   ` Jan Kiszka
2019-03-06 17:53 ` [PATCH v2 10/10] travis: append i-pipe arm-v4.20.7 and arm-v5.0 to the matrix roman.stratiienko
2019-03-19 14:55   ` Jan Kiszka
2019-03-19 17:43     ` Roman Stratiienko
2019-03-19 18:18       ` Jan Kiszka

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.