Re: [PATCH 6/6] drivers/can: add support for Bosch C_CAN controller

2021-11-29 Thread Jan Kiszka via Xenomai
On 27.11.21 18:20, Dario Binacchi wrote: > Hi Jan, > >> Il 25/11/2021 11:43 Jan Kiszka ha scritto: >> >> >> On 25.11.21 00:46, Dario Binacchi wrote: >>> Bosch C_CAN controller is a full-CAN implementation which is compliant >>> to CAN protocol version 2.0 part A and B. >>> >>> Starting from the

[PATCH] cobalt/dovetail: Resolve pipeline_clock_name TODO

2021-11-29 Thread Jan Kiszka via Xenomai
From: Jan Kiszka We don't have access to the kernel's curr_clocksource variable, so just make a general statement. Signed-off-by: Jan Kiszka --- include/cobalt/kernel/dovetail/pipeline/clock.h | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/include/cobalt/kernel/dovetai

Re: [PATCH 5/6] drivers/can: fix updating of tx_count statistics

2021-11-29 Thread Dario Binacchi via Xenomai
Hi Jan, > Il 29/11/2021 08:50 Jan Kiszka ha scritto: > > > On 27.11.21 16:50, Dario Binacchi wrote: > > Hi Jan, > > > >> Il 25/11/2021 11:28 Jan Kiszka ha scritto: > >> > >> > >> On 25.11.21 00:46, Dario Binacchi wrote: > >>> As in the Linux kernel, the counter is updated only after the me

[xenomai-images][PATCH] linux-xenomai: Only add own defconfigs to SRC_URI

2021-11-29 Thread Jan Kiszka via Xenomai
From: Jan Kiszka This allows downstream layers to set KERNEL_DEFCONFIG to own files without triggering warnings like .../recipes-kernel/linux/linux-xenomai_5.4.bb: Unable to get checksum for linux-xenomai SRC_URI entry custom_defconfig: file could not be found Signed-off-by: Jan Kiszka --- re

[PATCH v2 0/6] drivers/can: add support for Bosch C_CAN controller

2021-11-29 Thread Dario Binacchi via Xenomai
The series was created to optimize the use of the C_CAN controller (maximum number of message objects, use of FIFO, ...) to get the best possible RX/TX throughput from hardware. To emphasize the purpose of the series I also added the patch which adds multi-message support to `sendmsg ', rather t

[PATCH v2 2/6] drivers/can: add CAN_ERR_CRTL_ACTIVE info status

2021-11-29 Thread Dario Binacchi via Xenomai
To be used in case of recovered to error active state. Signed-off-by: Dario Binacchi --- (no changes since v1) include/rtdm/uapi/can.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/rtdm/uapi/can.h b/include/rtdm/uapi/can.h index 8d0d837d5..1c35a9b9d 100644 --- a/include/rtdm/uapi

[PATCH v2 1/6] drivers/can: add multi message support to sendmsg

2021-11-29 Thread Dario Binacchi via Xenomai
The `user_msghdr' structure is designed to send multiple messages as well, so rtcan_raw_sendmsg() can also send multiple messages. This avoids having to add the sendmmsg system call which requires more extensive Xenomai changes. Signed-off-by: Dario Binacchi --- (no changes since v1) kernel/dr

[PATCH v2 6/6] drivers/can: add support for Bosch C_CAN controller

2021-11-29 Thread Dario Binacchi via Xenomai
Bosch C_CAN controller is a full-CAN implementation which is compliant to CAN protocol version 2.0 part A and B. Starting from the RTDM porting [1] by Stephen Battazzo, Michael applied some fixes for proper driver operation. Then I ported the commits from Linux kernel version 5.12 and finally I ad

[PATCH v2 5/6] drivers/can: fix updating of tx_count statistics

2021-11-29 Thread Dario Binacchi via Xenomai
As in the Linux kernel, the counter is updated only after the message has been really transmitted. Signed-off-by: Dario Binacchi --- (no changes since v1) kernel/drivers/can/mscan/rtcan_mscan.c | 1 + kernel/drivers/can/rtcan_flexcan.c | 1 + kernel/drivers/can/rtcan_raw.c

[PATCH v2 4/6] drivers/can: add a minimal support to ethtool API

2021-11-29 Thread Dario Binacchi via Xenomai
Like in the Linux kernel, the API allows to get/set device controller parameters. For now it only supports: - ETHTOOL_GDRVINFO: get general driver and device information - ETHTOOL_GRINGPARAM: get RX/TX ring parameters It allows the userspace to know the number of messages managed by the controll

[PATCH v2 3/6] drivers/can: add len field to can frame structures

2021-11-29 Thread Dario Binacchi via Xenomai
As mentioned in Linux, can_dlc is a misleading name that suggests a code instead of a length. Adding the len field can_dlc becomes deprecated too. Signed-off-by: Dario Binacchi --- (no changes since v1) include/rtdm/uapi/can.h | 5 - kernel/drivers/can/rtcan_socket.h | 5 - 2

RE: [PATCH] cobalt/dovetail: Resolve pipeline_clock_name TODO

2021-11-29 Thread Chen, Hongzhan via Xenomai
Hi Jan What about following patch? Try to get clocksource name via sys fs. From aa6fdc59a22f9b1ddca145c72a75f2aa1f776e85 Mon Sep 17 00:00:00 2001 From: Hongzhan Chen Date: Wed, 24 Nov 2021 02:08:27 -0500 Subject: [PATCH] cobalt/clock: dovetail: get current clocksource name via sys fs Dovetail

RE: [PATCH v2 2/2] cobalt/trace: dovetail: remove TODO and return -ENOSYS for unportable features

2021-11-29 Thread Chen, Hongzhan via Xenomai
>-Original Message- >From: Jan Kiszka >Sent: Monday, November 29, 2021 3:58 PM >To: Chen, Hongzhan ; xenomai@xenomai.org >Subject: Re: [PATCH v2 2/2] cobalt/trace: dovetail: remove TODO and return >-ENOSYS for unportable features > >On 29.11.21 02:03, Hongzhan Chen via Xenomai wrote: >

Re: [PATCH v2 2/2] cobalt/trace: dovetail: remove TODO and return -ENOSYS for unportable features

2021-11-29 Thread Jan Kiszka via Xenomai
On 30.11.21 02:07, Chen, Hongzhan wrote: > > >> -Original Message- >> From: Jan Kiszka >> Sent: Monday, November 29, 2021 3:58 PM >> To: Chen, Hongzhan ; xenomai@xenomai.org >> Subject: Re: [PATCH v2 2/2] cobalt/trace: dovetail: remove TODO and return >> -ENOSYS for unportable features

Re: [PATCH] cobalt/dovetail: Resolve pipeline_clock_name TODO

2021-11-29 Thread Jan Kiszka via Xenomai
On 30.11.21 01:47, Chen, Hongzhan wrote: > Hi Jan > > What about following patch? Try to get clocksource name via sys fs. > > From aa6fdc59a22f9b1ddca145c72a75f2aa1f776e85 Mon Sep 17 00:00:00 2001 > From: Hongzhan Chen > Date: Wed, 24 Nov 2021 02:08:27 -0500 > Subject: [PATCH] cobalt/clock: dove

[xenomai-images][PATCH] linux-xenomai: Add search path to pick up common_nodebug.cfg

2021-11-29 Thread Jan Kiszka via Xenomai
From: Jan Kiszka Allows to use linux-xenomai.inc in downstream layers. Signed-off-by: Jan Kiszka --- recipes-kernel/linux/linux-xenomai.inc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/recipes-kernel/linux/linux-xenomai.inc b/recipes-kernel/linux/linux-xenomai.inc index c12d39a..ccc5

[xenomai-images][PATCH] linux-xenomai: Define default GIT_REPO/BRANCH in latest recipe

2021-11-29 Thread Jan Kiszka via Xenomai
From: Jan Kiszka This allows to build the layer against i386 DISTRO_ARCH. Signed-off-by: Jan Kiszka --- recipes-kernel/linux/linux-xenomai_latest.bb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/recipes-kernel/linux/linux-xenomai_latest.bb b/recipes-kernel/linux/lin

RE: [PATCH v2 2/2] cobalt/trace: dovetail: remove TODO and return -ENOSYS for unportable features

2021-11-29 Thread Chen, Hongzhan via Xenomai
>-Original Message- >From: Jan Kiszka >Sent: Tuesday, November 30, 2021 2:41 PM >To: Chen, Hongzhan ; xenomai@xenomai.org >Subject: Re: [PATCH v2 2/2] cobalt/trace: dovetail: remove TODO and return >-ENOSYS for unportable features > >On 30.11.21 02:07, Chen, Hongzhan wrote: >> >> >>>

Re: [PATCH v2 2/2] cobalt/trace: dovetail: remove TODO and return -ENOSYS for unportable features

2021-11-29 Thread Jan Kiszka via Xenomai
On 30.11.21 07:56, Chen, Hongzhan wrote: > > >> -Original Message- >> From: Jan Kiszka >> Sent: Tuesday, November 30, 2021 2:41 PM >> To: Chen, Hongzhan ; xenomai@xenomai.org >> Subject: Re: [PATCH v2 2/2] cobalt/trace: dovetail: remove TODO and return >> -ENOSYS for unportable feature

[PATCH 2/2] cobalt/trace: dovetail: drop unnecessary helpers

2021-11-29 Thread Hongzhan Chen via Xenomai
For dovetail-based, handle_oob_trap_entry would try to demote oob stage and leave in-band to do panic thing when fault happen. Signed-off-by: Hongzhan Chen diff --git a/include/cobalt/kernel/dovetail/pipeline/trace.h b/include/cobalt/kernel/dovetail/pipeline/trace.h index 7147ab183..306dd549a 1

[PATCH 1/2] cobalt/trace: dovetail: remove TODO and return -ENOSYS for unportable features

2021-11-29 Thread Hongzhan Chen via Xenomai
Some of the features are unportable because ftrace does not provide equivalent functionality to the ipipe tracer (namely double buffering so that you can continue to record in flight-recorder mode while a previous recording remains available). Signed-off-by: Hongzhan Chen diff --git a/include/co