introduce latmus
v3 cover introduce latmus
Latmus is a backport from EVL to Cobalt, the procedure is fully described here: https://evlproject.org/core/benchmarks/
I verified all functions of latmus on hardware environment under which Rock PI X board connect GPIOs with FRDM K64F.But actually Rock PI X V1.4 board's GPIO I/O voltage is 1.8V does not match 3.3V of FRDM K64F board. Even though I tried to set up IO shifter board to bridge two boards, still can not get correct latecny data because of bad IO signal. So I have to work around to loopback Input/Output GPIOs on both boards to do verify functions.
Hardware setup:
---------------------------------------------------
eth| |eth
+ +
FRDM K64F board Rock PI X board
| | | |
+_________+ +___________+
GPIO Loopback GPIO Loopback
hongzha1 (3):
rtdm/testing: latmus: introduce latmus driver drivers/gpio: core: introduce helper to find gpiochip testsuite/latmus: introduce latmus benchmark
configure.ac | 1 + doc/asciidoc/Makefile.am | 2 + doc/asciidoc/man1/latmus.adoc | 112 +++ include/cobalt/kernel/rtdm/gpio.h | 3 + include/rtdm/uapi/testing.h | 79 ++ kernel/drivers/gpio/gpio-core.c | 23 + kernel/drivers/testing/Kconfig | 10 + kernel/drivers/testing/Makefile | 3 + kernel/drivers/testing/latmus.c | 1237 ++++++++++++++++++++++++ testsuite/Makefile.am | 4 +- testsuite/latmus/Makefile.am | 18 + testsuite/latmus/latmus.c | 1446 +++++++++++++++++++++++++++++ 12 files changed, 2937 insertions(+), 1 deletion(-) create mode 100644 doc/asciidoc/man1/latmus.adoc create mode 100644 kernel/drivers/testing/latmus.c create mode 100644 testsuite/latmus/Makefile.am create mode 100644 testsuite/latmus/latmus.c
Signature · 1 line
2.17.1
PATCH v3 1/3 rtdm/testing: latmus: introduce latmus driver
To support the latmus application for determining the best gravity values for the cobalt core clock, and measuring the response time to timer events.
--- include/rtdm/uapi/testing.h | 63 ++ kernel/drivers/testing/Kconfig | 10 + kernel/drivers/testing/Makefile | 3 + kernel/drivers/testing/latmus.c | 1237 +++++++++++++++++++++++++++++++ 4 files changed, 1313 insertions(+) create mode 100644 kernel/drivers/testing/latmus.c
include/rtdm/uapi/testing.h +63 -0
@@ -118,6 +118,52 @@ struct rttst_heap_stathdr {struct rttst_heap_stats *buf; }; +/* Latmus context types. */ +#define COBALT_LAT_IRQ 0 +#define COBALT_LAT_KERN 1 +#define COBALT_LAT_USER 2 +#define COBALT_LAT_SIRQ 3 +#define COBALT_LAT_LAST COBALT_LAT_SIRQ + +struct latmus_setup { +__u32 type; +__u64 period; +__s32 priority; +__u32 cpu; +union { +struct { +__u32 verbosity; + } tune; +struct { +__u32 xfd; +__u32 hcells; + } measure; + } u; +}; + +/* +* The measurement record which the driver sends to userland each +* second through an xbuf channel. +*/ +struct latmus_measurement { +__s64 sum_lat; +__s32 min_lat; +__s32 max_lat; +__u32 overruns; +__u32 samples; +}; + +struct latmus_measurement_result { +__u64 last_ptr;/* (struct latmus_measurement __user *last) */ +__u64 histogram_ptr;/* (__s32 __user *histogram) */ +__u32 len; +}; + +struct latmus_result { +__u64 data_ptr;/* (void __user *data) */ +__u32 len; +}; +#define RTIOC_TYPE_TESTING RTDM_CLASS_TESTING/*!
@@ -133,6 +179,8 @@ struct rttst_heap_stathdr {#define RTDM_SUBCLASS_RTDMTEST 3/** subclase name: "heapcheck" */ #define RTDM_SUBCLASS_HEAPCHECK 4 +/** subclase name: "latmus" */ +#define RTDM_SUBCLASS_LATMUS 5/** @} */ /*!
@@ -193,6 +241,21 @@ struct rttst_heap_stathdr {#define RTTST_RTIOC_HEAP_STAT_COLLECT \ _IOR(RTIOC_TYPE_TESTING, 0x45, int) +#define RTTST_RTIOC_COBALT_LATIOC_TUNE \ + _IOWR(RTIOC_TYPE_TESTING, 0x50, struct latmus_setup) + +#define RTTST_RTIOC_COBALT_LATIOC_MEASURE \ + _IOWR(RTIOC_TYPE_TESTING, 0x51, struct latmus_setup) + +#define RTTST_RTIOC_COBALT_LATIOC_RUN \ + _IOR(RTIOC_TYPE_TESTING, 0x52, struct latmus_result) + +#define RTTST_RTIOC_COBALT_LATIOC_PULSE \ + _IOW(RTIOC_TYPE_TESTING, 0x53, __u64) + +#define RTTST_RTIOC_COBALT_LATIOC_RESET \ + _IO(RTIOC_TYPE_TESTING, 0x54) +/** @} */ #endif /* !_RTDM_UAPI_TESTING_H */
kernel/drivers/testing/Kconfig +10 -0
@@ -26,4 +26,14 @@ config XENO_DRIVERS_RTDMTEST help Kernel driver for performing RTDM unit tests. +config XENO_DRIVERS_LATMUS + bool "Timer latency calibration and measurement" + depends on DOVETAIL && XENO_OPT_PIPE + default y + help + This driver supports the latmus application for + determining the best gravity values for the cobalt core + clock, and measuring the response time to timer events. + If in doubt, say 'Y'. + endmenu
kernel/drivers/testing/Makefile +3 -0
@@ -3,6 +3,7 @@ obj-$(CONFIG_XENO_DRIVERS_TIMERBENCH) += xeno_timerbench.o obj-$(CONFIG_XENO_DRIVERS_SWITCHTEST) += xeno_switchtest.o obj-$(CONFIG_XENO_DRIVERS_RTDMTEST) += xeno_rtdmtest.o obj-$(CONFIG_XENO_DRIVERS_HEAPCHECK) += xeno_heapcheck.o +obj-$(CONFIG_XENO_DRIVERS_LATMUS) += xeno_latmus.o xeno_timerbench-y := timerbench.o
@@ -11,3 +12,5 @@ xeno_switchtest-y := switchtest.o xeno_rtdmtest-y := rtdmtest.o xeno_heapcheck-y := heapcheck.o + +xeno_latmus-y := latmus.o
kernel/drivers/testing/latmus.c new file +1237 -0
1,237 lines not on this page · raw message
Signature · 1 line
2.17.1
Re: [PATCH V3 1/3] rtdm/testing: latmus: introduce latmus driver
Quoted 13 lines · On 21.04.21 07:05, hongzha1 via Xenomai wrote:
To support the latmus application for determining the best gravity values for the cobalt core clock, and measuring the response time to timer events.
Signed-off-by hongzha1 <[email protected]>--- include/rtdm/uapi/testing.h | 63 ++ kernel/drivers/testing/Kconfig | 10 + kernel/drivers/testing/Makefile | 3 + kernel/drivers/testing/latmus.c | 1237 +++++++++++++++++++++++++++++++ 4 files changed, 1313 insertions(+) create mode 100644 kernel/drivers/testing/latmus.c
...
Quoted 34 lines
kernel/drivers/testing/latmus.c new file +28
-0@@ -0,0 +1,1237 @@ +/* +* SPDX-License-Identifier: GPL-2.0 +* +* Derived from Xenomai Cobalt's autotune driver, https://xenomai.org/ +* Copyright (C) 2014, 2018 Philippe Gerum <[email protected]> +*/ + +#include <linux/types.h> +#include <linux/init.h> +#include <linux/module.h> +#include <linux/slab.h> +#include <linux/kernel.h> +#include <linux/sort.h> +#include <linux/cdev.h> +#include <linux/fs.h> +#include <linux/fcntl.h> +#include <cobalt/kernel/pipe.h> +#include <cobalt/kernel/sched.h> +#include <rtdm/ipc.h> +#include <rtdm/testing.h> +#include <rtdm/driver.h> +#include <rtdm/compat.h> + +#define ONE_BILLION 1000000000 +#define TUNER_SAMPLING_TIME 500000000UL +#define TUNER_WARMUP_STEPS 10 +#define TUNER_RESULT_STEPS 40 +
kernel/drivers/testing/latmus.c line 38
Quoted 10 lines
kernel/drivers/testing/latmus.c new file +10
-0+#define progress(__runner, __fmt, __args...) \ + do { \ + if ((__runner)->verbosity > 1) \ + printk(XENO_INFO "latmus(%s) " __fmt "\n", \ + (__runner)->name, ##__args); \ + } while (0) + +#define cobalt_init_xntimer_on_cpu (__timer, __cpu, __handler) \ + rtdm_timer_init_on_cpu(__timer, __handler, \ + #__handler, __cpu)
Why this wrapper? Why not calling rtdm_timer... directly?
Jan
Signature · 2 lines
Siemens AG, T RDA IOT Corporate Competence Center Embedded Linux
RE: [PATCH V3 1/3] rtdm/testing: latmus: introduce latmus driver
Quoted 63 lines
-----Original Message-----
From: Jan Kiszka <[email protected]>
Sent: Thursday, May 20, 2021 11:54 PM
To: Chen, Hongzhan <[email protected]>; [email protected]
Subject: Re: [PATCH V3 1/3] rtdm/testing: latmus: introduce latmus driverQuoted 13 lines · On 21.04.21 07:05, hongzha1 via Xenomai wrote:
To support the latmus application for determining the best gravity values for the cobalt core clock, and measuring the response time to timer events.
Signed-off-by hongzha1 <[email protected]>--- include/rtdm/uapi/testing.h | 63 ++ kernel/drivers/testing/Kconfig | 10 + kernel/drivers/testing/Makefile | 3 + kernel/drivers/testing/latmus.c | 1237 +++++++++++++++++++++++++++++++ 4 files changed, 1313 insertions(+) create mode 100644 kernel/drivers/testing/latmus.c...
Quoted 38 lines
kernel/drivers/testing/latmus.c new file +32
-0@@ -0,0 +1,1237 @@ +/* +* SPDX-License-Identifier: GPL-2.0 +* +* Derived from Xenomai Cobalt's autotune driver, https://xenomai.org/ +* Copyright (C) 2014, 2018 Philippe Gerum <[email protected]> +*/ + +#include <linux/types.h> +#include <linux/init.h> +#include <linux/module.h> +#include <linux/slab.h> +#include <linux/kernel.h> +#include <linux/sort.h> +#include <linux/cdev.h> +#include <linux/fs.h> +#include <linux/fcntl.h> +#include <cobalt/kernel/pipe.h> +#include <cobalt/kernel/sched.h> +#include <rtdm/ipc.h> +#include <rtdm/testing.h> +#include <rtdm/driver.h> +#include <rtdm/compat.h> + +#define ONE_BILLION 1000000000 +#define TUNER_SAMPLING_TIME 500000000UL +#define TUNER_WARMUP_STEPS 10 +#define TUNER_RESULT_STEPS 40 + +#define progress(__runner, __fmt, __args...) \ + do { \ + if ((__runner)->verbosity > 1) \ + printk(XENO_INFO "latmus(%s) " __fmt "\n", \
Quoted 8 lines
kernel/drivers/testing/latmus.c line 38
Quoted 6 lines
kernel/drivers/testing/latmus.c new file +6
-0+ (__runner)->name, ##__args); \ + } while (0) + +#define cobalt_init_xntimer_on_cpu (__timer, __cpu, __handler) \ + rtdm_timer_init_on_cpu(__timer, __handler, \ + #__handler, __cpu)Why this wrapper? Why not calling
rtdm_timer... directly?
Of course, we can call rtdm_timer... directly. My reason is :
1. When I ported it from evl , I just want to align with original as I can to pass same number of parameters here to replace evl_init_timer_on_cpu.
2. In addition ,when use this wrapper, caller may not need to care about name when it does not matter for user because define would handle it by default.
Regards
Hongzhan Chen
Quoted 6 lines
Jan
Signature · 2 lines
Siemens AG, T RDA IOT Corporate Competence Center Embedded Linux
Re: [PATCH V3 1/3] rtdm/testing: latmus: introduce latmus driver
Quoted 41 lines · Hongzhan
Quoted 41 lines
-----Original Message-----
From: Jan Kiszka <[email protected]>
Sent: Thursday, May 20, 2021 11:54 PM
To: Chen, Hongzhan <[email protected]>; [email protected]
Subject: Re: [PATCH V3 1/3] rtdm/testing: latmus: introduce latmus driverQuoted 13 lines · On 21.04.21 07:05, hongzha1 via Xenomai wrote:
To support the latmus application for determining the best gravity values for the cobalt core clock, and measuring the response time to timer events.
Signed-off-by hongzha1 <[email protected]>--- include/rtdm/uapi/testing.h | 63 ++ kernel/drivers/testing/Kconfig | 10 + kernel/drivers/testing/Makefile | 3 + kernel/drivers/testing/latmus.c | 1237 +++++++++++++++++++++++++++++++ 4 files changed, 1313 insertions(+) create mode 100644 kernel/drivers/testing/latmus.c...
Quoted 16 lines
kernel/drivers/testing/latmus.c new file +10
-0@@ -0,0 +1,1237 @@ +/* +* SPDX-License-Identifier: GPL-2.0 +* +* Derived from Xenomai Cobalt's autotune driver, https://xenomai.org/ +* Copyright (C) 2014, 2018 Philippe Gerum <[email protected]> +*/ + +#include <linux/types.h> +#include <linux/init.h> +#include <linux/module.h>
Quoted 8 lines
Quoted 8 lines
kernel/drivers/testing/latmus.c line 18
Quoted 8 lines
kernel/drivers/testing/latmus.c new file +8
-0+#include <linux/slab.h> +#include <linux/kernel.h> +#include <linux/sort.h> +#include <linux/cdev.h> +#include <linux/fs.h> +#include <linux/fcntl.h> +#include <cobalt/kernel/pipe.h> +#include <cobalt/kernel/sched.h>
Do we need those two? RTDM should be the interface when possible. And if some RTDM header is need of any of them, that would be a bug and a separate patch.
Quoted 23 lines
Quoted 14 lines
Quoted 14 lines
kernel/drivers/testing/latmus.c new file +14
-0+#include <rtdm/ipc.h> +#include <rtdm/testing.h> +#include <rtdm/driver.h> +#include <rtdm/compat.h> + +#define ONE_BILLION 1000000000 +#define TUNER_SAMPLING_TIME 500000000UL +#define TUNER_WARMUP_STEPS 10 +#define TUNER_RESULT_STEPS 40 + +#define progress(__runner, __fmt, __args...) \ + do { \ + if ((__runner)->verbosity > 1) \ + printk(XENO_INFO "latmus(%s) " __fmt "\n", \Quoted 8 lines
kernel/drivers/testing/latmus.c line 38
Quoted 6 lines
kernel/drivers/testing/latmus.c new file +6
-0+ (__runner)->name, ##__args); \ + } while (0) + +#define cobalt_init_xntimer_on_cpu (__timer, __cpu, __handler) \ + rtdm_timer_init_on_cpu(__timer, __handler, \ + #__handler, __cpu)Why this wrapper? Why not calling
rtdm_timer... directly?
Quoted 7 lines
Of course, we can call
rtdm_timer... directly. My reason is :1. When I ported it from evl , I just want to align with original as I can to pass same number of parameters here to replace
evl_init_timer_on_cpu.
2. In addition ,when use this wrapper, caller may not need to care about name when it does not matter for user because define would handle it by default.
The current code is abstracting a single use case (you can't use the code over evl as-is) - that is usually not a good idea. Once you have two or more active use cases, abstraction can still be done.
Jan
Signature · 2 lines
Siemens AG, T RDA IOT Corporate Competence Center Embedded Linux
RE: [PATCH V3 1/3] rtdm/testing: latmus: introduce latmus driver
Quoted 54 lines
-----Original Message-----
From: Jan Kiszka <[email protected]>
Sent: Friday, May 21, 2021 2:21 PM
To: Chen, Hongzhan <[email protected]>; [email protected]
Subject: Re: [PATCH V3 1/3] rtdm/testing: latmus: introduce latmus driverQuoted 45 lines · Hongzhan
Quoted 45 lines
-----Original Message-----
From: Jan Kiszka <[email protected]>
Sent: Thursday, May 20, 2021 11:54 PM
To: Chen, Hongzhan <[email protected]>; [email protected]
Subject: Re: [PATCH V3 1/3] rtdm/testing: latmus: introduce latmus driverQuoted 13 lines · On 21.04.21 07:05, hongzha1 via Xenomai wrote:
To support the latmus application for determining the best gravity values for the cobalt core clock, and measuring the response time to timer events.
Signed-off-by hongzha1 <[email protected]>--- include/rtdm/uapi/testing.h | 63 ++ kernel/drivers/testing/Kconfig | 10 + kernel/drivers/testing/Makefile | 3 + kernel/drivers/testing/latmus.c | 1237 +++++++++++++++++++++++++++++++ 4 files changed, 1313 insertions(+) create mode 100644 kernel/drivers/testing/latmus.c...
Quoted 20 lines
kernel/drivers/testing/latmus.c new file +14
-0@@ -0,0 +1,1237 @@ +/* +* SPDX-License-Identifier: GPL-2.0 +* +* Derived from Xenomai Cobalt's autotune driver, https://xenomai.org/ +* Copyright (C) 2014, 2018 Philippe Gerum <[email protected]> +*/ + +#include <linux/types.h> +#include <linux/init.h> +#include <linux/module.h> +#include <linux/slab.h> +#include <linux/kernel.h> +#include <linux/sort.h> +#include <linux/cdev.h>
Quoted 8 lines
Quoted 4 lines
Quoted 4 lines
kernel/drivers/testing/latmus.c line 18
Quoted 4 lines
kernel/drivers/testing/latmus.c new file +4
-0+#include <linux/fs.h> +#include <linux/fcntl.h> +#include <cobalt/kernel/pipe.h> +#include <cobalt/kernel/sched.h> Do we need those two? RTDM should be the interface when possible. And if some RTDM header is need of any of them, that would be a bug and a separate patch.
Thanks for your pointing out. Yes, we do not need sched.h here but we need pipe.h because latmus make use of xnpipe.
Quoted 32 lines
Quoted 24 lines
Quoted 15 lines
Quoted 15 lines
kernel/drivers/testing/latmus.c new file +14
-0+#include <rtdm/ipc.h> +#include <rtdm/testing.h> +#include <rtdm/driver.h> +#include <rtdm/compat.h> + +#define ONE_BILLION 1000000000 +#define TUNER_SAMPLING_TIME 500000000UL +#define TUNER_WARMUP_STEPS 10 +#define TUNER_RESULT_STEPS 40 + +#define progress(__runner, __fmt, __args...) \ + do { \ + if ((__runner)->verbosity > 1) \ + printk(XENO_INFO "latmus(%s) " __fmt "\n", \Quoted 8 lines
kernel/drivers/testing/latmus.c line 38
Quoted 6 lines
kernel/drivers/testing/latmus.c new file +6
-0+ (__runner)->name, ##__args); \ + } while (0) + +#define cobalt_init_xntimer_on_cpu (__timer, __cpu, __handler) \ + rtdm_timer_init_on_cpu(__timer, __handler, \ + #__handler, __cpu)Why this wrapper? Why not calling
rtdm_timer... directly?Quoted 7 lines
Of course, we can call
rtdm_timer... directly. My reason is :1. When I ported it from evl , I just want to align with original as I can to pass same number of parameters here to replace
evl_init_timer_on_cpu.
2. In addition ,when use this wrapper, caller may not need to care about name when it does not matter for user because define would handle it by default.
Quoted 3 lines
The current code is abstracting a single use case (you can't use the code over evl as-is) - that is usually not a good idea. Once you have two or more active use cases, abstraction can still be done.
Is it better to move this wrapper to ./include/cobalt/kernel/rtdm/driver.h just like evl_init_timer_on_rq doing in include/evl/timer.h?
Regards
Hongzhan Chen
Quoted 3 lines
Jan
Re: [PATCH V3 1/3] rtdm/testing: latmus: introduce latmus driver
Quoted 98 lines · Hongzhan
Quoted 54 lines
-----Original Message-----
From: Jan Kiszka <[email protected]>
Sent: Friday, May 21, 2021 2:21 PM
To: Chen, Hongzhan <[email protected]>; [email protected]
Subject: Re: [PATCH V3 1/3] rtdm/testing: latmus: introduce latmus driverQuoted 45 lines · Hongzhan
Quoted 45 lines
-----Original Message-----
From: Jan Kiszka <[email protected]>
Sent: Thursday, May 20, 2021 11:54 PM
To: Chen, Hongzhan <[email protected]>; [email protected]
Subject: Re: [PATCH V3 1/3] rtdm/testing: latmus: introduce latmus driverQuoted 13 lines · On 21.04.21 07:05, hongzha1 via Xenomai wrote:
To support the latmus application for determining the best gravity values for the cobalt core clock, and measuring the response time to timer events.
Signed-off-by hongzha1 <[email protected]>--- include/rtdm/uapi/testing.h | 63 ++ kernel/drivers/testing/Kconfig | 10 + kernel/drivers/testing/Makefile | 3 + kernel/drivers/testing/latmus.c | 1237 +++++++++++++++++++++++++++++++ 4 files changed, 1313 insertions(+) create mode 100644 kernel/drivers/testing/latmus.c...
Quoted 20 lines
kernel/drivers/testing/latmus.c new file +14
-0@@ -0,0 +1,1237 @@ +/* +* SPDX-License-Identifier: GPL-2.0 +* +* Derived from Xenomai Cobalt's autotune driver, https://xenomai.org/ +* Copyright (C) 2014, 2018 Philippe Gerum <[email protected]> +*/ + +#include <linux/types.h> +#include <linux/init.h> +#include <linux/module.h> +#include <linux/slab.h> +#include <linux/kernel.h> +#include <linux/sort.h> +#include <linux/cdev.h> Quoted 8 lines
Quoted 4 lines
Quoted 4 lines
kernel/drivers/testing/latmus.c line 18
Quoted 4 lines
kernel/drivers/testing/latmus.c new file +4
-0+#include <linux/fs.h> +#include <linux/fcntl.h> +#include <cobalt/kernel/pipe.h> +#include <cobalt/kernel/sched.h> Do we need those two? RTDM should be the interface when possible. And if some RTDM header is need of any of them, that would be a bug and a separate patch.
Thanks for your pointing out. Yes, we do not need
sched.hhere but we needpipe.hbecause latmus make use of xnpipe.Quoted 32 lines
Quoted 31 lines
Quoted 15 lines
Quoted 15 lines
kernel/drivers/testing/latmus.c new file +14
-0+#include <rtdm/ipc.h> +#include <rtdm/testing.h> +#include <rtdm/driver.h> +#include <rtdm/compat.h> + +#define ONE_BILLION 1000000000 +#define TUNER_SAMPLING_TIME 500000000UL +#define TUNER_WARMUP_STEPS 10 +#define TUNER_RESULT_STEPS 40 + +#define progress(__runner, __fmt, __args...) \ + do { \ + if ((__runner)->verbosity > 1) \ + printk(XENO_INFO "latmus(%s) " __fmt "\n", \Quoted 8 lines
kernel/drivers/testing/latmus.c line 38
Quoted 6 lines
kernel/drivers/testing/latmus.c new file +6
-0+ (__runner)->name, ##__args); \ + } while (0) + +#define cobalt_init_xntimer_on_cpu (__timer, __cpu, __handler) \ + rtdm_timer_init_on_cpu(__timer, __handler, \ + #__handler, __cpu)Why this wrapper? Why not calling
rtdm_timer... directly?Of course, we can call
rtdm_timer... directly. My reason is :1. When I ported it from evl , I just want to align with original as I can to pass same number of parameters here to replace
evl_init_timer_on_cpu.
2. In addition ,when use this wrapper, caller may not need to care about name when it does not matter for user because define would handle it by default.
Quoted 6 lines
Quoted 3 lines
The current code is abstracting a single use case (you can't use the code over evl as-is) - that is usually not a good idea. Once you have two or more active use cases, abstraction can still be done.
Is it better to move this wrapper to
./include/cobalt/kernel/rtdm/driver.hjust likeevl_init_timer_on_rqdoing ininclude/evl/timer.h?
If you can make the code work as-is also against evl, the wrapper should probably be out-of-line (and applied to both sides). But that should likely be a latmus-local header, nothing in rtdm/driver.h. At the current stage, you are using RTDM, and current EVL has no RTDM wrapper - thus rtdm_timer_init_on_cpu is only one of the many Xenomai 3 specifics in the patch.
Jan
Signature · 2 lines
Siemens AG, T RDA IOT Corporate Competence Center Embedded Linux
Re: [PATCH V3 1/3] rtdm/testing: latmus: introduce latmus driver
In reply to Chen, HongzhanQuoted 96 lines · Hongzhan via Xenomai
Quoted 52 lines
-----Original Message-----
From: Jan Kiszka <[email protected]>
Sent: Friday, May 21, 2021 2:21 PM
To: Chen, Hongzhan <[email protected]>; [email protected]
Subject: Re: [PATCH V3 1/3] rtdm/testing: latmus: introduce latmus driverQuoted 45 lines · Hongzhan
Quoted 45 lines
-----Original Message-----
From: Jan Kiszka <[email protected]>
Sent: Thursday, May 20, 2021 11:54 PM
To: Chen, Hongzhan <[email protected]>; [email protected]
Subject: Re: [PATCH V3 1/3] rtdm/testing: latmus: introduce latmus driverQuoted 13 lines · On 21.04.21 07:05, hongzha1 via Xenomai wrote:
To support the latmus application for determining the best gravity values for the cobalt core clock, and measuring the response time to timer events.
Signed-off-by hongzha1 <[email protected]>--- include/rtdm/uapi/testing.h | 63 ++ kernel/drivers/testing/Kconfig | 10 + kernel/drivers/testing/Makefile | 3 + kernel/drivers/testing/latmus.c | 1237 +++++++++++++++++++++++++++++++ 4 files changed, 1313 insertions(+) create mode 100644 kernel/drivers/testing/latmus.c...
Quoted 20 lines
kernel/drivers/testing/latmus.c new file +14
-0@@ -0,0 +1,1237 @@ +/* +* SPDX-License-Identifier: GPL-2.0 +* +* Derived from Xenomai Cobalt's autotune driver, https://xenomai.org/ +* Copyright (C) 2014, 2018 Philippe Gerum <[email protected]> +*/ + +#include <linux/types.h> +#include <linux/init.h> +#include <linux/module.h> +#include <linux/slab.h> +#include <linux/kernel.h> +#include <linux/sort.h> +#include <linux/cdev.h> Quoted 8 lines
Quoted 4 lines
Quoted 4 lines
kernel/drivers/testing/latmus.c line 18
Quoted 4 lines
kernel/drivers/testing/latmus.c new file +4
-0+#include <linux/fs.h> +#include <linux/fcntl.h> +#include <cobalt/kernel/pipe.h> +#include <cobalt/kernel/sched.h> Do we need those two? RTDM should be the interface when possible. And if some RTDM header is need of any of them, that would be a bug and a separate patch.
Thanks for your pointing out. Yes, we do not need
sched.hhere but we needpipe.hbecause latmus make use of xnpipe.Quoted 32 lines
Quoted 31 lines
Quoted 15 lines
Quoted 15 lines
kernel/drivers/testing/latmus.c new file +14
-0+#include <rtdm/ipc.h> +#include <rtdm/testing.h> +#include <rtdm/driver.h> +#include <rtdm/compat.h> + +#define ONE_BILLION 1000000000 +#define TUNER_SAMPLING_TIME 500000000UL +#define TUNER_WARMUP_STEPS 10 +#define TUNER_RESULT_STEPS 40 + +#define progress(__runner, __fmt, __args...) \ + do { \ + if ((__runner)->verbosity > 1) \ + printk(XENO_INFO "latmus(%s) " __fmt "\n", \Quoted 8 lines
kernel/drivers/testing/latmus.c line 38
Quoted 6 lines
kernel/drivers/testing/latmus.c new file +6
-0+ (__runner)->name, ##__args); \ + } while (0) + +#define cobalt_init_xntimer_on_cpu (__timer, __cpu, __handler) \ + rtdm_timer_init_on_cpu(__timer, __handler, \ + #__handler, __cpu)Why this wrapper? Why not calling
rtdm_timer... directly?Of course, we can call
rtdm_timer... directly. My reason is :1. When I ported it from evl , I just want to align with original as I can to pass same number of parameters here to replace
evl_init_timer_on_cpu.
2. In addition ,when use this wrapper, caller may not need to care about name when it does not matter for user because define would handle it by default.
Quoted 7 lines
Quoted 3 lines
The current code is abstracting a single use case (you can't use the code over evl as-is) - that is usually not a good idea. Once you have two or more active use cases, abstraction can still be done.
Is it better to move this wrapper to
./include/cobalt/kernel/rtdm/driver.hjust likeevl_init_timer_on_rqdoing ininclude/evl/timer.h?
Generally speaking, I don't see any benefit in sharing a generic latmus implementation that would build on top of the Cobalt/EVL cores with no change.
The version for Xenomai3 must stick with the RTDM interface, just like the Xenomai4 implementation will stay with the EVL kernel API. If services are missing in the current RTDM specs to support latmus, a discussion should take place so that we may propose them for integration into the CXP.
Signature · 1 line
Philippe.
RE: [PATCH V3 1/3] rtdm/testing: latmus: introduce latmus driver
Quoted 120 lines
-----Original Message-----
From: Philippe Gerum <[email protected]>
Sent: Monday, May 24, 2021 12:51 AM
To: Chen, Hongzhan <[email protected]>
Cc: Jan Kiszka <[email protected]>; [email protected]
Subject: Re: [PATCH V3 1/3] rtdm/testing: latmus: introduce latmus driverQuoted 96 lines · Hongzhan via Xenomai
Quoted 52 lines
-----Original Message-----
From: Jan Kiszka <[email protected]>
Sent: Friday, May 21, 2021 2:21 PM
To: Chen, Hongzhan <[email protected]>; [email protected]
Subject: Re: [PATCH V3 1/3] rtdm/testing: latmus: introduce latmus driverQuoted 45 lines · Hongzhan
Quoted 45 lines
-----Original Message-----
From: Jan Kiszka <[email protected]>
Sent: Thursday, May 20, 2021 11:54 PM
To: Chen, Hongzhan <[email protected]>; [email protected]
Subject: Re: [PATCH V3 1/3] rtdm/testing: latmus: introduce latmus driverQuoted 13 lines · On 21.04.21 07:05, hongzha1 via Xenomai wrote:
To support the latmus application for determining the best gravity values for the cobalt core clock, and measuring the response time to timer events.
Signed-off-by hongzha1 <[email protected]>--- include/rtdm/uapi/testing.h | 63 ++ kernel/drivers/testing/Kconfig | 10 + kernel/drivers/testing/Makefile | 3 + kernel/drivers/testing/latmus.c | 1237 +++++++++++++++++++++++++++++++ 4 files changed, 1313 insertions(+) create mode 100644 kernel/drivers/testing/latmus.c...
Quoted 20 lines
kernel/drivers/testing/latmus.c new file +14
-0@@ -0,0 +1,1237 @@ +/* +* SPDX-License-Identifier: GPL-2.0 +* +* Derived from Xenomai Cobalt's autotune driver, https://xenomai.org/ +* Copyright (C) 2014, 2018 Philippe Gerum <[email protected]> +*/ + +#include <linux/types.h> +#include <linux/init.h> +#include <linux/module.h> +#include <linux/slab.h> +#include <linux/kernel.h> +#include <linux/sort.h> +#include <linux/cdev.h> Quoted 8 lines
Quoted 4 lines
Quoted 4 lines
kernel/drivers/testing/latmus.c line 18
Quoted 4 lines
kernel/drivers/testing/latmus.c new file +4
-0+#include <linux/fs.h> +#include <linux/fcntl.h> +#include <cobalt/kernel/pipe.h> +#include <cobalt/kernel/sched.h> Do we need those two? RTDM should be the interface when possible. And if some RTDM header is need of any of them, that would be a bug and a separate patch.
Thanks for your pointing out. Yes, we do not need
sched.hhere but we needpipe.hbecause latmus make use of xnpipe.Quoted 32 lines
Quoted 31 lines
Quoted 15 lines
Quoted 15 lines
kernel/drivers/testing/latmus.c new file +14
-0+#include <rtdm/ipc.h> +#include <rtdm/testing.h> +#include <rtdm/driver.h> +#include <rtdm/compat.h> + +#define ONE_BILLION 1000000000 +#define TUNER_SAMPLING_TIME 500000000UL +#define TUNER_WARMUP_STEPS 10 +#define TUNER_RESULT_STEPS 40 + +#define progress(__runner, __fmt, __args...) \ + do { \ + if ((__runner)->verbosity > 1) \ + printk(XENO_INFO "latmus(%s) " __fmt "\n", \Quoted 8 lines
kernel/drivers/testing/latmus.c line 38
Quoted 6 lines
kernel/drivers/testing/latmus.c new file +6
-0+ (__runner)->name, ##__args); \ + } while (0) + +#define cobalt_init_xntimer_on_cpu (__timer, __cpu, __handler) \ + rtdm_timer_init_on_cpu(__timer, __handler, \ + #__handler, __cpu)Why this wrapper? Why not calling
rtdm_timer... directly?Of course, we can call
rtdm_timer... directly. My reason is :1. When I ported it from evl , I just want to align with original as I can to pass same number of parameters here to replace
evl_init_timer_on_cpu.
2. In addition ,when use this wrapper, caller may not need to care about name when it does not matter for user because define would handle it by default.Quoted 7 lines
Quoted 3 lines
The current code is abstracting a single use case (you can't use the code over evl as-is) - that is usually not a good idea. Once you have two or more active use cases, abstraction can still be done.
Is it better to move this wrapper to
./include/cobalt/kernel/rtdm/driver.hjust likeevl_init_timer_on_rqdoing ininclude/evl/timer.h?Generally speaking, I don't see any benefit in sharing a generic latmus implementation that would build on top of the Cobalt/EVL cores with no change.
Quoted 5 lines
The version for Xenomai3 must stick with the RTDM interface, just like the Xenomai4 implementation will stay with the EVL kernel API. If services are missing in the current RTDM specs to support latmus, a discussion should take place so that we may propose them for integration into the CXP.
I saw that the latmus driver patch was already merged. Do I need to create a new patch based on latmus driver
to fix it or resubmit the latmus driver patch including the fix?
Regards
Hongzhan Chen
Quoted 3 lines
Signature · 2 lines
-- Philippe.
Re: [PATCH V3 1/3] rtdm/testing: latmus: introduce latmus driver
Quoted 118 lines · Hongzhan
Quoted 118 lines
-----Original Message-----
From: Philippe Gerum <[email protected]>
Sent: Monday, May 24, 2021 12:51 AM
To: Chen, Hongzhan <[email protected]>
Cc: Jan Kiszka <[email protected]>; [email protected]
Subject: Re: [PATCH V3 1/3] rtdm/testing: latmus: introduce latmus driverQuoted 96 lines · Hongzhan via Xenomai
Quoted 52 lines
-----Original Message-----
From: Jan Kiszka <[email protected]>
Sent: Friday, May 21, 2021 2:21 PM
To: Chen, Hongzhan <[email protected]>; [email protected]
Subject: Re: [PATCH V3 1/3] rtdm/testing: latmus: introduce latmus driverQuoted 45 lines · Hongzhan
Quoted 45 lines
-----Original Message-----
From: Jan Kiszka <[email protected]>
Sent: Thursday, May 20, 2021 11:54 PM
To: Chen, Hongzhan <[email protected]>; [email protected]
Subject: Re: [PATCH V3 1/3] rtdm/testing: latmus: introduce latmus driverQuoted 13 lines · On 21.04.21 07:05, hongzha1 via Xenomai wrote:
To support the latmus application for determining the best gravity values for the cobalt core clock, and measuring the response time to timer events.
Signed-off-by hongzha1 <[email protected]>--- include/rtdm/uapi/testing.h | 63 ++ kernel/drivers/testing/Kconfig | 10 + kernel/drivers/testing/Makefile | 3 + kernel/drivers/testing/latmus.c | 1237 +++++++++++++++++++++++++++++++ 4 files changed, 1313 insertions(+) create mode 100644 kernel/drivers/testing/latmus.c...
Quoted 20 lines
kernel/drivers/testing/latmus.c new file +14
-0@@ -0,0 +1,1237 @@ +/* +* SPDX-License-Identifier: GPL-2.0 +* +* Derived from Xenomai Cobalt's autotune driver, https://xenomai.org/ +* Copyright (C) 2014, 2018 Philippe Gerum <[email protected]> +*/ + +#include <linux/types.h> +#include <linux/init.h> +#include <linux/module.h> +#include <linux/slab.h> +#include <linux/kernel.h> +#include <linux/sort.h> +#include <linux/cdev.h> Quoted 8 lines
Quoted 4 lines
Quoted 4 lines
kernel/drivers/testing/latmus.c line 18
Quoted 4 lines
kernel/drivers/testing/latmus.c new file +4
-0+#include <linux/fs.h> +#include <linux/fcntl.h> +#include <cobalt/kernel/pipe.h> +#include <cobalt/kernel/sched.h> Do we need those two? RTDM should be the interface when possible. And if some RTDM header is need of any of them, that would be a bug and a separate patch.
Thanks for your pointing out. Yes, we do not need
sched.hhere but we needpipe.hbecause latmus make use of xnpipe.Quoted 32 lines
Quoted 31 lines
Quoted 15 lines
Quoted 15 lines
kernel/drivers/testing/latmus.c new file +14
-0+#include <rtdm/ipc.h> +#include <rtdm/testing.h> +#include <rtdm/driver.h> +#include <rtdm/compat.h> + +#define ONE_BILLION 1000000000 +#define TUNER_SAMPLING_TIME 500000000UL +#define TUNER_WARMUP_STEPS 10 +#define TUNER_RESULT_STEPS 40 + +#define progress(__runner, __fmt, __args...) \ + do { \ + if ((__runner)->verbosity > 1) \ + printk(XENO_INFO "latmus(%s) " __fmt "\n", \Quoted 8 lines
kernel/drivers/testing/latmus.c line 38
Quoted 6 lines
kernel/drivers/testing/latmus.c new file +6
-0+ (__runner)->name, ##__args); \ + } while (0) + +#define cobalt_init_xntimer_on_cpu (__timer, __cpu, __handler) \ + rtdm_timer_init_on_cpu(__timer, __handler, \ + #__handler, __cpu)Why this wrapper? Why not calling
rtdm_timer... directly?Of course, we can call
rtdm_timer... directly. My reason is :1. When I ported it from evl , I just want to align with original as I can to pass same number of parameters here to replace
evl_init_timer_on_cpu.
2. In addition ,when use this wrapper, caller may not need to care about name when it does not matter for user because define would handle it by default.Quoted 7 lines
Quoted 3 lines
The current code is abstracting a single use case (you can't use the code over evl as-is) - that is usually not a good idea. Once you have two or more active use cases, abstraction can still be done.
Is it better to move this wrapper to
./include/cobalt/kernel/rtdm/driver.hjust likeevl_init_timer_on_rqdoing ininclude/evl/timer.h?Generally speaking, I don't see any benefit in sharing a generic latmus implementation that would build on top of the Cobalt/EVL cores with no change.
Quoted 9 lines
Quoted 5 lines
The version for Xenomai3 must stick with the RTDM interface, just like the Xenomai4 implementation will stay with the EVL kernel API. If services are missing in the current RTDM specs to support latmus, a discussion should take place so that we may propose them for integration into the CXP.
I saw that the latmus driver patch was already merged. Do I need to create a new patch based on latmus driver
to fix it or resubmit the latmus driver patch including the fix?
This is not upstream yet, so please send a patch against my tree, I'll fold it into the initial commit(s). Thanks.
Signature · 1 line
Philippe.
Re: [PATCH V3 1/3] rtdm/testing: latmus: introduce latmus driver
Quoted 127 lines · Philippe Gerum
Quoted 124 lines · Hongzhan
Quoted 123 lines
-----Original Message-----
From: Philippe Gerum <[email protected]>
Sent: Monday, May 24, 2021 12:51 AM
To: Chen, Hongzhan <[email protected]>
Cc: Jan Kiszka <[email protected]>; [email protected]
Subject: Re: [PATCH V3 1/3] rtdm/testing: latmus: introduce latmus driverQuoted 96 lines · Hongzhan via Xenomai
Quoted 52 lines
-----Original Message-----
From: Jan Kiszka <[email protected]>
Sent: Friday, May 21, 2021 2:21 PM
To: Chen, Hongzhan <[email protected]>; [email protected]
Subject: Re: [PATCH V3 1/3] rtdm/testing: latmus: introduce latmus driverQuoted 45 lines · Hongzhan
Quoted 45 lines
-----Original Message-----
From: Jan Kiszka <[email protected]>
Sent: Thursday, May 20, 2021 11:54 PM
To: Chen, Hongzhan <[email protected]>; [email protected]
Subject: Re: [PATCH V3 1/3] rtdm/testing: latmus: introduce latmus driverQuoted 13 lines · On 21.04.21 07:05, hongzha1 via Xenomai wrote:
To support the latmus application for determining the best gravity values for the cobalt core clock, and measuring the response time to timer events.
Signed-off-by hongzha1 <[email protected]>--- include/rtdm/uapi/testing.h | 63 ++ kernel/drivers/testing/Kconfig | 10 + kernel/drivers/testing/Makefile | 3 + kernel/drivers/testing/latmus.c | 1237 +++++++++++++++++++++++++++++++ 4 files changed, 1313 insertions(+) create mode 100644 kernel/drivers/testing/latmus.c...
Quoted 20 lines
kernel/drivers/testing/latmus.c new file +14
-0@@ -0,0 +1,1237 @@ +/* +* SPDX-License-Identifier: GPL-2.0 +* +* Derived from Xenomai Cobalt's autotune driver, https://xenomai.org/ +* Copyright (C) 2014, 2018 Philippe Gerum <[email protected]> +*/ + +#include <linux/types.h> +#include <linux/init.h> +#include <linux/module.h> +#include <linux/slab.h> +#include <linux/kernel.h> +#include <linux/sort.h> +#include <linux/cdev.h> Quoted 8 lines
Quoted 4 lines
Quoted 4 lines
kernel/drivers/testing/latmus.c line 18
Quoted 4 lines
kernel/drivers/testing/latmus.c new file +4
-0+#include <linux/fs.h> +#include <linux/fcntl.h> +#include <cobalt/kernel/pipe.h> +#include <cobalt/kernel/sched.h> Do we need those two? RTDM should be the interface when possible. And if some RTDM header is need of any of them, that would be a bug and a separate patch.
Thanks for your pointing out. Yes, we do not need
sched.hhere but we needpipe.hbecause latmus make use of xnpipe.Quoted 32 lines
Quoted 31 lines
Quoted 15 lines
Quoted 15 lines
kernel/drivers/testing/latmus.c new file +14
-0+#include <rtdm/ipc.h> +#include <rtdm/testing.h> +#include <rtdm/driver.h> +#include <rtdm/compat.h> + +#define ONE_BILLION 1000000000 +#define TUNER_SAMPLING_TIME 500000000UL +#define TUNER_WARMUP_STEPS 10 +#define TUNER_RESULT_STEPS 40 + +#define progress(__runner, __fmt, __args...) \ + do { \ + if ((__runner)->verbosity > 1) \ + printk(XENO_INFO "latmus(%s) " __fmt "\n", \Quoted 8 lines
kernel/drivers/testing/latmus.c line 38
Quoted 6 lines
kernel/drivers/testing/latmus.c new file +6
-0+ (__runner)->name, ##__args); \ + } while (0) + +#define cobalt_init_xntimer_on_cpu (__timer, __cpu, __handler) \ + rtdm_timer_init_on_cpu(__timer, __handler, \ + #__handler, __cpu)Why this wrapper? Why not calling
rtdm_timer... directly?Of course, we can call
rtdm_timer... directly. My reason is :1. When I ported it from evl , I just want to align with original as I can to pass same number of parameters here to replace
evl_init_timer_on_cpu.
2. In addition ,when use this wrapper, caller may not need to care about name when it does not matter for user because define would handle it by default.Quoted 7 lines
Quoted 3 lines
The current code is abstracting a single use case (you can't use the code over evl as-is) - that is usually not a good idea. Once you have two or more active use cases, abstraction can still be done.
Is it better to move this wrapper to
./include/cobalt/kernel/rtdm/driver.hjust likeevl_init_timer_on_rqdoing ininclude/evl/timer.h?Generally speaking, I don't see any benefit in sharing a generic latmus implementation that would build on top of the Cobalt/EVL cores with no change.
The version for Xenomai3 must stick with the RTDM interface, just like the Xenomai4 implementation will stay with the EVL kernel API. If services are missing in the current RTDM specs to support latmus, a discussion should take place so that we may propose them for integration into the CXP.
Quoted 7 lines
Quoted 3 lines
I saw that the latmus driver patch was already merged. Do I need to create a new patch based on latmus driver
to fix it or resubmit the latmus driver patch including the fix?This is not upstream yet, so please send a patch against my tree, I'll fold it into the initial commit(s). Thanks.
Let's avoid the indirection: The driver aims at upstream, thus should be sent against it now. It has no dependencies on wip/dovetail, thus could already use next as baseline (provided you include or refer to the two new rtdm api patches).
So, just prepare a new series version, maybe organized like the tip of wip/dovetail (I've reordered Philippe's branch to make this logical relationship clearer).
Jan
Signature · 2 lines
Siemens AG, T RDA IOT Corporate Competence Center Embedded Linux
PATCH v3 2/3 drivers/gpio: core: introduce helper to find gpiochip
In reply to hongzha1To find gpiochip for non-OF platforms like x86
--- include/cobalt/kernel/rtdm/gpio.h | 3 +++ kernel/drivers/gpio/gpio-core.c | 23 +++++++++++++++++++++++ 2 files changed, 26 insertions(+)
include/cobalt/kernel/rtdm/gpio.h +3 -0
@@ -61,6 +61,9 @@ int rtdm_gpiochip_add_by_name(struct rtdm_gpio_chip *rgc,int rtdm_gpiochip_post_event (struct rtdm_gpio_chip *rgc,unsigned int offset); +int rtdm_gpiochip_find (struct device_node *from, +const char *label,int type); +#ifdef CONFIG_OF int rtdm_gpiochip_scan_of(struct device_node *from,
kernel/drivers/gpio/gpio-core.c +23 -0
@@ -520,6 +520,29 @@ int rtdm_gpiochip_add_by_name(struct rtdm_gpio_chip *rgc, }EXPORT_SYMBOL_GPL (rtdm_gpiochip_add_by_name); +int rtdm_gpiochip_find (struct device_node *from,const char *label, +int type) +{ +struct rtdm_gpio_chip *rgc; +struct gpio_chip *chip; +int ret = -ENODEV ; + +if (!rtdm_available ()) +return -ENOSYS ; + + chip =find_chip_by_name (label); +if (chip ==NULL ) +return ret; + + ret =0 ; + rgc =rtdm_gpiochip_alloc (chip, type); +if (IS_ERR (rgc)) + ret =PTR_ERR (rgc); + +return ret; +} +EXPORT_SYMBOL_GPL (rtdm_gpiochip_find); +#ifdef CONFIG_OF #include <linux/of_platform.h>
Signature · 1 line
2.17.1
PATCH v3 3/3 testsuite/latmus: introduce latmus benchmark
In reply to hongzha1Measure response time to GPIO events sent by a remote Zephyr-based latency monitor (latmon). This monitor collects then sends the latency data over a network connection to the latmus front-end which displays the results received:
[Linux device under test running latmus] <--+
|
^ | (GPIO ack) |
| | | TCP/IP network connection
| | | (control & data samples)
| (GPIO pulse) v |
|[Zephyr-based device running latmon] <--+
The generic latency monitor code running the measurement loop is available from the
https://git.evlproject.org/libevl.git/tree/benchmarks/zephyr directory. This support comes with a Zephyr device tree patch for enabling this monitor on NXP's FRDM-K64F development board.
--- configure.ac | 1 + doc/asciidoc/Makefile.am | 2 + doc/asciidoc/man1/latmus.adoc | 112 +++ include/rtdm/uapi/testing.h | 16 + testsuite/Makefile.am | 4 +- testsuite/latmus/Makefile.am | 18 + testsuite/latmus/latmus.c | 1446 +++++++++++++++++++++++++++++++++ 7 files changed, 1598 insertions(+), 1 deletion(-) create mode 100644 doc/asciidoc/man1/latmus.adoc create mode 100644 testsuite/latmus/Makefile.am create mode 100644 testsuite/latmus/latmus.c
configure.ac +1 -0
@@ -954,6 +954,7 @@ AC_CONFIG_FILES([ \ lib/trank/Makefile \ testsuite/Makefile \ testsuite/latency/Makefile \ + testsuite/latmus/Makefile \ testsuite/switchtest/Makefile \ testsuite/gpiotest/Makefile \ testsuite/gpiobench/Makefile \
doc/asciidoc/Makefile.am +2 -0
@@ -10,6 +10,7 @@ HTML_DOCS = \ html/man1/clocktest \ html/man1/corectl \ html/man1/dohell \ + html/man1/latmus \ html/man1/latency \ html/man1/rtcanconfig \ html/man1/rtcanrecv \
@@ -40,6 +41,7 @@ MAN1_DOCS = \ man1/corectl.1 \ man1/cyclictest.1 \ man1/dohell.1 \ + man1/latmus.1 \ man1/latency.1 \ man1/rtcanconfig.1 \ man1/rtcanrecv.1 \
doc/asciidoc/man1/latmus.adoc new file +112 -0
112 lines not on this page · raw message
include/rtdm/uapi/testing.h +16 -0
@@ -256,6 +256,22 @@ struct latmus_result {#define RTTST_RTIOC_COBALT_LATIOC_RESET \ _IO(RTIOC_TYPE_TESTING, 0x54) +#define LATMON_NET_PORT 2306 + +struct latmon_net_request { +uint32_t period_usecs; +uint32_t histogram_cells; +} __attribute__((__packed__ )); + +struct latmon_net_data { +int32_t sum_lat_hi; +int32_t sum_lat_lo; +int32_t min_lat; +int32_t max_lat; +uint32_t overruns; +uint32_t samples; +} __attribute__((__packed__ )); +/** @} */ #endif /* !_RTDM_UAPI_TESTING_H */
testsuite/Makefile.am +3 -1
@@ -1,10 +1,11 @@ -SUBDIRS = latency smokey gpiobench +SUBDIRS = latency latmus smokey gpiobench if XENO_COBALT SUBDIRS += \ clocktest \ gpiotest \ + latmus \ spitest \ switchtest \ xeno-test
@@ -15,6 +16,7 @@ DIST_SUBDIRS = \ gpiotest \ gpiobench \ latency \ + latmus \ smokey \ spitest \ switchtest \
testsuite/latmus/Makefile.am new file +18 -0
@@ -0,0 +1,18 @@ +testdir = @XENO_TEST_DIR@ + +CCLD = $(top_srcdir)/scripts/wrap-link.sh $(CC) + +test_PROGRAMS = latmus + +latmus_SOURCES = latmus.c + +latmus_CPPFLAGS = \ + $(XENO_USER_CFLAGS) \ + -I$(top_srcdir)/include + +latmus_LDFLAGS = @XENO_AUTOINIT_LDFLAGS@ $(XENO_POSIX_WRAPPERS) + +latmus_LDADD = \ + @XENO_CORE_LDADD@ \ + @XENO_USER_LDADD@ \ + -lpthread -lrt -lm
testsuite/latmus/latmus.c new file +1446 -0
1,446 lines not on this page · raw message
Signature · 1 line
2.17.1