From: Jan Kiszka <jan.kiszka@domain.hid>
To: xenoka09@domain.hid
Cc: xenomai@xenomai.org
Subject: Re: [Xenomai-help] rtdm_mmap_to_user without MMU
Date: Wed, 15 Jul 2009 09:44:41 +0200 [thread overview]
Message-ID: <4A5D88E9.2010305@domain.hid> (raw)
In-Reply-To: <alpine.DEB.2.00.0907142049190.4341@domain.hid>
Waschk,Kolja wrote:
> Hi,
>
> I'm starting to develop a RTDM driver to be used in uClinux on a Blackfin-based
> device. Its main task is to receive lots of framed data (30 MBit/s) and pass
> them to an application in user space, retaining the framing info. A major
> concern is the performance. I'd like to avoid copying, so I looked into using
> rtdm_mmap_to_user(). It seems to use the mmap op of /dev/zero, which is "return
> ENOSYS"(*) in drivers/char/mem.c on systems without a MMU. In other words, it
rtdm_mmap_to_user uses remap_pfn_range internally when there is no MMU.
And IIRC, it is supposed to work also in this scenario. You may just not
expect being able to specify a remap target address...
> doesn't seem to be usable in uClinux. Well, I could just forget about mmap,
> there is no MMU and thus my user code can access the data anyway. But what'd be
> the proper way to cope with this? I'd really like to code it so it would work
> on a system with MMU as well (maybe in next year's project...)
>
> Probably I'll move a bit more of the user space code (the decoding of the frame
> into a larger structure) into the driver, turning the "copying" into
> "decoding", which has to be done anyway. But ideally the kernel part should
> be kept as simple as possible.
Yes, generally the right approach.
>
> Kolja
>
> (*) I might have missed something between, because the actual error code is ENODEV
Can you provide some hardware-independent test case?
Jan
--
Siemens AG, Corporate Technology, CT SE 2
Corporate Competence Center Embedded Linux
next prev parent reply other threads:[~2009-07-15 7:44 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-14 19:14 [Xenomai-help] rtdm_mmap_to_user without MMU Waschk,Kolja
2009-07-15 7:44 ` Jan Kiszka [this message]
2009-07-15 10:24 ` Kolja Waschk
2009-07-15 14:35 ` Kolja Waschk
2009-07-16 21:41 ` Jan Kiszka
2009-07-17 9:59 ` Kolja Waschk
2009-07-17 11:50 ` Kolja Waschk
2009-07-18 8:00 ` Jan Kiszka
2009-08-04 7:21 ` Kolja Waschk
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=4A5D88E9.2010305@domain.hid \
--to=jan.kiszka@domain.hid \
--cc=xenoka09@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.