All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jan Kiszka <jan.kiszka@domain.hid>
To: Perrine Martignoni <perrmart@domain.hid>
Cc: xenomai-help <xenomai@xenomai.org>
Subject: Re: [Xenomai-help] RTDM mmap and DMA
Date: Tue, 18 Dec 2007 15:22:28 +0100	[thread overview]
Message-ID: <4767D7A4.7070008@domain.hid> (raw)
In-Reply-To: <7289437c0712180611i45662e10k1f02c66e584ec99b@domain.hid>

Perrine Martignoni wrote:
> So, if I understand, I have to use the Dma Api of Linux (linux/dma-mapping.h)
> to allocate a dma buffer and then call rtdm_mmap_to_user to map it in user
> space.
> Isn't it disadvantageous to do it in regular Linux ?

Of course, memory allocation and releasing must never happen over RT
context, but rather during (non-RT) open/close etc.

Mapping/unmapping is a trivial and safe operation on many archs, but not
on all (beware of some IOMMU being involved, then mapping becomes
indeterministic). If unsure, check for your target if it is running
through complex and potentially memory-allocating code paths, e.g. via
lxr.linux.no. If there are problems (not expected on today's mid- to
low-end HW), you have to manage also the mappings during init and keep
them during runtime. Standard pattern for RT development.

Jan

-- 
Siemens AG, Corporate Technology, CT SE 2
Corporate Competence Center Embedded Linux


  reply	other threads:[~2007-12-18 14:22 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-12-14 11:24 [Xenomai-help] RTDM mmap and DMA Perrine Martignoni
2007-12-18  9:21 ` Stéphane ANCELOT
2007-12-18  9:29 ` Jan Kiszka
2007-12-18 10:10   ` Gilles Chanteperdrix
2007-12-18 10:16     ` Perrine Martignoni
2007-12-18 10:18       ` Gilles Chanteperdrix
2007-12-18 10:12   ` Perrine Martignoni
2007-12-18 12:47     ` Jan Kiszka
2007-12-18 13:20       ` Gilles Chanteperdrix
2007-12-18 14:11       ` Perrine Martignoni
2007-12-18 14:22         ` Jan Kiszka [this message]
2007-12-18 14:41           ` Perrine Martignoni
  -- strict thread matches above, loose matches on Subject: below --
2007-12-14 13:59 Fillod Stephane
2007-12-14 15:50 ` Perrine Martignoni
2007-12-23 13:09 ` Gilles Chanteperdrix
2007-12-26 23:37 ` Gilles Chanteperdrix
2007-12-17 14:40 Fillod Stephane
2007-12-18 17:40 Fillod Stephane
2007-12-18 17:55 ` Gilles Chanteperdrix
2007-12-27 15:39 Fillod Stephane
2007-12-27 15:43 ` Gilles Chanteperdrix
2007-12-28 21:59 ` Gilles Chanteperdrix
2008-01-03 18:40 Fillod Stephane

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=4767D7A4.7070008@domain.hid \
    --to=jan.kiszka@domain.hid \
    --cc=perrmart@domain.hid \
    --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.