ipipe: IRQ not received on i.MX8 (linux-imx)

2021-07-05 Thread Pierre-Loup Gosse via Xenomai
Hi, For a client project I try to port Xenomai 3.1 + I-pipe to the kernel linux-imx 5.4.70 for arm64 (i.MX8 Mini). I adapted the I-pipe patch (5.4.72-arm64). The kernel boots and works well. However, for the non-regression test, I run a client test that uses Xenomai and UDD (to register a PC

Re: [xenomai-images PATCH] recipes-kernel: arm64_config: enable Rtnet Rtdmtest and RTIPC

2021-07-05 Thread Jan Kiszka via Xenomai
On 05.07.21 08:26, Chen, Hongzhan wrote: > > >> >>> # UDD support >>> @@ -469,10 +580,9 @@ CONFIG_XENO_ARCH_OUTOFLINE_XNLOCK=y >>> # cause troubles with Xenomai. You should disable them. >>> # >>> CONFIG_XENO_VERSION_MAJOR=3 >>> -CONFIG_XENO_VERSION_MINOR=0 >>> -CONFIG_XENO_REVISION_LEVEL=90

[PATCH 6/9] cobalt/select: Add proper handling of EADV

2021-07-05 Thread Jan Kiszka via Xenomai
From: Jan Kiszka Since rtdm_fd_select started to return EADV for unknown fds (2db562ad62ec), we were returning that code to applications in case a selector had been allocated for the caller already. That was because libcobalt lacked handling of this error. This fixes it and also establish proper

[PATCH 2/9] cobalt/posix/io: Avoid err variable shadowing

2021-07-05 Thread Jan Kiszka via Xenomai
From: Jan Kiszka It worked, but it is not nice to read. Signed-off-by: Jan Kiszka --- kernel/cobalt/posix/io.c| 8 kernel/cobalt/posix/syscall32.c | 7 --- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/kernel/cobalt/posix/io.c b/kernel/cobalt/posix/io.c in

[PATCH 1/9] cobalt/posix/io: Remove unneeded special case of select_bind_one

2021-07-05 Thread Jan Kiszka via Xenomai
From: Jan Kiszka Already at the time of introduction (8ac3db811d21), -ENOENT was not returned by any sane function behind rtdm_fd_select(). Today rtdm_fd_select() officially only returns -EBADF or -EINVAL. By now it also returns -EADV, via rtdm_fd_get() or a default select handler. The only remai

[PATCH 5/9] cobalt/rtdm/fd: Fix default handler setups

2021-07-05 Thread Jan Kiszka via Xenomai
From: Jan Kiszka 2db562ad62ec had a point in avoiding EBADF for file descriptors that are not under RTDM management. But it unfortunately got a lot of other cases wrong along this. This one is about returning the right error code if an RTDM driver does not implement a particular handler. That mu

[PATCH 9/9] cobalt/posix/io: Unify native and compat versions of select

2021-07-05 Thread Jan Kiszka via Xenomai
From: Jan Kiszka Rather than duplicating lots of code for the sake of compat userspace accesses, provide a common version that is given a flag to decide whether to take the compat or regular code paths. This also brings restart support to the compat selection version which was forgotten by 36132

[PATCH 7/9] cobalt/posix/syscall32: Mark compat clock_nanosleep restartable

2021-07-05 Thread Jan Kiszka via Xenomai
From: Jan Kiszka Commit 36132cdb21cd forgot to align this with the native syscall. Signed-off-by: Jan Kiszka --- kernel/cobalt/posix/syscall32.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/cobalt/posix/syscall32.c b/kernel/cobalt/posix/syscall32.c index 5a6de285f

[PATCH 4/9] cobalt/rtdm/fd: Fix error code documentation of rtdm_fd_select

2021-07-05 Thread Jan Kiszka via Xenomai
From: Jan Kiszka It also returns -EADV since 2db562ad62ec - causing troubles in select. Signed-off-by: Jan Kiszka --- kernel/cobalt/rtdm/fd.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/kernel/cobalt/rtdm/fd.c b/kernel/cobalt/rtdm/fd.c index cbaece1327..e5e0c02376

[PATCH 3/9] cobalt/rtdm/fd: Fix comment typo

2021-07-05 Thread Jan Kiszka via Xenomai
From: Jan Kiszka Signed-off-by: Jan Kiszka --- kernel/cobalt/rtdm/fd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/cobalt/rtdm/fd.c b/kernel/cobalt/rtdm/fd.c index 151884a240..cbaece1327 100644 --- a/kernel/cobalt/rtdm/fd.c +++ b/kernel/cobalt/rtdm/fd.c @@ -223,7

[PATCH 0/9] EADV-related fixes, select refactorings, restartable compat syscalls

2021-07-05 Thread Jan Kiszka via Xenomai
This should resolved the EADV bug seen with select when called with Linux fds. It also fixes wrong EADV reporting for other services. And it adds the missing syscall restart support for clock_nanosleep and select when taking the compat path. Please review and test carefully, some details are rathe

[PATCH 8/9] cobalt/posix/compat: Privatize sys32_get/put_fdset

2021-07-05 Thread Jan Kiszka via Xenomai
From: Jan Kiszka There is no use for this outside of the core that implements select. So stop exporting these helpers. As there are no users outside, simplify their return value on success to 0 because their callers do not care about more. Signed-off-by: Jan Kiszka --- include/cobalt/kernel/co

[PATCH] cobalt/tick: dovetail: Always read timer name from CPU 0

2021-07-05 Thread Jan Kiszka via Xenomai
From: Jan Kiszka __this_cpu_read will generate a warning when called by print_core_clock_status because the context is detected as preemptible. Avoid this by picking up the name from CPU 0, just like ipipe_timer_name did. Signed-off-by: Jan Kiszka --- kernel/cobalt/dovetail/tick.c | 2 +- 1 fi

[PATCH] cobalt: Fix handling of invalid thread affinities during hardening

2021-07-05 Thread Jan Kiszka via Xenomai
From: Jan Kiszka The I-pipe implementation was lucky in its approach to not wake up the RT thread in case the non-RT part migrated to an unsupported CPU. For unclear reasons, the scheduled cancellation made it to the thread and avoided any lockup. On dovetail, this fails. So switch both implemen

[PATCH] testsuite/clocktest: Account for unsupported CPUs

2021-07-05 Thread Jan Kiszka via Xenomai
From: Jan Kiszka Scheduling a thread on a CPU that is not supported by Xenomai will only fail and flood the screen with error messages. Signed-off-by: Jan Kiszka --- testsuite/clocktest/clocktest.c | 44 +++-- 1 file changed, 31 insertions(+), 13 deletions(-) diff

[PATCH] cobalt/init: Fail if CPU 0 is missing from real-time CPU mask

2021-07-05 Thread Jan Kiszka via Xenomai
From: Jan Kiszka The core assumes in some places that CPU 0 is available for real-time. Therefore fail if the mask is excluding it. Signed-off-by: Jan Kiszka --- kernel/cobalt/init.c | 5 + 1 file changed, 5 insertions(+) diff --git a/kernel/cobalt/init.c b/kernel/cobalt/init.c index f949

[PATCH v2] cobalt: Fix handling of invalid thread affinities during hardening

2021-07-05 Thread Jan Kiszka via Xenomai
From: Jan Kiszka The I-pipe implementation was lucky in its approach to not wake up the RT thread in case the non-RT part migrated to an unsupported CPU. For unclear reasons, the scheduled cancellation made it to the thread and avoided any lockup. On dovetail, this fails. So switch both implemen

Re: ipipe: IRQ not received on i.MX8 (linux-imx)

2021-07-05 Thread Jan Kiszka via Xenomai
On 05.07.21 09:10, Pierre-Loup Gosse via Xenomai wrote: > Hi, > > For a client project I try to port Xenomai 3.1 + I-pipe to the kernel > linux-imx 5.4.70 for arm64 (i.MX8 Mini). I adapted the I-pipe patch > (5.4.72-arm64). The kernel boots and works well. > I think the imx8mm is fairly well sup

[PATCH v2] testsuite/clocktest: Account for unsupported CPUs

2021-07-05 Thread Jan Kiszka via Xenomai
From: Jan Kiszka Scheduling a thread on a CPU that is not supported by Xenomai will only fail and flood the screen with error messages. Signed-off-by: Jan Kiszka --- Changes in v2: - restrict cpu_realtime_set by online cpus testsuite/clocktest/clocktest.c | 49 --

[xenomai-images][PATCH] tests: Limit supported cpus on physical multicore targets

2021-07-05 Thread Jan Kiszka via Xenomai
From: Jan Kiszka This tests xenomai.supported_cpus not covering all available CPUs, allowing the related smokey test to run and more. We restrict this to targets with more than 2 cores, which currently excludes all QEMU targets. Signed-off-by: Jan Kiszka --- tests/jobs/xenomai-hikey.yml

[xenomai-images][PATCH] tests: Remove another unused job description

2021-07-05 Thread Jan Kiszka via Xenomai
From: Jan Kiszka Covered by xenomai-x86-64-efi.yml in practice. Signed-off-by: Jan Kiszka --- tests/jobs/xenomai-ipc227e.yml | 76 -- 1 file changed, 76 deletions(-) delete mode 100644 tests/jobs/xenomai-ipc227e.yml diff --git a/tests/jobs/xenomai-ipc227e.yml

[xenomai-images][PATCH] README: Update board list

2021-07-05 Thread Jan Kiszka via Xenomai
From: Jan Kiszka We replaced the ipc227e with a generic x86-efi target long ago. Also include the .yml endings in the mentioning to make the relationship clearer. Signed-off-by: Jan Kiszka --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.

Re: ipipe: IRQ not received on i.MX8 (linux-imx)

2021-07-05 Thread Greg Gallagher via Xenomai
On Mon, Jul 5, 2021 at 7:02 AM Jan Kiszka wrote: > On 05.07.21 09:10, Pierre-Loup Gosse via Xenomai wrote: > > Hi, > > > > For a client project I try to port Xenomai 3.1 + I-pipe to the kernel > > linux-imx 5.4.70 for arm64 (i.MX8 Mini). I adapted the I-pipe patch > > (5.4.72-arm64). The kernel b