From: "Giorgio Buffa" <giorgiobuffa.work@gmail.com>
To: xenomai@xenomai.org
Subject: [Xenomai] Device drivers and networking stack (RTnet) on Xenomai 3
Date: Mon, 29 Jun 2015 15:35:03 +0200 [thread overview]
Message-ID: <000a01d0b270$6c0e6b70$442b4250$@gmail.com> (raw)
Hello list!
I'm new to the Xenomai architecture, so I would like to receive a feedback
regarding my (little) understanding on device drivers and the RTnet stack.
In dual-kernel configurations (both Xenomai 2.x and Xenomai 3.x Cobalt
core), device drivers need to be ported to the RTDM model: it allows a
Xenomai thread not to leave the primary mode when accessing these device
drivers. This is good because a Xenomai thread in secondary mode is
scheduled by the Linux scheduler, hence it can run only when there are no
other runnable Xenomay thread in primary mode (even with a lower priority),
nor other runnable Linux threads / Xenomai threads in secondary mode with
higher priority.
Porting a Linux driver to the RTDM model basically means to replace any
call to Linux services within the driver itself (e.g. to register the
driver, the IRQ handlers, the open/close/ioctl handlers, ...) to the
equivalent services provided by the RTDM API.
In single-kernel configurations (Xenomai 3.x Mercury core) there is only
the Linux scheduler, hence there is no such distinction of
primary/secondary mode. A device driver can be used as is (i.e. as it is
provided by the stock Linux kernel), even without porting it to the RTDM
model. By the way, it is also possible to use a RTDM-based device driver
(in that case, RTDM API calls are translated into Linux service calls at
compile time).
Are there some good "rules of thumb" when looking at a stock Linux driver
to be used in a Xenomai application with the Mercury core underneath?
My last point is related to RTnet. I've seen that RTnet has been integrated
into Xenomai 3 because some sort of API changes. Is RTnet needed in both
dual-kernel and single-kernel configurations?
Thank you for any help and kind regards,
Giorgio Buffa
next reply other threads:[~2015-06-29 13:35 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-29 13:35 Giorgio Buffa [this message]
2015-06-29 20:22 ` [Xenomai] Device drivers and networking stack (RTnet) on Xenomai 3 Gilles Chanteperdrix
2015-06-30 8:04 ` [Xenomai] R: " Giorgio Buffa
2015-06-30 9:10 ` Gilles Chanteperdrix
2015-06-30 9:56 ` Gilles Chanteperdrix
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='000a01d0b270$6c0e6b70$442b4250$@gmail.com' \
--to=giorgiobuffa.work@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.