All of lore.kernel.org
 help / color / mirror / Atom feed
From: Philippe Gerum <rpm@xenomai.org>
To: Michael Smith <2michael.smith@gmail.com>, xenomai@xenomai.org
Subject: Re: [Xenomai] RTDM !xnpod_unblockable_p() question
Date: Wed, 13 Aug 2014 14:55:41 +0200	[thread overview]
Message-ID: <53EB604D.60603@xenomai.org> (raw)
In-Reply-To: <53EB5F9D.8000905@xenomai.org>

On 08/13/2014 02:52 PM, Philippe Gerum wrote:
> On 08/13/2014 02:28 PM, Michael Smith wrote:
>> Hi
>> I have been struggling with this problem for days on end, but there is just
>> not enough information in the code
>> or documentation for me to solve it.
>> I am calling rtdm_mutex_lock() inside a device driver module. It is called
>> by my PCI probe function as
>> the driver is initializing.
>> I keep on getting the error message:
>> Xenomai: assertion failed at kernel/xenomai/skins/rtdm/drvlib.c:1534
>> (!xnpod_unblockable_p())
>> And the resultant -EPERM error message from the return of the function.
>>
>> I know these checks were inserted to stop any call from an incorrect
>> context. But as far as the documentation states
>> it can be called from a kernel module.
> 
> The doc (2.6) reads:
> 
>  * This service can be called from:
>  *
>  * - Kernel-based task
>  * - User-space task (RT)
> 
> The generic "kernel module" context is not mentioned. You get -EPERM
> because you cannot call this from a probe() routine, which runs in
> secondary/pure linux mode. Acquiring a RTDM mutex requires the caller to
> run in real-time mode.
> 

By "kernel based task", the doc always implicitly means kernel-based
_Xenomai_ task, e.g. RTDM driver task. Such one always runs in primary mode.

-- 
Philippe.


  reply	other threads:[~2014-08-13 12:55 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-13 12:28 [Xenomai] RTDM !xnpod_unblockable_p() question Michael Smith
2014-08-13 12:52 ` Philippe Gerum
2014-08-13 12:55   ` Philippe Gerum [this message]
2014-08-13 20:04 ` Gilles Chanteperdrix
     [not found]   ` <CANWkrROgE=AVv_Qq9hkvS+kJ+Wx1zepOjJQ2gAX7qwNYJqhYBw@mail.gmail.com>
2014-08-14  7:02     ` [Xenomai] Fwd: " Michael Smith
2014-08-14  7:20       ` Philippe Gerum

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=53EB604D.60603@xenomai.org \
    --to=rpm@xenomai.org \
    --cc=2michael.smith@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.