All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jan Kiszka <jan.kiszka@siemens.com>
To: Richard Weinberger <richard.weinberger@gmail.com>
Cc: Xenomai <xenomai@xenomai.org>
Subject: Re: rt_task_shadow() secondary mode
Date: Thu, 8 Jul 2021 12:20:32 +0200	[thread overview]
Message-ID: <de2ec266-451f-8a49-380b-da46c1e4adda@siemens.com> (raw)
In-Reply-To: <CAFLxGvyn5SdGr8v8tNGCh8w7ciJLwY2wgLVsqiyxkBNXJvmVHg@mail.gmail.com>

On 08.07.21 12:04, Richard Weinberger wrote:
> On Thu, Jul 8, 2021 at 11:54 AM Jan Kiszka <jan.kiszka@siemens.com> wrote:
>>
>> On 08.07.21 11:51, Richard Weinberger wrote:
>>> On Thu, Jul 8, 2021 at 11:25 AM Jan Kiszka <jan.kiszka@siemens.com> wrote:
>>>> The general philosophy of Xenomai is that applications should not rely
>>>> on the exact switching behavior. So the question would be why your
>>>> application needs one or the other behavior?
>>>
>>> In this particular case the application uses the ioctl() system call
>>> to call into a
>>> xenomai kernel module. The module implements the rt and nrt variant of
>>> ioctl() and
>>> the application assumes which version of the ioctl() implementation
>>> will get reached.
>>
>> ...that might be the actual design bug. If a driver implements the a
>> service for both calling modes, the service should effectively do the
>> same, ie. should be mode-agnostic. Seems, this was violated here.
> 
> Can be, the driver was designed a long time ago. :-)
> In the nrt ioctl() the driver uses e.g. ioremap(), this cannot work in primary
> mode. Is the desired approach switching to secondary mode when in primary
> mode such a code path is to be executed?
> 

Correct. That is easily achieved by returning -ENOSYS from the rt
handler when seeing that nrt request in its context.

Jan

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


  reply	other threads:[~2021-07-08 10:20 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-08  9:03 rt_task_shadow() secondary mode Richard Weinberger
2021-07-08  9:25 ` Jan Kiszka
2021-07-08  9:51   ` Richard Weinberger
2021-07-08  9:54     ` Jan Kiszka
2021-07-08 10:04       ` Richard Weinberger
2021-07-08 10:20         ` Jan Kiszka [this message]
2021-07-08 10:09       ` Philippe Gerum
2021-07-08 10:23         ` Jan Kiszka
2021-07-08 12:51           ` Philippe Gerum
2021-07-08 22:05             ` Richard Weinberger
2021-07-08 22:14               ` Richard Weinberger

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=de2ec266-451f-8a49-380b-da46c1e4adda@siemens.com \
    --to=jan.kiszka@siemens.com \
    --cc=richard.weinberger@gmail.com \
    --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.