All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jan Kiszka <jan.kiszka@siemens.com>
To: Philippe Gerum <rpm@xenomai.org>, xenomai@xenomai.org
Subject: Re: [CXP][RFC] Pick RTDM for the common kernel interface
Date: Mon, 14 Dec 2020 13:44:49 +0100	[thread overview]
Message-ID: <5700bc80-fb99-0420-a386-13c0cab91c6e@siemens.com> (raw)
In-Reply-To: <87pn3mzxeh.fsf@xenomai.org>

On 06.12.20 17:56, Philippe Gerum via Xenomai wrote:
> 
> The common Xenomai platform specification is about defining the
> commonalities among future Xenomai releases starting from 3.3,
> including the Xenomai 4 series based on a next generation (EVL)
> core. A common kernel interface available for implementing
> Xenomai-controlled drivers is part of this specification.
> 
> Xenomai 3.x and earlier have long promoted the RTDM interface for
> implementing drivers, which encourages a separated driver model by
> design. Instead, the EVL core which is going to be the cornerstone of
> Xenomai 4 promotes an integrated approach to developing real-time
> drivers when possible, by adding so-called "out of band" capabilities
> directly to the implementation of existing mainline drivers [1][2]. A
> custom EVL driver which has no counterpart in the mainline kernel tree
> is still a regular character device driver, although it must use the
> real-time services brought by the EVL core for its time-critical
> operations [3].
> 
> The purpose of defining a common kernel interface as part of the CXP is
> specifically about helping with portability of existing custom drivers
> built for Xenomai 3.x towards Xenomai 4. Following the regular driver
> model as promoted by EVL along with using the EVL core interface
> directly would be the recommended way of developing drivers for Xenomai
> 4.
> 
> However, some RTDM features/services cannot be ported to an EVL-based
> system, due to major differences between the Cobalt and EVL locking
> models (e.g. RTDM_EXECUTE_ATOMICALLY(), along with any call involving
> Cobalt's single "superlock").
> 
> 
> 
> PROPOSAL: Adopt a large subset of the current RTDM specification as
> the common kernel interface defined by the CXP. The exact set of RTDM
> services which should be retained in the CXP implementation must be
> discussed further.
> 
> As a consequence, Xenomai 4 would provide a RTDM layer based on the EVL
> core interface internally, which would preserve the driver taxonomy
> ("named" / "protocol") and registration model inherited from its Xenomai
> 3.x counterpart.
> 
>                   drivers
>       ....................................
>            |                  |      |
>            |                  |      |
>           RTDM               RTDM    |
>            |                  |      |
>            v                  v      v
>  (Cobalt core xn* API)   (EVL core evl_* API)
>  ---------------------   --------------------
>       Xenomai 3.x            Xenomai 4
> 
> Applications could issue I/O requests to RTDM-based drivers via the
> dedicated services from the common libcobalt interface also available
> in both environments [4].
> 
> 
> Thanks,
> 
> [1] https://evlproject.org/core/oob-drivers/
> [2] https://evlproject.org/core/oob-drivers/gpio/
> [3] https://evlproject.org/core/kernel-api/
> [4] https://xenomai.org/pipermail/xenomai/2020-December/043930.html
> 

Ack regarding the commitment to RTDM compat support. How that RTDM
version will eventually look like is not yet clear to me, though. It may
not be 1:1 what we have today.

E.g., both EVL and RTDM have to provide separate (from the kernel)
synchronization primitives. I would see a lot of benefit in aligning
them, rather than having yet another new set with EVL. People should be
able to do

#define rtdm_mutex_lock evl_lock_kmutex

or vice versa.

Jan

-- 
Siemens AG, T RDA IOT
Corporate Competence Center Embedded Linux


  parent reply	other threads:[~2020-12-14 12:44 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-06 16:56 [CXP][RFC] Pick RTDM for the common kernel interface Philippe Gerum
2020-12-14  7:29 ` Wolfgang Denk
2020-12-14 12:44 ` Jan Kiszka [this message]
2020-12-14 16:11   ` Greg Gallagher
2020-12-14 17:13     ` Philippe Gerum
2020-12-15 12:30     ` Wolfgang Denk

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5700bc80-fb99-0420-a386-13c0cab91c6e@siemens.com \
    --to=jan.kiszka@siemens.com \
    --cc=rpm@xenomai.org \
    --cc=xenomai@xenomai.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.